Use alternate bookmark-rewriting for lower PHP4 versions. May produce unexpected results, though. We should think about putting a warning string into the SQL query? This would introduce a new language variable, so I didn't do that yet.
This commit is contained in:
@@ -6,6 +6,10 @@ $Id$
|
|||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
2003-07-18 Garvin Hicking <me@supergarv.de>
|
2003-07-18 Garvin Hicking <me@supergarv.de>
|
||||||
|
* read_dump.php3: When PHP3 < 4.3.0 is detected, try an alternative
|
||||||
|
way of rewriting bookmark variables.
|
||||||
|
* Documentation.html: Bookmark variable expansion only works with PHP
|
||||||
|
4.3.0 and above
|
||||||
* tbl_query_box.php3: For the querywindow - if no items are available
|
* tbl_query_box.php3: For the querywindow - if no items are available
|
||||||
for the 'file import' tab, hide the 'Go' button and instead display
|
for the 'file import' tab, hide the 'Go' button and instead display
|
||||||
a warning message. Can happen if you don't have $cfg['UploadDir']
|
a warning message. Can happen if you don't have $cfg['UploadDir']
|
||||||
|
@@ -52,7 +52,11 @@ if (!empty($id_bookmark)) {
|
|||||||
case 0: // bookmarked query that have to be run
|
case 0: // bookmarked query that have to be run
|
||||||
$sql_query = PMA_queryBookmarks($db, $cfg['Bookmark'], $id_bookmark);
|
$sql_query = PMA_queryBookmarks($db, $cfg['Bookmark'], $id_bookmark);
|
||||||
if (isset($bookmark_variable) && !empty($bookmark_variable)) {
|
if (isset($bookmark_variable) && !empty($bookmark_variable)) {
|
||||||
$sql_query = preg_replace('|/\*(.*)\[VARIABLE\](.*)\*/|imsU', '${1}' . PMA_sqlAddslashes($bookmark_variable) . '${2}', $sql_query);
|
if (PMA_PHP_INT_VERSION >= 40300) {
|
||||||
|
$sql_query = preg_replace('|/\*(.*)\[VARIABLE\](.*)\*/|imsU', '${1}' . PMA_sqlAddslashes($bookmark_variable) . '${2}', $sql_query);
|
||||||
|
} else {
|
||||||
|
$sql_query = preg_replace('|/\*(.*)\[VARIABLE\](.*)\*/|imsU', '\1 ' . PMA_sqlAddslashes($bookmark_variable) . '\2', $sql_query);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1: // bookmarked query that have to be displayed
|
case 1: // bookmarked query that have to be displayed
|
||||||
|
Reference in New Issue
Block a user