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


From: Dave Hall
Subject: [Phpgroupware-cvs] phpgwapi/inc class.translation_sql.inc.php
Date: Sun, 16 Jul 2006 14:37:23 +0000

CVSROOT:        /cvsroot/phpgwapi
Module name:    phpgwapi
Changes by:     Dave Hall <skwashd>     06/07/16 14:37:23

Modified files:
        inc            : class.translation_sql.inc.php 

Log message:
        fix array_key_exists warning

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/class.translation_sql.inc.php?cvsroot=phpgwapi&r1=1.23&r2=1.24

Patches:
Index: class.translation_sql.inc.php
===================================================================
RCS file: /cvsroot/phpgwapi/phpgwapi/inc/class.translation_sql.inc.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- class.translation_sql.inc.php       5 Jul 2006 13:12:40 -0000       1.23
+++ class.translation_sql.inc.php       16 Jul 2006 14:37:23 -0000      1.24
@@ -7,7 +7,7 @@
        * @license http://www.fsf.org/licenses/lgpl.html GNU Lesser General 
Public License
        * @package phpgwapi
        * @subpackage application
-       * @version $Id: class.translation_sql.inc.php,v 1.23 2006/07/05 
13:12:40 sigurdne Exp $
+       * @version $Id: class.translation_sql.inc.php,v 1.24 2006/07/16 
14:37:23 skwashd Exp $
        */
 
        /**
@@ -95,10 +95,10 @@
                                $userlang = 'en';
                        }
 
-                       
if(!array_key_exists(strtolower(trim(substr($key,0,MAX_MESSAGE_ID_LENGTH))),$GLOBALS['lang'])
 && !$this->loaded_from_shm) //Using array_key_exists permits empty string ... 
Ugly but ... (Caeies)
+                       if(!is_array($GLOBALS['lang']) || 
(!array_key_exists(strtolower(trim(substr($key,0,MAX_MESSAGE_ID_LENGTH))),$GLOBALS['lang'])
 && !$this->loaded_from_shm) ) //Using array_key_exists permits empty string 
... Ugly but ... (Caeies)
                        {
-                               $sql = "select message_id,content from 
phpgw_lang where lang = '".$userlang."' ".
-                                       "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')";
+                               $sql = "SELECT message_id,content FROM 
phpgw_lang WHERE lang = '".$userlang."' ".
+                                       "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]