5394: block changing OC-specific cache types and sizes by ocprop

This commit is contained in:
following
2013-03-24 17:07:53 +01:00
parent 76543d5aea
commit 7eccc1d5d1
3 changed files with 32 additions and 0 deletions

View File

@ -29,6 +29,7 @@ function __autoload($class_name)
}
}
// yepp, we will use UTF-8
mb_internal_encoding('UTF-8');
mb_regex_encoding('UTF-8');
@ -74,6 +75,8 @@ function __autoload($class_name)
$opt['template']['style'] = $opt['template']['default']['style'];
$opt['stylepath'] = $opt['rootpath'] . 'templates2/' . $opt['template']['style'] . '/';
check_useragent();
/* setup smarty
*
*/
@ -228,6 +231,14 @@ function set_timezone()
date_default_timezone_set($opt['php']['timezone']);
}
function check_useragent()
{
global $_SERVER, $ocpropping;
// are we Ocprop?
$ocpropping = isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'],"Ocprop/");
}
function fix_magic_quotes_gpc()
{
// Disable magic_quotes_runtime