[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: phpgroupware login.php,1.76.2.3,1.76.2.4
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: phpgroupware login.php,1.76.2.3,1.76.2.4 |
Date: |
Fri, 21 Mar 2003 10:04:31 -0500 |
Update of /cvsroot/phpgroupware/phpgroupware
In directory subversions:/tmp/cvs-serv25435
Modified Files:
Tag: Version-0_9_14-branch
login.php
Log Message:
2 changes:
- newer lang-files get now installed automaticaly when a user log's in
- Czech is added to the supported lang's
==> phpgwapi version updated to 0.9.14.002
Index: login.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgroupware/login.php,v
retrieving revision 1.76.2.3
retrieving revision 1.76.2.4
diff -C2 -r1.76.2.3 -r1.76.2.4
*** login.php 15 Oct 2002 00:13:02 -0000 1.76.2.3
--- login.php 21 Mar 2003 15:04:28 -0000 1.76.2.4
***************
*** 112,115 ****
--- 112,168 ----
}
}
+
+ function check_langs()
+ {
+ //echo "<h1>check_langs()</h1>\n";
+ if ($GLOBALS['phpgw_info']['server']['lang_ctimes'] &&
!is_array($GLOBALS['phpgw_info']['server']['lang_ctimes']))
+ {
+ $GLOBALS['phpgw_info']['server']['lang_ctimes'] =
unserialize($GLOBALS['phpgw_info']['server']['lang_ctimes']);
+ }
+ //_debug_array($GLOBALS['phpgw_info']['server']['lang_ctimes']);
+
+ $lang =
$GLOBALS['phpgw_info']['user']['preferences']['common']['lang'];
+ $apps = $GLOBALS['phpgw_info']['user']['apps'];
+ $apps['phpgwapi'] = true; // check the api too
+ while (list($app,$data) = each($apps))
+ {
+ $fname = PHPGW_SERVER_ROOT .
"/$app/setup/phpgw_$lang.lang";
+
+ if (file_exists($fname))
+ {
+ $ctime = filectime($fname);
+ $ltime =
intval($GLOBALS['phpgw_info']['server']['lang_ctimes'][$lang][$app]);
+ //echo "checking lang='$lang', app='$app',
ctime='$ctime', ltime='$ltime'<br>\n";
+
+ if ($ctime != $ltime)
+ {
+ update_langs(); // update all
langs
+ break;
+ }
+ }
+ }
+ }
+
+ function update_langs()
+ {
+ //echo "<h1>update_langs()</h1>\n";
+
+ include(PHPGW_SERVER_ROOT . '/setup/inc/class.setup.inc.php');
+ $GLOBALS['phpgw_setup'] = new phpgw_setup;
+ $GLOBALS['phpgw_setup']->db = $GLOBALS['phpgw']->db;
+
+ $GLOBALS['phpgw_setup']->check_lang(false); // get
installed langs
+ $langs = $GLOBALS['phpgw_info']['setup']['installed_langs'];
+ while (list($lang) = each($langs))
+ {
+ $langs[$lang] = $lang;
+ }
+ $GLOBALS['HTTP_POST_VARS']['submit'] = true;
+ $GLOBALS['HTTP_POST_VARS']['lang_selected'] = $langs;
+ $GLOBALS['HTTP_POST_VARS']['upgrademethod'] = 'dumpold';
+ $included = 'from_login';
+
+ include(PHPGW_SERVER_ROOT . '/setup/lang.php');
+ }
/* Program starts here */
***************
*** 180,183 ****
--- 233,238 ----
}
}
+ check_langs();
+
$GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/home.php','cd=yes' .
$extra_vars));
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: phpgroupware login.php,1.76.2.3,1.76.2.4,
Ralf Becker <address@hidden> <=