Start to replace warning level with error level

This commit is contained in:
Marc Delisle
2011-05-03 18:52:37 -04:00
parent 90845aa8cb
commit b2b1953db1
10 changed files with 13 additions and 13 deletions

View File

@@ -35,7 +35,7 @@ if (isset($_REQUEST['submit_sql']) && ! empty($sql_query)) {
if (isset($_REQUEST['submit_sql']) if (isset($_REQUEST['submit_sql'])
&& ! preg_match('@^SELECT@i', $sql_query)) { && ! preg_match('@^SELECT@i', $sql_query)) {
PMA_Message::warning(__('You have to choose at least one column to display'))->display(); PMA_Message::error(__('You have to choose at least one column to display'))->display();
} }

View File

@@ -305,7 +305,7 @@ if ($server > 0) {
} }
/** /**
* Show warning when javascript support is missing. * Show notice when javascript support is missing.
*/ */
echo '<noscript>'; echo '<noscript>';
$message = PMA_Message::notice(__('Javascript support is missing or disabled in your browser, some phpMyAdmin functionality will be missing. For example navigation frame will not refresh automatically.')); $message = PMA_Message::notice(__('Javascript support is missing or disabled in your browser, some phpMyAdmin functionality will be missing. For example navigation frame will not refresh automatically.'));

View File

@@ -74,7 +74,7 @@ if ($error) {
if ($form_display->hasErrors()) { if ($form_display->hasErrors()) {
// form has errors // form has errors
?> ?>
<div class="warning config-form"> <div class="error config-form">
<b><?php echo __('Cannot save settings, submitted form contains errors') ?></b> <b><?php echo __('Cannot save settings, submitted form contains errors') ?></b>
<?php $form_display->displayErrors(); ?> <?php $form_display->displayErrors(); ?>
</div> </div>
@@ -86,4 +86,4 @@ $form_display->display(true, true);
* Displays the footer * Displays the footer
*/ */
require './libraries/footer.inc.php'; require './libraries/footer.inc.php';
?> ?>

View File

@@ -109,7 +109,7 @@ if (isset($_POST['submit_export']) && filter_input(INPUT_POST, 'export_type') ==
// mimic original form and post json in a hidden field // mimic original form and post json in a hidden field
require './libraries/header.inc.php'; require './libraries/header.inc.php';
require './libraries/user_preferences.inc.php'; require './libraries/user_preferences.inc.php';
$msg = PMA_Message::warning(__('Configuration contains incorrect data for some fields.')); $msg = PMA_Message::error(__('Configuration contains incorrect data for some fields.'));
$msg->display(); $msg->display();
echo '<div class="config-form">'; echo '<div class="config-form">';
$form_display->displayErrors(); $form_display->displayErrors();

View File

@@ -1790,7 +1790,7 @@ if (empty($_REQUEST['adduser']) && (! isset($checkprivs) || ! strlen($checkprivs
$user_does_not_exists = (bool) ! PMA_DBI_fetch_value($sql); $user_does_not_exists = (bool) ! PMA_DBI_fetch_value($sql);
unset($sql); unset($sql);
if ($user_does_not_exists) { if ($user_does_not_exists) {
PMA_Message::warning(__('The selected user was not found in the privilege table.'))->display(); PMA_Message::error(__('The selected user was not found in the privilege table.'))->display();
PMA_displayLoginInformationFields(); PMA_displayLoginInformationFields();
//require './libraries/footer.inc.php'; //require './libraries/footer.inc.php';
} }

View File

@@ -288,10 +288,10 @@ if (! isset($GLOBALS['repl_clear_scr'])) {
$slave_skip_error_link = PMA_generate_common_url($_url_params); $slave_skip_error_link = PMA_generate_common_url($_url_params);
if ($server_slave_replication[0]['Slave_SQL_Running'] == 'No') { if ($server_slave_replication[0]['Slave_SQL_Running'] == 'No') {
PMA_Message::warning(__('Slave SQL Thread not running!'))->display(); PMA_Message::error(__('Slave SQL Thread not running!'))->display();
} }
if ($server_slave_replication[0]['Slave_IO_Running'] == 'No') { if ($server_slave_replication[0]['Slave_IO_Running'] == 'No') {
PMA_Message::warning(__('Slave IO Thread not running!'))->display(); PMA_Message::error(__('Slave IO Thread not running!'))->display();
} }
$_url_params = $GLOBALS['url_params']; $_url_params = $GLOBALS['url_params'];
@@ -337,7 +337,7 @@ if (! isset($GLOBALS['repl_clear_scr'])) {
echo ' </li>'; echo ' </li>';
echo ' <li><a href="#" id="slave_errormanagement_href">' . __('Error management:') . '</a>'; echo ' <li><a href="#" id="slave_errormanagement_href">' . __('Error management:') . '</a>';
echo ' <div id="slave_errormanagement_gui" style="display: none">'; echo ' <div id="slave_errormanagement_gui" style="display: none">';
PMA_Message::warning(__('Skipping errors might lead into unsynchronized master and slave!'))->display(); PMA_Message::error(__('Skipping errors might lead into unsynchronized master and slave!'))->display();
echo ' <ul>'; echo ' <ul>';
echo ' <li><a href="' . $slave_skip_error_link . '">' . __('Skip current error') . '</a></li>'; echo ' <li><a href="' . $slave_skip_error_link . '">' . __('Skip current error') . '</a></li>';
echo ' <li>' . __('Skip next'); echo ' <li>' . __('Skip next');

View File

@@ -275,7 +275,7 @@ if ($do_confirm) {
$stripped_sql_query = $sql_query; $stripped_sql_query = $sql_query;
require_once './libraries/header.inc.php'; require_once './libraries/header.inc.php';
if ($is_drop_database) { if ($is_drop_database) {
echo '<h1 class="warning">' . __('You are about to DESTROY a complete database!') . '</h1>'; echo '<h1 class="error">' . __('You are about to DESTROY a complete database!') . '</h1>';
} }
echo '<form action="sql.php" method="post">' . "\n" echo '<form action="sql.php" method="post">' . "\n"
.PMA_generate_common_hidden_inputs($db, $table); .PMA_generate_common_hidden_inputs($db, $table);

View File

@@ -179,7 +179,7 @@ if (isset($_REQUEST['create_index'])) {
<br class="clearfloat" /> <br class="clearfloat" />
<?php <?php
PMA_Message::warning(__('("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)'))->display(); PMA_Message::error(__('("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)'))->display();
?> ?>
<table> <table>

View File

@@ -273,7 +273,7 @@ if (isset($_REQUEST['destination_foreign'])) {
echo PMA_showMySQLDocu('manual_Table_types', 'InnoDB_foreign_key_constraints') . "\n"; echo PMA_showMySQLDocu('manual_Table_types', 'InnoDB_foreign_key_constraints') . "\n";
} }
if (substr($tmp_error, 1, 4) == '1005') { if (substr($tmp_error, 1, 4) == '1005') {
$message = PMA_Message::warning( __('Error creating foreign key on %1$s (check data types)')); $message = PMA_Message::error( __('Error creating foreign key on %1$s (check data types)'));
$message->addParam($master_field); $message->addParam($master_field);
$message->display(); $message->display();
echo PMA_showMySQLDocu('manual_Table_types', 'InnoDB_foreign_key_constraints') . "\n"; echo PMA_showMySQLDocu('manual_Table_types', 'InnoDB_foreign_key_constraints') . "\n";

View File

@@ -410,7 +410,7 @@ $message->addMessages($last_messages, '<br />');
if (! empty($warning_messages)) { if (! empty($warning_messages)) {
/** /**
* @todo use a <div class="warning"> in PMA_showMessage() for this part of * @todo use a <div class="error"> in PMA_showMessage() for this part of
* the message * the message
*/ */
$message->addMessages($warning_messages, '<br />'); $message->addMessages($warning_messages, '<br />');