[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: setup lang.php,1.30.2.5,1.30.2.6
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: setup lang.php,1.30.2.5,1.30.2.6 |
Date: |
Fri, 21 Mar 2003 10:02:43 -0500 |
Update of /cvsroot/phpgroupware/setup
In directory subversions:/tmp/cvs-serv25183
Modified Files:
Tag: Version-0_9_14-branch
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.30.2.5
retrieving revision 1.30.2.6
diff -C2 -r1.30.2.5 -r1.30.2.6
*** lang.php 16 Nov 2002 12:52:08 -0000 1.30.2.5
--- lang.php 21 Mar 2003 15:02:40 -0000 1.30.2.6
***************
*** 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
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)
***************
*** 123,127 ****
if
(intval($result) <= 0)
{
!
echo "<br>Error inserting record: lang values
('".$message_id."','".$app_name."','".$GLOBALS['phpgw_setup']->db_lang."','".$content."')";
}
}
--- 135,139 ----
if
(intval($result) <= 0)
{
!
//echo "<br>Error inserting record: lang values
('".$message_id."','".$app_name."','".$GLOBALS['phpgw_setup']->db_lang."','".$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,179 ****
$hidden_var1 = $newinstall ? '<input type="hidden"
name="newinstall" value="True">' : '';
$select_box_desc = lang('Select which languages you
would like to use');
$select_box = '';
$GLOBALS['phpgw_setup']->db->query("select
lang_id,lang_name from languages where available='Yes'");
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";
--- 184,202 ----
$hidden_var1 = $newinstall ? '<input type="hidden"
name="newinstall" value="True">' : '';
+ if (!$newinstall &&
!isset($GLOBALS['phpgw_info']['setup']['installed_langs']))
+ {
+ $GLOBALS['phpgw_setup']->check_lang(false);
// get installed langs
+ }
$select_box_desc = lang('Select which languages you
would like to use');
$select_box = '';
$GLOBALS['phpgw_setup']->db->query("select
lang_id,lang_name from languages where available='Yes'");
+
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.30.2.5,1.30.2.6,
Ralf Becker <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: setup/inc class.setup.inc.php,1.19.2.7,1.19.2.8 class.setup_detection.inc.php,1.7.2.2,1.7.2.3
- Next by Date:
[Phpgroupware-cvs] CVS: setup/templates/default lang_main.tpl,1.3,1.3.2.1
- Previous by thread:
[Phpgroupware-cvs] CVS: setup/inc class.setup.inc.php,1.19.2.7,1.19.2.8 class.setup_detection.inc.php,1.7.2.2,1.7.2.3
- Next by thread:
[Phpgroupware-cvs] CVS: setup/templates/default lang_main.tpl,1.3,1.3.2.1
- Index(es):