PMA_mysqlDie(): cleanup, make use of PMA_getIcon() and better use of PMA_generate_common_url()
This commit is contained in:
@@ -550,21 +550,25 @@ function PMA_mysqlDie($error_message = '', $the_query = '',
|
|||||||
if (strstr(strtolower($formatted_sql), 'select')) { // please show me help to the error on select
|
if (strstr(strtolower($formatted_sql), 'select')) { // please show me help to the error on select
|
||||||
echo PMA_showMySQLDocu('SQL-Syntax', 'SELECT');
|
echo PMA_showMySQLDocu('SQL-Syntax', 'SELECT');
|
||||||
}
|
}
|
||||||
if ($is_modify_link && strlen($db)) {
|
if ($is_modify_link) {
|
||||||
|
$_url_params = array(
|
||||||
|
'sql_query' => $the_query,
|
||||||
|
'show_query' => 1,
|
||||||
|
);
|
||||||
if (strlen($table)) {
|
if (strlen($table)) {
|
||||||
$doedit_goto = '<a href="tbl_sql.php?' . PMA_generate_common_url($db, $table) . '&sql_query=' . urlencode($the_query) . '&show_query=1">';
|
$_url_params['db'] = $db;
|
||||||
|
$_url_params['table'] = $table;
|
||||||
|
$doedit_goto = '<a href="tbl_sql.php?' . PMA_generate_common_url($_url_params) . '">';
|
||||||
|
} elseif (strlen($db)) {
|
||||||
|
$_url_params['db'] = $db;
|
||||||
|
$doedit_goto = '<a href="db_sql.php?' . PMA_generate_common_url($_url_params) . '">';
|
||||||
} else {
|
} else {
|
||||||
$doedit_goto = '<a href="db_sql.php?' . PMA_generate_common_url($db) . '&sql_query=' . urlencode($the_query) . '&show_query=1">';
|
$doedit_goto = '<a href="server_sql.php?' . PMA_generate_common_url($_url_params) . '">';
|
||||||
}
|
}
|
||||||
if ($GLOBALS['cfg']['PropertiesIconic']) {
|
|
||||||
echo $doedit_goto
|
echo $doedit_goto
|
||||||
. '<img class="icon" src=" '. $GLOBALS['pmaThemeImage'] . 'b_edit.png" width="16" height="16" alt="' . $GLOBALS['strEdit'] .'" />'
|
. PMA_getIcon('b_edit.png', $GLOBALS['strEdit'])
|
||||||
. '</a>';
|
. '</a>';
|
||||||
} else {
|
|
||||||
echo ' ['
|
|
||||||
. $doedit_goto . $GLOBALS['strEdit'] . '</a>'
|
|
||||||
. ']' . "\n";
|
|
||||||
}
|
|
||||||
} // end if
|
} // end if
|
||||||
echo ' </p>' . "\n"
|
echo ' </p>' . "\n"
|
||||||
.' <p>' . "\n"
|
.' <p>' . "\n"
|
||||||
@@ -600,14 +604,18 @@ function PMA_mysqlDie($error_message = '', $the_query = '',
|
|||||||
. $error_message . "\n"
|
. $error_message . "\n"
|
||||||
. '</code><br />' . "\n";
|
. '</code><br />' . "\n";
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
echo '<fieldset class="tblFooters">';
|
|
||||||
|
|
||||||
if (!empty($back_url) && $exit) {
|
|
||||||
$goto_back_url='<a href="' . (strstr($back_url, '?') ? $back_url . '&no_history=true' : $back_url . '?no_history=true') . '">';
|
|
||||||
echo '[ ' . $goto_back_url . $GLOBALS['strBack'] . '</a> ]';
|
|
||||||
}
|
|
||||||
echo ' </fieldset>' . "\n\n";
|
|
||||||
if ($exit) {
|
if ($exit) {
|
||||||
|
if (! empty($back_url)) {
|
||||||
|
if (strstr($back_url, '?')) {
|
||||||
|
$back_url .= '&no_history=true';
|
||||||
|
} else {
|
||||||
|
$back_url .= '?no_history=true';
|
||||||
|
}
|
||||||
|
echo '<fieldset class="tblFooters">';
|
||||||
|
echo '[ <a href="' . $back_url . '">' . $GLOBALS['strBack'] . '</a> ]';
|
||||||
|
echo '</fieldset>' . "\n\n";
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* display footer and exit
|
* display footer and exit
|
||||||
*/
|
*/
|
||||||
@@ -615,6 +623,7 @@ function PMA_mysqlDie($error_message = '', $the_query = '',
|
|||||||
}
|
}
|
||||||
} // end of the 'PMA_mysqlDie()' function
|
} // end of the 'PMA_mysqlDie()' function
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a string formatted with CONVERT ... USING
|
* Returns a string formatted with CONVERT ... USING
|
||||||
* if MySQL supports it
|
* if MySQL supports it
|
||||||
|
Reference in New Issue
Block a user