[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: phpgroupware login.php,1.91,1.92
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: phpgroupware login.php,1.91,1.92 |
Date: |
Fri, 21 Mar 2003 20:33:26 -0500 |
Update of /cvsroot/phpgroupware/phpgroupware
In directory subversions:/tmp/cvs-serv13905
Modified Files:
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
fixed multidomain-select-box
Index: login.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgroupware/login.php,v
retrieving revision 1.91
retrieving revision 1.92
diff -C2 -r1.91 -r1.92
*** login.php 26 Oct 2002 00:28:14 -0000 1.91
--- login.php 22 Mar 2003 01:33:24 -0000 1.92
***************
*** 12,16 ****
\**************************************************************************/
/* $Id$ */
-
$phpgw_info = array();
$GLOBALS['phpgw_info']['flags'] = array
--- 12,15 ----
***************
*** 100,106 ****
}
}
/* Program starts here */
-
if ($GLOBALS['phpgw_info']['server']['auth_type'] == 'http' &&
isset($PHP_AUTH_USER))
{
--- 99,156 ----
}
}
+
+ function check_langs()
+ {
+ //$f = fopen('/tmp/log','a'); fwrite($f,"\ncheck_langs()\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']);
+ }
+
+ $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]);
+ //fwrite($f,"checking lang='$lang', app='$app',
ctime='$ctime', ltime='$ltime'\n");
+
+ if ($ctime != $ltime)
+ {
+ //fwrite($f,"\nupdate_langs()\n");
+
+ update_langs(); // update all
langs
+ break;
+ }
+ }
+ }
+ //fclose ($f);
+ }
+
+ function update_langs()
+ {
+ $GLOBALS['phpgw_setup'] = CreateObject('phpgwapi.setup');
+ $GLOBALS['phpgw_setup']->db = $GLOBALS['phpgw']->db;
+
+ $GLOBALS['phpgw_setup']->detection->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 */
if ($GLOBALS['phpgw_info']['server']['auth_type'] == 'http' &&
isset($PHP_AUTH_USER))
{
***************
*** 142,149 ****
unset($sslattributes);
}
-
if (isset($GLOBALS['HTTP_POST_VARS']['passwd_type']) || $submit_x ||
$submit_y)
// isset($GLOBALS['HTTP_POST_VARS']['passwd']) &&
$GLOBALS['HTTP_POST_VARS']['passwd']) // enable konqueror to login via Return
{
if (getenv(REQUEST_METHOD) != 'POST' &&
$_SERVER['REQUEST_METHOD'] != 'POST'
&& !isset($PHP_AUTH_USER) &&
!isset($HTTP_SERVER_VARS['SSL_CLIENT_S_DN']))
--- 192,199 ----
unset($sslattributes);
}
if (isset($GLOBALS['HTTP_POST_VARS']['passwd_type']) || $submit_x ||
$submit_y)
// isset($GLOBALS['HTTP_POST_VARS']['passwd']) &&
$GLOBALS['HTTP_POST_VARS']['passwd']) // enable konqueror to login via Return
{
+ Echo "Hallo Ralf 2";
if (getenv(REQUEST_METHOD) != 'POST' &&
$_SERVER['REQUEST_METHOD'] != 'POST'
&& !isset($PHP_AUTH_USER) &&
!isset($HTTP_SERVER_VARS['SSL_CLIENT_S_DN']))
***************
*** 169,172 ****
--- 219,224 ----
}
}
+ check_langs();
+
$GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/home.php','code=yes' .
$extra_vars,True));
}
***************
*** 219,243 ****
if ($GLOBALS['phpgw_info']['server']['show_domain_selectbox'])
{
! reset($phpgw_domain);
! while ($domain = each($phpgw_domain))
{
! if ($domain[0] == $last_domain)
{
! $select = 'selected';
}
! $data['login_standard']['domain_select'] = array
! (
! 'domain' => $domain[0],
! 'selected' => $selected
! );
! }
!
! for
($i=0;$i<count($data['login_standard']['domain_select']);$i++)
! {
! if
($data['login_standard']['domain_select'][$i]['selected'] != 'selected')
! {
!
unset($data['login_standard']['domain_select'][$i]['selected']);
! }
}
}
--- 271,283 ----
if ($GLOBALS['phpgw_info']['server']['show_domain_selectbox'])
{
! foreach ($phpgw_domain as $domain => $domain_data)
{
! $ds = array('domain' => $domain);
! if ($domain == $last_domain)
{
! $ds += array('selected' => 'selected');
}
! $data['login_standard']['domain_select'][] = $ds;
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: phpgroupware login.php,1.91,1.92,
Ralf Becker <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: setup lang.php,1.45,1.46
- Next by Date:
[Phpgroupware-cvs] CVS: phpbrain/inc class.bokb.inc.php,1.4,1.5 class.uikb.inc.php,1.5,1.6
- Previous by thread:
[Phpgroupware-cvs] CVS: setup lang.php,1.45,1.46
- Next by thread:
[Phpgroupware-cvs] CVS: phpbrain/inc class.bokb.inc.php,1.4,1.5 class.uikb.inc.php,1.5,1.6
- Index(es):