make use of PMA_Message
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @todo make use of PMA_Message and PMA_Error
|
||||
*/
|
||||
class PMA_Table {
|
||||
|
||||
|
@@ -51,7 +51,7 @@ if (isset($submitcollation) && !empty($db_collation)) {
|
||||
list($db_charset) = explode('_', $db_collation);
|
||||
$sql_query = 'ALTER DATABASE ' . PMA_backquote($db) . ' DEFAULT' . PMA_generateCharsetQueryPart($db_collation);
|
||||
$result = PMA_DBI_query($sql_query);
|
||||
$message = $strSuccess;
|
||||
$message = PMA_Message::success();
|
||||
unset($db_charset, $db_collation);
|
||||
}
|
||||
|
||||
|
@@ -78,7 +78,10 @@ function PMA_detectCompression($filepath)
|
||||
*/
|
||||
function PMA_importRunQuery($sql = '', $full = '', $controluser = false)
|
||||
{
|
||||
global $import_run_buffer, $go_sql, $complete_query, $display_query, $sql_query, $cfg, $my_die, $error, $reload, $timeout_passed, $skip_queries, $executed_queries, $max_sql_len, $read_multiply, $cfg, $sql_query_disabled, $db, $run_query, $is_superuser, $message, $show_error_header;
|
||||
global $import_run_buffer, $go_sql, $complete_query, $display_query,
|
||||
$sql_query, $cfg, $my_die, $error, $reload, $timeout_passed,
|
||||
$skip_queries, $executed_queries, $max_sql_len, $read_multiply,
|
||||
$cfg, $sql_query_disabled, $db, $run_query, $is_superuser;
|
||||
$read_multiply = 1;
|
||||
if (isset($import_run_buffer)) {
|
||||
// Should we skip something?
|
||||
@@ -91,10 +94,9 @@ function PMA_importRunQuery($sql = '', $full = '', $controluser = false)
|
||||
$sql_query .= $import_run_buffer['full'];
|
||||
}
|
||||
if (!$cfg['AllowUserDropDatabase']
|
||||
&& !$is_superuser
|
||||
&& preg_match('@^[[:space:]]*DROP[[:space:]]+(IF EXISTS[[:space:]]+)?DATABASE @i', $import_run_buffer['sql'])) {
|
||||
$message = $GLOBALS['strNoDropDatabases'];
|
||||
$show_error_header = TRUE;
|
||||
&& !$is_superuser
|
||||
&& preg_match('@^[[:space:]]*DROP[[:space:]]+(IF EXISTS[[:space:]]+)?DATABASE @i', $import_run_buffer['sql'])) {
|
||||
$GLOBALS['message'] = PMA_Message::error('strNoDropDatabases');
|
||||
$error = TRUE;
|
||||
} else {
|
||||
$executed_queries++;
|
||||
|
@@ -520,7 +520,7 @@ function PMA_sqlQueryFormUpload(){
|
||||
echo '</div>';
|
||||
|
||||
if ($files === FALSE) {
|
||||
$errors[$GLOBALS['strError']] = $GLOBALS['strWebServerUploadDirectoryError'];
|
||||
$errors[] = PMA_Message::error('strWebServerUploadDirectoryError');
|
||||
} elseif (!empty($files)) {
|
||||
echo '<div class="formelement">';
|
||||
echo '<strong>' . $GLOBALS['strWebServerUploadDirectory'] .':</strong>' . "\n";
|
||||
@@ -544,9 +544,8 @@ function PMA_sqlQueryFormUpload(){
|
||||
echo '<div class="clearfloat"></div>' . "\n";
|
||||
echo '</fieldset>';
|
||||
|
||||
foreach ($errors as $error => $message) {
|
||||
echo '<div>' . $error . '</div>';
|
||||
echo '<div>' . $message . '</div>';
|
||||
foreach ($errors as $error) {
|
||||
$error->display();
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@@ -124,7 +124,6 @@ if (! defined('PMA_MINIMUM_COMMON')) {
|
||||
// Revised, Robbat2 - 13 Janurary 2003, 2:59PM
|
||||
function PMA_SQP_throwError($message, $sql)
|
||||
{
|
||||
|
||||
global $SQP_errorString;
|
||||
$SQP_errorString = '<p>'.$GLOBALS['strSQLParserUserError'] . '</p>' . "\n"
|
||||
. '<pre>' . "\n"
|
||||
@@ -2370,7 +2369,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
|
||||
case 'quote_backtick':
|
||||
// here we check for punct_user to handle correctly
|
||||
// DEFINER = `username`@`%`
|
||||
// where @ is the punct_user and `%` is the quote_backtick
|
||||
// where @ is the punct_user and `%` is the quote_backtick
|
||||
if ($typearr[3] != 'punct_qualifier' && $typearr[3] != 'alpha_variable' && $typearr[3] != 'punct_user') {
|
||||
$after .= ' ';
|
||||
}
|
||||
|
Reference in New Issue
Block a user