phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] phpgwapi/inc/class.translation_sql.inc.php, 1.8.4.6.2


From: nomail
Subject: [Phpgroupware-cvs] phpgwapi/inc/class.translation_sql.inc.php, 1.8.4.6.2.2
Date: Thu, 30 Dec 2004 06:04:29 +0100

Update of /phpgwapi/inc
Modified Files:
        Branch: proposed-0_9_18-branch
          class.translation_sql.inc.php

date: 2004/12/30 05:04:29;  author: skwashd;  state: Exp;  lines: +9 -3

Log Message:
patch #3549 - untested
=====================================================================
Index: phpgwapi/inc/class.translation_sql.inc.php
diff -u phpgwapi/inc/class.translation_sql.inc.php:1.8.4.6.2.1 
phpgwapi/inc/class.translation_sql.inc.php:1.8.4.6.2.2
--- phpgwapi/inc/class.translation_sql.inc.php:1.8.4.6.2.1      Thu Dec 30 
04:51:47 2004
+++ phpgwapi/inc/class.translation_sql.inc.php  Thu Dec 30 05:04:29 2004
@@ -35,9 +35,14 @@
                        // php-nuke and postnuke are using $GLOBALS['lang'] too
                        // as string
                        // this makes many problems
-                       if (!isset($GLOBALS['lang']) || !$GLOBALS['lang'] || 
!is_array($GLOBALS['lang']))
+                       if ( !is_array($GLOBALS['lang']) ) //This should avoid 
problems for php-nuke & postnuke I guess (Caeies)
                        {
                                $GLOBALS['lang'] = array();
+                       }
+                       
if(!array_key_exists(strtolower(trim(substr($key,0,MAX_MESSAGE_ID_LENGTH))),$GLOBALS['lang']))
 //Using array_key_exists permits empty string ... Ugly but ... (Caeies)
+//                     if (!isset($GLOBALS['lang']) || !$GLOBALS['lang'] || 
!is_array($GLOBALS['lang']))
+                       {
+//                             $GLOBALS['lang'] =  array();
         if 
(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['lang']) &&
                                        
$GLOBALS['phpgw_info']['user']['preferences']['common']['lang'])
                                {
@@ -48,7 +53,8 @@
                                        $userlang = 'en';
                                }
                                $sql = "select message_id,content from 
phpgw_lang where lang = '".$userlang."' ".
-                                       "and (app_name = 
'".$GLOBALS['phpgw_info']['flags']['currentapp']."' or app_name = 'common' or 
app_name = 'all')";
+                                       "and message_id = 
'".$GLOBALS['phpgw']->db->db_addslashes($key)."' or message_id = 'charset' and 
(app_name = '".$GLOBALS['phpgw_info']['flags']['currentapp']."' or app_name = 
'common' or app_name = 'all')";
+                       //              "and (app_name = 
'".$GLOBALS['phpgw_info']['flags']['currentapp']."' or app_name = 'common' or 
app_name = 'all')";
 
                                if (strcasecmp 
($GLOBALS['phpgw_info']['flags']['currentapp'], 'common')>0)
                                {




reply via email to

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