remove high-ascii characters, and an assignment syntax that does not work on PHP 5.1.2

This commit is contained in:
Marc Delisle
2006-01-12 20:55:46 +00:00
parent 723ae0364a
commit 7ceba19cb8
2 changed files with 11 additions and 3 deletions

View File

@@ -7,6 +7,8 @@ $Source$
2006-01-12 Marc Delisle <lem9@users.sourceforge.net> 2006-01-12 Marc Delisle <lem9@users.sourceforge.net>
* Documentation.html: typo, thanks to Cédric Corazza * Documentation.html: typo, thanks to Cédric Corazza
* libraries/common.lib.php: remove high-ascii characters, and an
assignment syntax that does not work on PHP 5.1.2
2006-01-11 Marc Delisle <lem9@users.sourceforge.net> 2006-01-11 Marc Delisle <lem9@users.sourceforge.net>
* sql.php, libraries/sqlparser.lib.php: other fixes for bug #1394479 * sql.php, libraries/sqlparser.lib.php: other fixes for bug #1394479

View File

@@ -849,15 +849,21 @@ if (!defined('PMA_MINIMUM_COMMON')) {
// get the duplicate entry // get the duplicate entry
// get table name // get table name
preg_match('<27>ALTER\sTABLE\s\`([^\`]+)\`<60>iu', $the_query, $error_table = array()); // TODO: what would be the best delimiter, while avoiding
// special characters that can become high-ascii after editing,
// depending upon which editor is used by the developer?
$error_table = array();
preg_match('@ALTER\sTABLE\s\`([^\`]+)\`@iu', $the_query, $error_table);
$error_table = $error_table[1]; $error_table = $error_table[1];
// get fields // get fields
preg_match('<27>\(([^\)]+)\)<29>i', $the_query, $error_fields = array()); $error_fields = array();
preg_match('@\(([^\)]+)\)@i', $the_query, $error_fields);
$error_fields = explode(',', $error_fields[1]); $error_fields = explode(',', $error_fields[1]);
// duplicate value // duplicate value
preg_match('<27>\'([^\']+)\'<27>i', $tmp_mysql_error, $duplicate_value = array()); $duplicate_value = array();
preg_match('@\'([^\']+)\'@i', $tmp_mysql_error, $duplicate_value);
$duplicate_value = $duplicate_value[1]; $duplicate_value = $duplicate_value[1];
$sql = ' $sql = '