Module: appdb Branch: master Commit: 8b0a6b6198ba673d1e468cb9aecfe51ec92f9fe7 URL: http://source.winehq.org/git/appdb.git/?a=commit;h=8b0a6b6198ba673d1e468cb9a...
Author: Alexander Nicolaysen Sørnes alexsornes@gmail.com Date: Sun Jan 12 17:52:28 2014 +0100
help: Replace ereg with preg_match
---
help/index.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/help/index.php b/help/index.php index f366671..ded67c0 100644 --- a/help/index.php +++ b/help/index.php @@ -42,10 +42,10 @@ function display_index () // display dir while (list($key,$file) = each($files)) { - if(!ereg("(.+)\.help$", $file, $arr)) + if(!preg_match("(([^.]+).help)", $file, $aMatches)) continue;
- $id = $arr[1]; + $id = $aMatches[1]; $title = get_help_title("$help_path/$file");
echo " <li> <a href="".BASE."help?sTopic=$id" style="cursor: help"> $title </a><p /></li>\n"; @@ -95,9 +95,9 @@ function get_help_title ($file)
$line = trim($line);
- if(eregi("^<!--TITLE: (.+)-->$", $line, $arr)) + if(preg_match("/^<!--TITLE: (.+)-->$/i", $line, $aMatches)) { - return $arr[1]; + return $aMatches[1]; } return "Internal Error: missing title"; }