make use of new second PMA_showMessage() parameter
This commit is contained in:
@@ -5,15 +5,14 @@ phpMyAdmin - ChangeLog
|
||||
$Id$
|
||||
$HeadURL$
|
||||
|
||||
2006-12-19 Sebastian Mendel <cybot_tm@users.sourceforge.net>
|
||||
* libarsies/common.lib.php::PMA_showMessage():
|
||||
added second optional parameter: $sql_query
|
||||
|
||||
2006-12-19 Sebastian Mendel <cybot_tm@users.sourceforge.net>
|
||||
* tbl_change.php, tbl_replace.php, include/tbl_replace_fields.inc.php:
|
||||
refactored: made register_globals independent; added documentation;
|
||||
removed unused code; fixed bug #1597686 last insert id message wrong;
|
||||
much more i don't remember ...
|
||||
* libarsies/common.lib.php::PMA_showMessage():
|
||||
added second optional parameter: $sql_query
|
||||
* tbl_change.php: make use of new second PMA_showMessage() parameter
|
||||
|
||||
2006-12-15 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* Documentation.html, libraries/common.lib.php, config.default.php:
|
||||
|
@@ -49,32 +49,11 @@ require_once './libraries/file_listing.php'; // file listing
|
||||
/**
|
||||
* Displays the query submitted and its result
|
||||
*/
|
||||
if (!empty($disp_message)) {
|
||||
if (isset($goto)) {
|
||||
$goto_cpy = $goto;
|
||||
$goto = 'tbl_sql.php?'
|
||||
. PMA_generate_common_url($db, $table)
|
||||
. '&$show_query=1'
|
||||
. '&sql_query=' . (isset($disp_query) ? urlencode($disp_query) : '');
|
||||
} else {
|
||||
$show_query = '1';
|
||||
}
|
||||
if (isset($sql_query)) {
|
||||
$sql_query_cpy = $sql_query;
|
||||
unset($sql_query);
|
||||
}
|
||||
if (isset($disp_query)) {
|
||||
$sql_query = $disp_query;
|
||||
}
|
||||
PMA_showMessage($disp_message);
|
||||
if (isset($goto_cpy)) {
|
||||
$goto = $goto_cpy;
|
||||
unset($goto_cpy);
|
||||
}
|
||||
if (isset($sql_query_cpy)) {
|
||||
$sql_query = $sql_query_cpy;
|
||||
unset($sql_query_cpy);
|
||||
if (! empty($disp_message)) {
|
||||
if (! isset($disp_query)) {
|
||||
$disp_query = null;
|
||||
}
|
||||
PMA_showMessage($disp_message, $disp_query);
|
||||
}
|
||||
|
||||
|
||||
@@ -156,38 +135,21 @@ if (isset($primary_key)) {
|
||||
$row = array();
|
||||
$result = array();
|
||||
foreach ($primary_key_array as $rowcount => $primary_key) {
|
||||
$local_query = 'SELECT * FROM ' . PMA_backquote($table) . ' WHERE ' . $primary_key . ';';
|
||||
$local_query = 'SELECT * FROM ' . PMA_backquote($db) . '.' . PMA_backquote($table) . ' WHERE ' . $primary_key . ';';
|
||||
$result[$rowcount] = PMA_DBI_query($local_query, null, PMA_DBI_QUERY_STORE);
|
||||
$row[$rowcount] = PMA_DBI_fetch_assoc($result[$rowcount]);
|
||||
$primary_keys[$rowcount] = $primary_key;
|
||||
|
||||
// No row returned
|
||||
if (!$row[$rowcount]) {
|
||||
unset($row[$rowcount]);
|
||||
unset($primary_key_array[$rowcount]);
|
||||
$goto_cpy = $goto;
|
||||
$goto = 'tbl_sql.php?'
|
||||
. PMA_generate_common_url($db, $table)
|
||||
. '&$show_query=1'
|
||||
. '&sql_query=' . urlencode($local_query);
|
||||
if (isset($sql_query)) {
|
||||
$sql_query_cpy = $sql_query;
|
||||
unset($sql_query);
|
||||
}
|
||||
$sql_query = $local_query;
|
||||
PMA_showMessage($strEmptyResultSet);
|
||||
$goto = $goto_cpy;
|
||||
unset($goto_cpy);
|
||||
if (isset($sql_query_cpy)) {
|
||||
$sql_query = $sql_query_cpy;
|
||||
unset($sql_query_cpy);
|
||||
}
|
||||
unset($row[$rowcount], $primary_key_array[$rowcount]);
|
||||
PMA_showMessage($strEmptyResultSet, $local_query);
|
||||
echo "\n";
|
||||
require_once './libraries/footer.inc.php';
|
||||
} // end if (no record returned)
|
||||
}
|
||||
} else {
|
||||
$result = PMA_DBI_query('SELECT * FROM ' . PMA_backquote($table) . ' LIMIT 1;', null, PMA_DBI_QUERY_STORE);
|
||||
$result = PMA_DBI_query('SELECT * FROM ' . PMA_backquote($db) . '.' . PMA_backquote($table) . ' LIMIT 1;', null, PMA_DBI_QUERY_STORE);
|
||||
unset($row);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user