Module: appdb Branch: master Commit: ba9f80fe7c014fcbefb7fdbd9d6a77bbd0289b77 URL: https://source.winehq.org/git/appdb.git/?a=commit;h=ba9f80fe7c014fcbefb7fdbd...
Author: Jeremy Newman jnewman@codeweavers.com Date: Mon Oct 7 09:22:38 2019 -0500
fix outdated ereg() calls
---
include/tableve.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/include/tableve.php b/include/tableve.php index f9828c6..4ca7c36 100644 --- a/include/tableve.php +++ b/include/tableve.php @@ -100,7 +100,7 @@ class TableVE { { $field = query_fetch_field($hResult, $i);
- if(ereg("^impl_(.+)$", $field->table, $arr)) + if(preg_match("/^impl_(.+)$/", $field->table, $arr)) { if($cur_impl != $arr[1]) echo "<tr><th class='box-label' colspan=2> ".ucfirst($arr[1])." Implementation </th></tr>\n"; @@ -154,7 +154,7 @@ class TableVE { $field = query_fetch_field($hResult, $i); $len = query_field_len($hResult, $i);
- if(ereg("^impl_(.+)$", $field->table, $arr)) + if(preg_match("/^impl_(.+)$/", $field->table, $arr)) { if($cur_impl != $arr[1]) echo "<tr><th class='box-label' colspan=2> ".ucfirst($arr[1])." Implementation </th></tr>\n"; @@ -339,11 +339,8 @@ class TableVE { reset($this->table_ids); foreach ($this->table_ids as $table => $id) { - $r = "^$table$"; - //echo "Checking $r against $name <br>\n"; - if(ereg($r, $name)) + if(preg_match("/^$table$/", $name)) { - //echo "ID for $name -> $id <br>\n"; return $id; } } @@ -363,7 +360,7 @@ class TableVE {
foreach ($vars as $varname => $arr) { - if(!ereg("^FIELD_([a-zA-Z_]+)___(.+)$", $varname, $regs)) + if(!preg_match("/^FIELD_([a-zA-Z_]+)___(.+)$/", $varname, $regs)) continue;
$tables[$regs[1]][] = $regs[2]; @@ -424,7 +421,7 @@ class TableVE { addmsg("Database Operation Complete!","green"); }
- if(ereg("^impl_.+$", $table)) + if(preg_match("/^impl_.+$/", $table)) { $value = $fieldnames["apiid"][$i]; query_parameters("UPDATE ? SET lastmodby = '?' WHERE apiid = '?'",