X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=inline;f=install%2Fisession.inc;h=274f1f57a3f2f217404362c463271370863b4726;hb=0e15ca861655a6403f12a90f187c3fc00f35949d;hp=acf14202d4b5f37e77c287ef48c56d60e792888e;hpb=918e4561ac1adc980f79c9c3cdbcf8d250a7fdc0;p=fa-stable.git diff --git a/install/isession.inc b/install/isession.inc index acf14202..274f1f57 100644 --- a/install/isession.inc +++ b/install/isession.inc @@ -58,6 +58,15 @@ function html_cleanup(&$parms) function check_page_security($page_security) { } + +/* + Ensure file is re-read on next request if php caching is active +*/ +function cache_invalidate($filename) +{ + if (function_exists('opcache_invalidate')) // OpCode extension + opcache_invalidate($filename); +} //============================================================================ if (!isset($path_to_root)) { @@ -86,6 +95,9 @@ header("Cache-control: private"); include_once($path_to_root . "/config.default.php"); +$_SESSION['SysPrefs'] = new sys_prefs(); +$SysPrefs = &$_SESSION['SysPrefs']; + $inst_langs = array( 'C' => array ( 'name' => 'English', 'code' => 'C', 'encoding' => 'iso-8859-1'), 'ar_EG' => array ( 'name' => 'Arabic', 'code' => 'ar_EG', 'encoding' => 'utf-8', 'rtl' => true), @@ -119,6 +131,7 @@ if (!isset($_SESSION['language']) || !method_exists($_SESSION['language'], 'set_ $l = array_search_value($i_lang, $inst_langs, 'code'); $_SESSION['language'] = new language($l['name'], $l['code'], $l['encoding'], isset($l['rtl']) ? 'rtl' : 'ltr'); + } if (!isset($installed_languages)) $installed_languages = array(); @@ -150,8 +163,6 @@ html_cleanup($_POST); html_cleanup($_REQUEST); html_cleanup($_SERVER); -$SysPrefs = &$_SESSION['SysPrefs']; - // POST vars cleanup needed for direct reuse. // We quote all values later with db_escape() before db update. $_POST = strip_quotes($_POST);