forked from extern/egroupware
$GLOBALS['phpgw{_info}'] ==> $GLOBALS['egw{_info}']
This commit is contained in:
parent
c205597803
commit
69c93b3f2b
@ -52,15 +52,15 @@
|
||||
{
|
||||
$this->placeholders[] = '%'.$i;
|
||||
}
|
||||
$this->db = is_object($GLOBALS['phpgw']->db) ? $GLOBALS['phpgw']->db : $GLOBALS['phpgw_setup']->db;
|
||||
$this->db = is_object($GLOBALS['egw']->db) ? $GLOBALS['egw']->db : $GLOBALS['egw_setup']->db;
|
||||
$this->db->set_app('phpgwapi');
|
||||
$this->lang_table = 'phpgw_lang';
|
||||
$this->languages_table = 'phpgw_languages';
|
||||
$this->config_table = 'phpgw_config';
|
||||
|
||||
if (!isset($GLOBALS['phpgw_setup']))
|
||||
if (!isset($GLOBALS['egw_setup']))
|
||||
{
|
||||
$this->system_charset = @$GLOBALS['phpgw_info']['server']['system_charset'];
|
||||
$this->system_charset = @$GLOBALS['egw_info']['server']['system_charset'];
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -144,9 +144,9 @@
|
||||
$GLOBALS['lang'] = array();
|
||||
}
|
||||
|
||||
if ($GLOBALS['phpgw_info']['user']['preferences']['common']['lang'])
|
||||
if ($GLOBALS['egw_info']['user']['preferences']['common']['lang'])
|
||||
{
|
||||
$this->userlang = $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'];
|
||||
$this->userlang = $GLOBALS['egw_info']['user']['preferences']['common']['lang'];
|
||||
}
|
||||
$this->add_app('common');
|
||||
if (!count($GLOBALS['lang']))
|
||||
@ -154,7 +154,7 @@
|
||||
$this->userlang = 'en';
|
||||
$this->add_app('common');
|
||||
}
|
||||
$this->add_app($GLOBALS['phpgw_info']['flags']['currentapp']);
|
||||
$this->add_app($GLOBALS['egw_info']['flags']['currentapp']);
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -416,7 +416,7 @@
|
||||
{
|
||||
@set_time_limit(0); // we might need some time
|
||||
//echo "<p>translation_sql::install_langs(".print_r($langs,true).",'$upgrademthod','$only_app')</p>\n";
|
||||
if (!isset($GLOBALS['phpgw_info']['server']) && $upgrademethod != 'dumpold')
|
||||
if (!isset($GLOBALS['egw_info']['server']) && $upgrademethod != 'dumpold')
|
||||
{
|
||||
$this->db->select($this->config_table,'config_value',array(
|
||||
'config_app' => 'phpgwapi',
|
||||
@ -424,7 +424,7 @@
|
||||
),__LINE__,__FILE__);
|
||||
if ($this->db->next_record())
|
||||
{
|
||||
$GLOBALS['phpgw_info']['server']['lang_ctimes'] = unserialize(stripslashes($this->db->f('config_value')));
|
||||
$GLOBALS['egw_info']['server']['lang_ctimes'] = unserialize(stripslashes($this->db->f('config_value')));
|
||||
}
|
||||
}
|
||||
|
||||
@ -439,7 +439,7 @@
|
||||
// dont delete the custom main- & loginscreen messages every time
|
||||
$this->db->delete($this->lang_table,array("app_name!='mainscreen'","app_name!='loginscreen'"),__LINE__,__FILE__);
|
||||
//echo '<br>Test: dumpold';
|
||||
$GLOBALS['phpgw_info']['server']['lang_ctimes'] = array();
|
||||
$GLOBALS['egw_info']['server']['lang_ctimes'] = array();
|
||||
}
|
||||
foreach($langs as $lang)
|
||||
{
|
||||
@ -462,13 +462,13 @@
|
||||
if ($addlang && $upgrademethod == 'addonlynew' || $upgrademethod != 'addonlynew')
|
||||
{
|
||||
//echo '<br>Test: loop above file()';
|
||||
if (!is_object($GLOBALS['phpgw_setup']))
|
||||
if (!is_object($GLOBALS['egw_setup']))
|
||||
{
|
||||
$GLOBALS['phpgw_setup'] = CreateObject('phpgwapi.setup');
|
||||
$GLOBALS['phpgw_setup']->db = $this->db;
|
||||
$GLOBALS['egw_setup'] = CreateObject('setup.setup');
|
||||
$GLOBALS['egw_setup']->db = $this->db;
|
||||
}
|
||||
$setup_info = $GLOBALS['phpgw_setup']->detection->get_versions();
|
||||
$setup_info = $GLOBALS['phpgw_setup']->detection->get_db_versions($setup_info);
|
||||
$setup_info = $GLOBALS['egw_setup']->detection->get_versions();
|
||||
$setup_info = $GLOBALS['egw_setup']->detection->get_db_versions($setup_info);
|
||||
$raw = array();
|
||||
$apps = $only_app ? array($only_app) : array_keys($setup_info);
|
||||
// Visit each app/setup dir, look for a phpgw_lang file
|
||||
@ -476,7 +476,7 @@
|
||||
{
|
||||
$appfile = PHPGW_SERVER_ROOT . SEP . $app . SEP . 'setup' . SEP . 'phpgw_' . strtolower($lang) . '.lang';
|
||||
//echo '<br>Checking in: ' . $app;
|
||||
if($GLOBALS['phpgw_setup']->app_registered($app) && file_exists($appfile))
|
||||
if($GLOBALS['egw_setup']->app_registered($app) && file_exists($appfile))
|
||||
{
|
||||
//echo '<br>Including: ' . $appfile;
|
||||
$lines = file($appfile);
|
||||
@ -498,7 +498,7 @@
|
||||
$app_name = chop($app_name);
|
||||
$raw[$app_name][$message_id] = $content;
|
||||
}
|
||||
$GLOBALS['phpgw_info']['server']['lang_ctimes'][$lang][$app] = filectime($appfile);
|
||||
$GLOBALS['egw_info']['server']['lang_ctimes'][$lang][$app] = filectime($appfile);
|
||||
}
|
||||
}
|
||||
$charset = strtolower(@$raw['common']['charset'] ? $raw['common']['charset'] : $this->charset($lang));
|
||||
@ -576,8 +576,8 @@
|
||||
|
||||
// update the ctimes of the installed langsfiles for the autoloading of the lang-files
|
||||
//
|
||||
$config = CreateObject('phpgwapi.config.save_value');
|
||||
$config->save_value('lang_ctimes',$GLOBALS['phpgw_info']['server']['lang_ctimes'],'phpgwapi');
|
||||
$config = CreateObject('phpgwapi.config');
|
||||
$config->save_value('lang_ctimes',$GLOBALS['egw_info']['server']['lang_ctimes'],'phpgwapi');
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -587,14 +587,14 @@
|
||||
function autoload_changed_langfiles()
|
||||
{
|
||||
//echo "<h1>check_langs()</h1>\n";
|
||||
if ($GLOBALS['phpgw_info']['server']['lang_ctimes'] && !is_array($GLOBALS['phpgw_info']['server']['lang_ctimes']))
|
||||
if ($GLOBALS['egw_info']['server']['lang_ctimes'] && !is_array($GLOBALS['egw_info']['server']['lang_ctimes']))
|
||||
{
|
||||
$GLOBALS['phpgw_info']['server']['lang_ctimes'] = unserialize($GLOBALS['phpgw_info']['server']['lang_ctimes']);
|
||||
$GLOBALS['egw_info']['server']['lang_ctimes'] = unserialize($GLOBALS['egw_info']['server']['lang_ctimes']);
|
||||
}
|
||||
//_debug_array($GLOBALS['phpgw_info']['server']['lang_ctimes']);
|
||||
//_debug_array($GLOBALS['egw_info']['server']['lang_ctimes']);
|
||||
|
||||
$lang = $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'];
|
||||
$apps = $GLOBALS['phpgw_info']['user']['apps'];
|
||||
$lang = $GLOBALS['egw_info']['user']['preferences']['common']['lang'];
|
||||
$apps = $GLOBALS['egw_info']['user']['apps'];
|
||||
$apps['phpgwapi'] = True; // check the api too
|
||||
foreach($apps as $app => $data)
|
||||
{
|
||||
@ -604,7 +604,7 @@
|
||||
{
|
||||
$ctime = filectime($fname);
|
||||
/* This is done to avoid string offset error at least in php5 */
|
||||
$tmp = $GLOBALS['phpgw_info']['server']['lang_ctimes'][$lang];
|
||||
$tmp = $GLOBALS['egw_info']['server']['lang_ctimes'][$lang];
|
||||
$ltime = (int)$tmp[$app];
|
||||
unset($tmp);
|
||||
//echo "checking lang='$lang', app='$app', ctime='$ctime', ltime='$ltime'<br>\n";
|
||||
|
Loading…
Reference in New Issue
Block a user