phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: phpgwapi/inc class.translation_sql.inc.php,1.8,


From: Ralf Becker <address@hidden>
Subject: [Phpgroupware-cvs] CVS: phpgwapi/inc class.translation_sql.inc.php,1.8,1.8.4.1
Date: Mon, 31 Mar 2003 15:41:03 -0500

Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv17530

Modified Files:
      Tag: Version-0_9_16-branch
        class.translation_sql.inc.php 
Log Message:
limited the length of the message_id to 230 and defined a constant for it

Index: class.translation_sql.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.translation_sql.inc.php,v
retrieving revision 1.8
retrieving revision 1.8.4.1
diff -C2 -r1.8 -r1.8.4.1
*** class.translation_sql.inc.php       23 Nov 2001 19:35:45 -0000      1.8
--- class.translation_sql.inc.php       31 Mar 2003 20:41:01 -0000      1.8.4.1
***************
*** 25,28 ****
--- 25,32 ----
    /* $Id$ */
  
+       // define the maximal length of a message_id, all message_ids have to 
be unique 
+       // in this length, our column is varchar 255, but addslashes might add 
some length
+       define('MAX_MESSAGE_ID_LENGTH',230);    
+       
        class translation
        {
***************
*** 71,74 ****
--- 75,81 ----
                                }
                        }
+                       $ret = $key;    // save key if we dont find a 
translation
+                       $key = substr($key,0,MAX_MESSAGE_ID_LENGTH);
+ 
                        if (isset($GLOBALS['lang'][strtolower ($key)]) && 
$GLOBALS['lang'][strtolower ($key)])
                        {
***************
*** 77,81 ****
                        else
                        {
!                               $ret = $key . '*';
                        }
                        $ndx = 1;
--- 84,88 ----
                        else
                        {
!                               $ret .= '*';
                        }
                        $ndx = 1;





reply via email to

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