Jeremy Newman : fix depreciated functions

Jeremy Newman jnewman at winehq.org
Thu Apr 12 14:53:42 CDT 2012


Module: website
Branch: master
Commit: ae633661dd32b7367cebfde9d98880dbf414e685
URL:    http://source.winehq.org/git/website.git/?a=commit;h=ae633661dd32b7367cebfde9d98880dbf414e685

Author: Jeremy Newman <jnewman at codeweavers.com>
Date:   Thu Apr 12 14:27:32 2012 -0500

fix depreciated functions

---

 include/plugins/announce.php |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/plugins/announce.php b/include/plugins/announce.php
index 3f0f0fd..6faaae2 100644
--- a/include/plugins/announce.php
+++ b/include/plugins/announce.php
@@ -22,24 +22,24 @@ if ($arr = file($announce))
     {
         $arr[$c] = $html->urlify($arr[$c]);
 
-        if (ereg("^--------------------", $arr[$c])) $in_header = 0;
-        else if (ereg("^Bugs fixed", $arr[$c])) $in_bugs = 1;
-        else if (ereg("^Changes since", $arr[$c]))
+        if (preg_match("/^--------------------/", $arr[$c])) $in_header = 0;
+        else if (preg_match("/^Bugs fixed/", $arr[$c])) $in_bugs = 1;
+        else if (preg_match("/^Changes since/", $arr[$c]))
         {
             // Link to previous versions in changes
             $in_bugs = 0;
-            $arr[$c] = ereg_replace( '[[:digit:].]+(-rc[[:digit:]]+)?', '<a title="Changes since \\0" href="./\\0">\\0</a>', $arr[$c] );
+            $arr[$c] = preg_replace( '/[[:digit:].]+(-rc[[:digit:]]+)?/', '<a title="Changes since \\0" href="./\\0">\\0</a>', $arr[$c] );
         }
 
         if ($in_header)
         {
-            $arr[$c] = ereg_replace("AUTHORS",
+            $arr[$c] = preg_replace("/AUTHORS/",
                                     "<a href=\"".$config->git_tree."/wine.git/".$tag.":\\0\">\\0</a>",
                                     $arr[$c]);
         }           
         else if ($in_bugs)
         {
-            $arr[$c] = ereg_replace("^( +)([0-9]+)",
+            $arr[$c] = preg_replace("^/( +)([0-9]+)/",
                                     "\\1<a href=\"".$config->bug_system."\\2\">\\2</a>",
                                     $arr[$c]);
         }




More information about the wine-cvs mailing list