[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: setup lang.php,1.45,1.46
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: setup lang.php,1.45,1.46 |
Date: |
Fri, 21 Mar 2003 20:32:32 -0500 |
Update of /cvsroot/phpgroupware/setup
In directory subversions:/tmp/cvs-serv13809
Modified Files:
lang.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: lang.php
===================================================================
RCS file: /cvsroot/phpgroupware/setup/lang.php,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -r1.45 -r1.46
*** lang.php 23 Nov 2002 12:32:16 -0000 1.45
--- lang.php 22 Mar 2003 01:32:30 -0000 1.46
***************
*** 36,40 ****
//$sep = $common->filesystem_separator();
}
! else
{
$newinstall = True;
--- 36,40 ----
//$sep = $common->filesystem_separator();
}
! elseif ($included != 'from_login')
{
$newinstall = True;
***************
*** 47,50 ****
--- 47,60 ----
$lang_selected = @$GLOBALS['HTTP_POST_VARS']['lang_selected'];
$upgrademethod = @$GLOBALS['HTTP_POST_VARS']['upgrademethod'];
+
+ if (!isset($GLOBALS['phpgw_info']['server']) && $upgrademethod
!= 'dumpold')
+ {
+ $GLOBALS['phpgw_setup']->db->query("select * from
phpgw_config WHERE config_app='phpgwapi' AND
config_name='lang_ctimes'",__LINE__,__FILE__);
+ if ($GLOBALS['phpgw_setup']->db->next_record())
+ {
+ $GLOBALS['phpgw_info']['server']['lang_ctimes']
= unserialize(stripslashes($GLOBALS['phpgw_setup']->db->f('config_value')));
+ }
+ }
+
$GLOBALS['phpgw_setup']->db->transaction_begin();
if (count($lang_selected))
***************
*** 55,58 ****
--- 65,69 ----
$GLOBALS['phpgw_setup']->db->query("DELETE FROM
phpgw_lang where app_name != 'mainscreen' AND app_name !=
'loginscreen'",__LINE__,__FILE__);
//echo '<br>Test: dumpold';
+ $GLOBALS['phpgw_info']['server']['lang_ctimes']
= array();
}
while (list($null,$lang) = each($lang_selected))
***************
*** 87,90 ****
--- 98,103 ----
//echo '<br>Including:
' . $appfile;
$raw[] = file($appfile);
+
+
$GLOBALS['phpgw_info']['server']['lang_ctimes'][$lang][$app['name']] =
filectime($appfile);
}
}
***************
*** 101,105 ****
$GLOBALS['phpgw_setup']->db_lang =
$GLOBALS['phpgw_setup']->db->db_addslashes(chop($GLOBALS['phpgw_setup']->db_lang));
$content =
$GLOBALS['phpgw_setup']->db->db_addslashes(chop($content));
! if ($upgrademethod ==
'addmissing' || $upgrademethod == 'dumpold')
{
//echo
'<br>Test: addmissing';
--- 114,118 ----
$GLOBALS['phpgw_setup']->db_lang =
$GLOBALS['phpgw_setup']->db->db_addslashes(chop($GLOBALS['phpgw_setup']->db_lang));
$content =
$GLOBALS['phpgw_setup']->db->db_addslashes(chop($content));
! if ($upgrademethod ==
'addmissing')
{
//echo
'<br>Test: addmissing';
***************
*** 114,119 ****
}
! // if ($addit ||
($upgrademethod == 'dumpold' || $newinstall || $upgrademethod == 'addonlynew'))
! if ($addit ||
($newinstall || $upgrademethod == 'addonlynew'))
{
if($message_id
&& $content)
--- 127,131 ----
}
! if ($addit ||
$newinstall || $upgrademethod == 'addonlynew' || $upgrademethod == 'dumpold')
{
if($message_id
&& $content)
***************
*** 132,135 ****
--- 144,151 ----
}
$GLOBALS['phpgw_setup']->db->transaction_commit();
+
+ $GLOBALS['phpgw_setup']->db->query("DELETE from
phpgw_config WHERE config_app='phpgwapi' AND
config_name='lang_ctimes'",__LINE__,__FILE__);
+ $GLOBALS['phpgw_setup']->db->query($query="INSERT INTO
phpgw_config(config_app,config_name,config_value) VALUES
('phpgwapi','lang_ctimes','".
+
addslashes(serialize($GLOBALS['phpgw_info']['server']['lang_ctimes']))."')",__LINE__,__FILE__);
}
***************
*** 168,171 ****
--- 184,191 ----
$hidden_var1 = $newinstall ? '<input type="hidden"
name="newinstall" value="True">' : '';
+ if (!$newinstall &&
!isset($GLOBALS['phpgw_info']['setup']['installed_langs']))
+ {
+
$GLOBALS['phpgw_setup']->detection->check_lang(false); // get installed langs
+ }
$select_box_desc = lang('Select which languages you
would like to use');
$select_box = '';
***************
*** 173,179 ****
while ($GLOBALS['phpgw_setup']->db->next_record())
{
$select_box_langs =
$select_box_langs
! .'<option value="' .
$GLOBALS['phpgw_setup']->db->f('lang_id') . '">'
.
$GLOBALS['phpgw_setup']->db->f('lang_name') . '</option>'
."\n";
--- 193,201 ----
while ($GLOBALS['phpgw_setup']->db->next_record())
{
+ $id = $GLOBALS['phpgw_setup']->db->f('lang_id');
$select_box_langs =
$select_box_langs
! .'<option value="' . $id . '"'
!
.($GLOBALS['phpgw_info']['setup']['installed_langs'][$id]?' SELECTED':'').'>'
.
$GLOBALS['phpgw_setup']->db->f('lang_name') . '</option>'
."\n";
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: setup lang.php,1.45,1.46,
Ralf Becker <address@hidden> <=