Fixed bug #9994: ereg* is deprecated in PHP 5.3 alpha3
[Packages/TYPO3.CMS.git] / typo3 / alt_clickmenu.php
index f4b1455..5502783 100644 (file)
@@ -1283,9 +1283,9 @@ class clickMenu {
                                        </tr>';
                        } else {        // Just make normal element:
                                $onClick=$i[3];
-                               $onClick=eregi_replace('return[[:space:]]+hideCM\(\)[[:space:]]*;','',$onClick);
-                               $onClick=eregi_replace('return[[:space:]]+false[[:space:]]*;','',$onClick);
-                               $onClick=eregi_replace('hideCM\(\);','',$onClick);
+                               $onClick=preg_replace('/return[[:space:]]+hideCM\(\)[[:space:]]*;/i','',$onClick);
+                               $onClick=preg_replace('/return[[:space:]]+false[[:space:]]*;/i','',$onClick);
+                               $onClick=preg_replace('/hideCM\(\);/i','',$onClick);
                                if (!$i[5])     $onClick.='Clickmenu.hideAll();';
 
                                if ($GLOBALS['TYPO3_CONF_VARS']['BE']['useOnContextMenuHandler'])   {