diff --git a/db_routines.php b/db_routines.php index 3307b4085e..f046648969 100644 --- a/db_routines.php +++ b/db_routines.php @@ -187,7 +187,7 @@ if (! empty($_REQUEST['execute_routine']) && ! empty($_REQUEST['routine_name'])) } } else { $output = ''; - $message = PMA_message::error(sprintf(__('Query "%s" failed'), $query) . '

' + $message = PMA_message::error(sprintf(__('The following query has failed: "%s"'), $query) . '

' . __('MySQL said: ') . PMA_DBI_getError(null)); } // Print/send output @@ -206,7 +206,7 @@ if (! empty($_REQUEST['execute_routine']) && ! empty($_REQUEST['routine_name'])) } } else { $message = __('Error in processing request') . ' : ' - . sprintf(__('No routine with name %s found in database %s'), + . sprintf(__('No routine with name %1$s found in database %2$s'), htmlspecialchars(PMA_backquote($_REQUEST['routine_name'])), htmlspecialchars(PMA_backquote($db))); $message = PMA_message::error($message); @@ -237,7 +237,12 @@ if (! empty($_REQUEST['execute_routine']) && ! empty($_REQUEST['routine_name'])) // exit; } } else if (($GLOBALS['is_ajax_request'] == true)) { - PMA_ajaxResponse(PMA_message::error(), false); + $message = __('Error in processing request') . ' : ' + . sprintf(__('No routine with name %1$s found in database %2$s'), + htmlspecialchars(PMA_backquote($_REQUEST['routine_name'])), + htmlspecialchars(PMA_backquote($db))); + $message = PMA_message::error($message); + PMA_ajaxResponse($message, false); } } else if (! empty($_GET['exportroutine']) && ! empty($_GET['routine_name'])) { /** @@ -261,7 +266,7 @@ if (! empty($_REQUEST['execute_routine']) && ! empty($_REQUEST['routine_name'])) } } else { $response = __('Error in processing request') . ' : ' - . sprintf(__('No routine with name %s found in database %s'), + . sprintf(__('No routine with name %1$s found in database %2$s'), $routine_name, htmlspecialchars(PMA_backquote($db))); $response = PMA_message::error($response); if ($GLOBALS['is_ajax_request']) { @@ -287,12 +292,12 @@ if (! empty($_REQUEST['execute_routine']) && ! empty($_REQUEST['routine_name'])) $drop_routine = "DROP {$_REQUEST['routine_original_type']} " . PMA_backquote($_REQUEST['routine_original_name']) . ";\n"; $result = PMA_DBI_try_query($drop_routine); if (! $result) { - $routine_errors[] = sprintf(__('Query "%s" failed'), $drop_routine) . '
' + $routine_errors[] = sprintf(__('The following query has failed: "%s"'), $drop_routine) . '
' . __('MySQL said: ') . PMA_DBI_getError(null); } else { $result = PMA_DBI_try_query($routine_query); if (! $result) { - $routine_errors[] = sprintf(__('Query "%s" failed'), $routine_query) . '
' + $routine_errors[] = sprintf(__('The following query has failed: "%s"'), $routine_query) . '
' . __('MySQL said: ') . PMA_DBI_getError(null); // We dropped the old routine, but were unable to create the new one // Try to restore the backup query @@ -316,7 +321,7 @@ if (! empty($_REQUEST['execute_routine']) && ! empty($_REQUEST['routine_name'])) // 'Add a new routine' mode $result = PMA_DBI_try_query($routine_query); if (! $result) { - $routine_errors[] = sprintf(__('Query "%s" failed'), $routine_query) . '

' + $routine_errors[] = sprintf(__('The following query has failed: "%s"'), $routine_query) . '

' . __('MySQL said: ') . PMA_DBI_getError(null); } else { $message = PMA_Message::success(__('Routine %1$s has been created.')); @@ -400,7 +405,7 @@ if (count($routine_errors) || ( empty($_REQUEST['routine_process_addroutine']) & // exit; } else { $message = __('Error in processing request') . ' : ' - . sprintf(__('No routine with name %s found in database %s'), + . sprintf(__('No routine with name %1$s found in database %2$s'), htmlspecialchars(PMA_backquote($_REQUEST['routine_name'])), htmlspecialchars(PMA_backquote($db))); $message = PMA_message::error($message); diff --git a/libraries/StorageEngine.class.php b/libraries/StorageEngine.class.php index 750489543b..bcb4f684f4 100644 --- a/libraries/StorageEngine.class.php +++ b/libraries/StorageEngine.class.php @@ -58,11 +58,11 @@ class PMA_StorageEngine { static $storage_engines = null; - if (null !== $storage_engines) { - return $storage_engines; + if (null == $storage_engines) { + $storage_engines = PMA_DBI_fetch_result('SHOW STORAGE ENGINES', 'Engine'); } - return PMA_DBI_fetch_result('SHOW STORAGE ENGINES', 'Engine'); + return $storage_engines; } /** @@ -88,7 +88,8 @@ class PMA_StorageEngine foreach (PMA_StorageEngine::getStorageEngines() as $key => $details) { if (!$offerUnavailableEngines - && ($details['Support'] == 'NO' || $details['Support'] == 'DISABLED')) { + && ($details['Support'] == 'NO' || $details['Support'] == 'DISABLED' + || $details['Engine'] == 'PERFORMANCE_SCHEMA')) { continue; } diff --git a/libraries/common.inc.php b/libraries/common.inc.php index 3bca2d63f1..a410d7a916 100644 --- a/libraries/common.inc.php +++ b/libraries/common.inc.php @@ -585,8 +585,8 @@ require './libraries/select_lang.lib.php'; * this check is done here after loading language files to present errors in locale */ if ($GLOBALS['PMA_Config']->error_config_file) { - $error = '

' . __('Failed to to read configuration file') . '

' - . _('This usually means there is a syntax error in it, please check any errors shown bellow.') + $error = '

' . __('Failed to read configuration file') . '

' + . _('This usually means there is a syntax error in it, please check any errors shown below.') . '
' . '
' . '