Revision
2823
Author
cimorrison
Date
2014-03-07 11:10:15 +0000 (Fri, 07 Mar 2014)

Log Message

Converted a few substr() and strlen() calls to their utf8_ equivalents for good measure

Modified Paths

Diff

Modified: mrbs/trunk/web/functions.inc (2822 => 2823)


--- mrbs/trunk/web/functions.inc	2014-03-03 17:38:31 UTC (rev 2822)
+++ mrbs/trunk/web/functions.inc	2014-03-07 11:10:15 UTC (rev 2823)
@@ -2518,7 +2518,7 @@
   }
   elseif (strpos($_SERVER['SERVER_NAME'], 'www.') === 0)
   {
-    $uid .= substr($_SERVER['SERVER_NAME'], 4);
+    $uid .= utf8_substr($_SERVER['SERVER_NAME'], 4);
   }
   else
   {

Modified: mrbs/trunk/web/functions_mail.inc (2822 => 2823)


--- mrbs/trunk/web/functions_mail.inc	2014-03-03 17:38:31 UTC (rev 2822)
+++ mrbs/trunk/web/functions_mail.inc	2014-03-07 11:10:15 UTC (rev 2823)
@@ -66,7 +66,7 @@
 {
   global $mail_vocab, $db_tbl_prefix;
   
-  $tag = substr($table, strlen($db_tbl_prefix));  // strip the prefix off the table name
+  $tag = utf8_substr($table, utf8_strlen($db_tbl_prefix));  // strip the prefix off the table name
   $tag .= "." . $name;           // add on the fieldname
   // then if there's a string in the vocab array for $tag use that
   // otherwise just use the fieldname

Modified: mrbs/trunk/web/language.inc (2822 => 2823)


--- mrbs/trunk/web/language.inc	2014-03-03 17:38:31 UTC (rev 2822)
+++ mrbs/trunk/web/language.inc	2014-03-07 11:10:15 UTC (rev 2823)
@@ -1114,7 +1114,7 @@
 {
   global $vocab, $db_tbl_prefix;
   
-  $tag = substr($table, strlen($db_tbl_prefix));  // strip the prefix off the table name
+  $tag = utf8_substr($table, utf8_strlen($db_tbl_prefix));  // strip the prefix off the table name
   $tag .= "." . $name;           // add on the fieldname
   // then if there's a string in the vocab array for $tag use that
   // otherwise just use the fieldname

Modified: mrbs/trunk/web/mrbs_sql.inc (2822 => 2823)


--- mrbs/trunk/web/mrbs_sql.inc	2014-03-03 17:38:31 UTC (rev 2822)
+++ mrbs/trunk/web/mrbs_sql.inc	2014-03-07 11:10:15 UTC (rev 2823)
@@ -491,7 +491,7 @@
   
   $sql_col = array();
   $sql_val = array();
-  $table_no_prefix = substr($table, strlen($db_tbl_prefix));  // strip the prefix off the table name
+  $table_no_prefix = utf8_substr($table, utf8_strlen($db_tbl_prefix));  // strip the prefix off the table name
     
   $fields = sql_field_info($table);