The branch, master has been updated
via c1be602a1edf316ce75234cdca36c4a60ba16aa3 (commit)
via 20d4c3a894a70850b9bcac57a3d63af68d40ec2e (commit)
from 638fe75a8b36df3049d4cc1dec7e734c71feff6c (commit)
- Log -----------------------------------------------------------------
commit c1be602a1edf316ce75234cdca36c4a60ba16aa3
Merge: 638fe75a8b36df3049d4cc1dec7e734c71feff6c 20d4c3a894a70850b9bcac57a3d63af68d40ec2e
Author: Marc Delisle <marc(a)infomarc.info>
Date: Thu Jul 8 07:52:47 2010 -0400
fix merge conflicts
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 1 +
db_structure.php | 4 ++--
libraries/import.lib.php | 18 +++++++++---------
3 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 61d2c52..867bebf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -96,6 +96,7 @@ $Id$
- bug [js] Avoid loading twice a js file
- bug #3024344 [setup] Setup forces numeric MemoryLimit
- bug #3025975 [auth] Odd LoginCookieValidity default value
+- bug #3026400 [PHP] ereg functions are deprecated
3.3.4.0 (2010-06-28)
- bug #2996161 [import] properly escape import value
diff --git a/db_structure.php b/db_structure.php
index 65b78b7..90b7824 100644
--- a/db_structure.php
+++ b/db_structure.php
@@ -361,7 +361,7 @@ foreach ($tables as $keyname => $each_table) {
$do = true;
}
foreach ($server_slave_Wild_Do_Table as $table) {
- if (($db == PMA_replication_strout($table)) && (ereg("^".substr(PMA_replication_strout($table, true), 0, strlen(PMA_replication_strout($table, true))-1), $truename)))
+ if (($db == PMA_replication_strout($table)) && (preg_match("@^" . substr(PMA_replication_strout($table, true), 0, strlen(PMA_replication_strout($table, true)) - 1) . "@", $truename)))
$do = true;
}
////////////////////////////////////////////////////////////////////
@@ -369,7 +369,7 @@ foreach ($tables as $keyname => $each_table) {
$ignored = true;
}
foreach ($server_slave_Wild_Ignore_Table as $table) {
- if (($db == PMA_replication_strout($table)) && (ereg("^".substr(PMA_replication_strout($table, true), 0, strlen(PMA_replication_strout($table, true))-1), $truename)))
+ if (($db == PMA_replication_strout($table)) && (preg_match("@^" . substr(PMA_replication_strout($table, true), 0, strlen(PMA_replication_strout($table, true)) - 1) . "@", $truename)))
$ignored = true;
}
}/* elseif ($server_master_status) {
diff --git a/libraries/import.lib.php b/libraries/import.lib.php
index 2b5d80b..e012287 100644
--- a/libraries/import.lib.php
+++ b/libraries/import.lib.php
@@ -831,8 +831,8 @@ $import_notice = NULL;
* @uses SIZES
* @uses strcmp()
* @uses count()
- * @uses ereg()
- * @uses ereg_replace()
+ * @uses preg_match()
+ * @uses preg_replace()
* @uses PMA_isView()
* @uses PMA_backquote()
* @uses PMA_importRunQuery()
@@ -903,17 +903,17 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = NULL, &$additional_sql =
*
* $pattern = 'CREATE (TABLE|VIEW|TRIGGER|FUNCTION|PROCEDURE)';
*/
- $pattern = 'CREATE .*(TABLE)';
+ $pattern = '/CREATE .*(TABLE)/';
$replacement = 'CREATE \\1 IF NOT EXISTS';
/* Change CREATE statements to CREATE IF NOT EXISTS to support inserting into existing structures */
for ($i = 0; $i < $additional_sql_len; ++$i) {
- $additional_sql[$i] = ereg_replace($pattern, $replacement, $additional_sql[$i]);
+ $additional_sql[$i] = preg_replace($pattern, $replacement, $additional_sql[$i]);
/* Execute the resulting statements */
PMA_importRunQuery($additional_sql[$i], $additional_sql[$i]);
}
}
-
+
if ($analyses != NULL) {
$type_array = array(NONE => "NULL", VARCHAR => "varchar", INT => "int", DECIMAL => "decimal");
@@ -1038,8 +1038,8 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = NULL, &$additional_sql =
/* Add the viewable structures from $additional_sql to $tables so they are also displayed */
- $view_pattern = 'VIEW `[^`]+`\.`([^`]+)';
- $table_pattern = 'CREATE TABLE IF NOT EXISTS `([^`]+)`';
+ $view_pattern = '@VIEW `[^`]+`\.`([^`]+)@';
+ $table_pattern = '@CREATE TABLE IF NOT EXISTS `([^`]+)`@';
/* Check a third pattern to make sure its not a "USE `db_name`;" statement */
$regs = array();
@@ -1048,10 +1048,10 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = NULL, &$additional_sql =
$additional_sql_len = count($additional_sql);
for ($i = 0; $i < $additional_sql_len; ++$i) {
- ereg($view_pattern, $additional_sql[$i], $regs);
+ preg_match($view_pattern, $additional_sql[$i], $regs);
if (count($regs) == 0) {
- ereg($table_pattern, $additional_sql[$i], $regs);
+ preg_match($table_pattern, $additional_sql[$i], $regs);
}
if (count($regs)) {
hooks/post-receive
--
phpMyAdmin