phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] setup lang.php,1.46.2.6,1.46.2.7


From: Dave Hall <address@hidden>
Subject: [Phpgroupware-cvs] setup lang.php,1.46.2.6,1.46.2.7
Date: Mon, 24 Nov 2003 21:57:27 +0000

Update of /cvsroot/phpgroupware/setup
In directory subversions:/tmp/cvs-serv3337

Modified Files:
      Tag: Version-0_9_16-branch
        lang.php 
Log Message:
auto detect new langs and make them available


Index: lang.php
===================================================================
RCS file: /cvsroot/phpgroupware/setup/lang.php,v
retrieving revision 1.46.2.6
retrieving revision 1.46.2.7
diff -C2 -d -r1.46.2.6 -r1.46.2.7
*** lang.php    29 May 2003 07:46:19 -0000      1.46.2.6
--- lang.php    24 Nov 2003 21:57:23 -0000      1.46.2.7
***************
*** 153,157 ****
                        
                        $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__);
                }
--- 153,157 ----
                        
                        $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("INSERT INTO 
phpgw_config(config_app,config_name,config_value) VALUES 
('phpgwapi','lang_ctimes','".
                                
addslashes(serialize($GLOBALS['phpgw_info']['server']['lang_ctimes']))."')",__LINE__,__FILE__);
                }
***************
*** 190,193 ****
--- 190,202 ----
                        $hidden_var1 = @$newinstall ? '<input type="hidden" 
name="newinstall" value="True">' : '';
  
+                       $dir = dir('../phpgwapi/setup');
+                       while(($file = $dir->read()) !== false)
+                       {
+                               if(substr($file, 0, 6) == 'phpgw_')
+                               {
+                                       $avail_lang[] = "'" . substr($file, 6, 
2) . "'";
+                               }
+                       }
+ 
                        if (address@hidden && 
!isset($GLOBALS['phpgw_info']['setup']['installed_langs']))
                        {
***************
*** 196,200 ****
                        $select_box_desc = lang('Select which languages you 
would like to use');
                        $select_box = '';
!                       $GLOBALS['phpgw_setup']->db->query($q="select 
lang_id,lang_name from phpgw_languages where available='Yes'");
                        while ($GLOBALS['phpgw_setup']->db->next_record())
                        {
--- 205,213 ----
                        $select_box_desc = lang('Select which languages you 
would like to use');
                        $select_box = '';
!                       $db2 = $GLOBALS['phpgw_setup']->db;
!                       $GLOBALS['phpgw_setup']->db->query('SELECT 
lang_id,lang_name, available '
!                                                       . 'FROM phpgw_languages 
'
!                                                       . 'WHERE lang_id 
IN('.implode(',', $avail_lang).')');
! 
                        while ($GLOBALS['phpgw_setup']->db->next_record())
                        {
***************
*** 206,209 ****
--- 219,227 ----
                                        . 
$GLOBALS['phpgw_setup']->db->f('lang_name') . '</option>'
                                        ."\n";
+                               
if(strtoupper($GLOBALS['phpgw_setup']->db->f('available')) != 'YES')
+                               {
+                                       $db2->query("UPDATE phpgw_languages SET 
available = 'Yes' "
+                                               ."WHERE 
lang_id='".$GLOBALS['phpgw_setup']->db->f('lang_id')."'");
+                               }
                        }
  
***************
*** 238,242 ****
                        $setup_tpl->set_var('lang_cancel',lang('cancel'));
  
!                       $ConfigDomain = 
$GLOBALS['HTTP_COOKIE_VARS']['ConfigDomain'] ? 
$GLOBALS['HTTP_COOKIE_VARS']['ConfigDomain'] : $_POST['ConfigDomain'];
                        
$GLOBALS['phpgw_setup']->html->show_header("$stage_title",False,'config',$ConfigDomain
 . '(' . $phpgw_domain[$ConfigDomain]['db_type'] . ')');
                        $setup_tpl->pparse('out','T_lang_main');
--- 256,260 ----
                        $setup_tpl->set_var('lang_cancel',lang('cancel'));
  
!                       $ConfigDomain = $_COOKIE['ConfigDomain'] ? 
$_COOKIE['ConfigDomain'] : $_POST['ConfigDomain'];
                        
$GLOBALS['phpgw_setup']->html->show_header("$stage_title",False,'config',$ConfigDomain
 . '(' . $phpgw_domain[$ConfigDomain]['db_type'] . ')');
                        $setup_tpl->pparse('out','T_lang_main');





reply via email to

[Prev in Thread] Current Thread [Next in Thread]