Revision: 1222
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1222&view=rev
Author:   jberanek
Date:     2009-10-20 11:49:41 +0000 (Tue, 20 Oct 2009)

Log Message:
-----------
* Replaced all usage of ereg_replace() with calls to preg_replace() for
 consistency and because PHP 5.3 has deprecated the function.

Modified Paths:
--------------
    mrbs/trunk/web/auth_imap.inc
    mrbs/trunk/web/escapeshellarg.inc
    mrbs/trunk/web/month.php
    mrbs/trunk/web/session_cookie.inc
    mrbs/trunk/web/session_php.inc
    mrbs/trunk/web/week.php

Modified: mrbs/trunk/web/auth_imap.inc
===================================================================
--- mrbs/trunk/web/auth_imap.inc        2009-10-18 16:02:33 UTC (rev 1221)
+++ mrbs/trunk/web/auth_imap.inc        2009-10-20 11:49:41 UTC (rev 1222)
@@ -34,7 +34,7 @@
  */
 function quoteIMAP($str)
 {
-  return ereg_replace('(["\\])', '\\\\1', $str);
+  return preg_replace('/(["\\])/', '\\$1', $str);
 }
 
 /* authValidateUser($user, $pass)

Modified: mrbs/trunk/web/escapeshellarg.inc
===================================================================
--- mrbs/trunk/web/escapeshellarg.inc   2009-10-18 16:02:33 UTC (rev 1221)
+++ mrbs/trunk/web/escapeshellarg.inc   2009-10-20 11:49:41 UTC (rev 1222)
@@ -9,7 +9,7 @@
 
 function escapeshellarg($x)
 {
-  return "'".ereg_replace("'", "'\\''", $x)."'";
+  return "'".preg_replace("/'/", "\\'", $x)."'";
 } 
 
 ?>

Modified: mrbs/trunk/web/month.php
===================================================================
--- mrbs/trunk/web/month.php    2009-10-18 16:02:33 UTC (rev 1221)
+++ mrbs/trunk/web/month.php    2009-10-20 11:49:41 UTC (rev 1222)
@@ -286,7 +286,7 @@
 }
 
 // Used below: localized "all day" text but with non-breaking spaces:
-$all_day = ereg_replace(" ", " ", get_vocab("all_day"));
+$all_day = preg_replace("/ /", " ", get_vocab("all_day"));
 
 //Get all meetings for this month in the room that we care about
 // row[0] = Start time

Modified: mrbs/trunk/web/session_cookie.inc
===================================================================
--- mrbs/trunk/web/session_cookie.inc   2009-10-18 16:02:33 UTC (rev 1221)
+++ mrbs/trunk/web/session_cookie.inc   2009-10-20 11:49:41 UTC (rev 1222)
@@ -41,7 +41,8 @@
 else
 {
   $cookie_path = $PHP_SELF;
-  $cookie_path = ereg_replace('[^/]*$', '', $cookie_path);
+  // Strip off everything after the last '/' in $PHP_SELF
+  $cookie_path = preg_replace('/[^/]*$/', '', $cookie_path);
 }
 
 /* Delete old-style cookies */

Modified: mrbs/trunk/web/session_php.inc
===================================================================
--- mrbs/trunk/web/session_php.inc      2009-10-18 16:02:33 UTC (rev 1221)
+++ mrbs/trunk/web/session_php.inc      2009-10-20 11:49:41 UTC (rev 1222)
@@ -34,7 +34,8 @@
 else
 {
   $cookie_path = $PHP_SELF;
-  $cookie_path = ereg_replace('[^/]*$', '', $cookie_path);
+  // Strip off everything after the last '/' in $PHP_SELF
+  $cookie_path = preg_replace('/[^/]*$/', '', $cookie_path);
 }
 
 global $auth;

Modified: mrbs/trunk/web/week.php
===================================================================
--- mrbs/trunk/web/week.php     2009-10-18 16:02:33 UTC (rev 1221)
+++ mrbs/trunk/web/week.php     2009-10-20 11:49:41 UTC (rev 1222)
@@ -339,7 +339,7 @@
 // (ie replace the <br> with a space).   It looks slightly better
 if ($times_along_top)
 {
-  $dformat = ereg_replace("<br>", " ", $dformat);
+  $dformat = preg_replace("/<br>/", " ", $dformat);
 }
 
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to