r94525 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94524‎ | r94525 | r94526 >
Date:16:36, 15 August 2011
Author:maxsem
Status:ok
Tags:
Comment:
ereg() is deprecated
Modified paths:
  • /trunk/extensions/wikihiero/wh_main.php (modified) (history)

Diff [purge]

Index: trunk/extensions/wikihiero/wh_main.php
@@ -810,7 +810,7 @@
811811 $block[$block_id][$item_id] = $hiero[$char];
812812 $type = WH_TYPE_END;
813813
814 - } elseif(ereg("[*:()]", $hiero[$char])) {
 814+ } elseif(preg_match("/[*:()]/", $hiero[$char])) {
815815
816816 if($type == WH_TYPE_GLYPH || $type == WH_TYPE_CODE) {
817817 $item_id++;
@@ -884,7 +884,7 @@
885885 // convert all code into '&' to test prefabs glyph
886886 $temp = "";
887887 foreach($code as $t) {
888 - if(ereg("[*:!()]", $t[0])) {
 888+ if(preg_match("/[*:!()]/", $t[0])) {
889889 $temp .= "&";
890890 } else {
891891 $temp .= $t;

Status & tagging log