make use of PMA_Message
This commit is contained in:
@@ -29,7 +29,7 @@ $export_page_title = $strViewDumpDB;
|
||||
|
||||
// exit if no tables in db found
|
||||
if ($num_tables < 1) {
|
||||
echo '<div class="warning">' . $strNoTablesFound . '</div>';
|
||||
PMA_Message::error('strNoTablesFound')->display();
|
||||
require './libraries/footer.inc.php';
|
||||
exit;
|
||||
} // end if
|
||||
|
@@ -38,7 +38,7 @@ if (isset($_REQUEST['submit_sql']) && ! empty($sql_query)) {
|
||||
|
||||
if (isset($_REQUEST['submit_sql'])
|
||||
&& ! preg_match('@^SELECT@i', $sql_query)) {
|
||||
echo '<div class="warning">' . $GLOBALS['strHaveToShow'] . '</div>';
|
||||
PMA_Message::warning('strHaveToShow')->display();
|
||||
}
|
||||
|
||||
|
||||
|
@@ -19,8 +19,8 @@
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function PMA_auth() {
|
||||
|
||||
function PMA_auth()
|
||||
{
|
||||
/* Perform logout to custom URL */
|
||||
if (!empty($_REQUEST['old_usr']) && !empty($GLOBALS['cfg']['Server']['LogoutURL'])) {
|
||||
PMA_sendHeaderLocation($GLOBALS['cfg']['Server']['LogoutURL']);
|
||||
@@ -46,7 +46,8 @@ function PMA_auth() {
|
||||
?>
|
||||
</head>
|
||||
<body>
|
||||
<?php if (file_exists('./config.header.inc.php')) {
|
||||
<?php
|
||||
if (file_exists('./config.header.inc.php')) {
|
||||
require './config.header.inc.php';
|
||||
}
|
||||
?>
|
||||
@@ -56,9 +57,11 @@ function PMA_auth() {
|
||||
<h1><?php echo sprintf($GLOBALS['strWelcome'], ' phpMyAdmin ' . PMA_VERSION); ?></h1>
|
||||
</center>
|
||||
<br />
|
||||
<div class="warning"><?php echo $GLOBALS['strWrongUser']; ?></div>
|
||||
|
||||
<?php if (file_exists('./config.footer.inc.php')) {
|
||||
<?php
|
||||
PMA_Message::error('strWrongUser')->display();
|
||||
|
||||
if (file_exists('./config.footer.inc.php')) {
|
||||
require './config.footer.inc.php';
|
||||
}
|
||||
?>
|
||||
|
@@ -15,11 +15,12 @@ if ($GLOBALS['cfg']['DBG']['enable']) {
|
||||
* Loads the DBG extension if needed
|
||||
*/
|
||||
if (! @extension_loaded('dbg') && ! PMA_dl('dbg')) {
|
||||
echo '<div class="warning">'
|
||||
.sprintf($GLOBALS['strCantLoad'], 'DBG')
|
||||
.' <a href="./Documentation.html#faqdbg" target="documentation">'
|
||||
.$GLOBALS['strDocu'] . '</a>'
|
||||
.'</div>';
|
||||
$message = PMA_Message::error('strCantLoad');
|
||||
$message->addParam('DBG');
|
||||
$message->addMessage('<a href="./Documentation.html#faqdbg" target="documentation">');
|
||||
$message->addString('strDocu');
|
||||
$message->addMessage('</a>');
|
||||
$message->display();
|
||||
} else {
|
||||
$GLOBALS['DBG'] = true;
|
||||
}
|
||||
|
@@ -46,13 +46,12 @@ echo PMA_pluginGetJavascript($import_list);
|
||||
echo PMA_displayMaximumUploadSize($max_upload_size) . "\n";
|
||||
// some browsers should respect this :)
|
||||
echo PMA_generateHiddenMaxFileSize($max_upload_size) . "\n";
|
||||
} else {
|
||||
echo '<div class="warning">' . "\n";
|
||||
echo $strUploadsNotAllowed . "\n";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
PMA_Message::warning('strUploadsNotAllowed')->display();
|
||||
}
|
||||
if (!empty($cfg['UploadDir'])) {
|
||||
$extensions = '';
|
||||
foreach ($import_list as $key => $val) {
|
||||
@@ -66,10 +65,7 @@ if (!empty($cfg['UploadDir'])) {
|
||||
$files = PMA_getFileSelectOptions(PMA_userDir($cfg['UploadDir']), $matcher, (isset($timeout_passed) && $timeout_passed && isset($local_import_file)) ? $local_import_file : '');
|
||||
echo '<div class="formelementrow">' . "\n";
|
||||
if ($files === FALSE) {
|
||||
echo ' <div class="warning">' . "\n";
|
||||
echo ' <strong>' . $strError . '</strong>: ' . "\n";
|
||||
echo ' ' . $strWebServerUploadDirectoryError . "\n";
|
||||
echo ' </div>' . "\n";
|
||||
PMA_Message::error('strWebServerUploadDirectoryError')->display();
|
||||
} elseif (!empty($files)) {
|
||||
echo "\n";
|
||||
echo ' <i>' . $strOr . '</i><br/><label for="select_local_import_file">' . $strWebServerUploadDirectory . '</label> : ' . "\n";
|
||||
|
@@ -106,10 +106,9 @@ function PMA_check_indexes($idx_collection)
|
||||
reset($while_index);
|
||||
$first_column = current($while_index);
|
||||
|
||||
$output .= '<div class="warning">';
|
||||
$output .= $GLOBALS['strIndexesSeemEqual'] . ' ';
|
||||
$output .= $each_index_name . ', ' . $first_column['Key_name'];
|
||||
$output .= '</div>';
|
||||
$message = PMA_Message::warning('strIndexesSeemEqual');
|
||||
$message->addMessage($each_index_name . ', ' . $first_column['Key_name']);
|
||||
$output .= $message->getDisplay();
|
||||
|
||||
// there is no need to check any further indexes if we have already
|
||||
// found that this one has a duplicate
|
||||
|
@@ -328,9 +328,9 @@ if (window.parent.openDb(\'' . PMA_jsFormat($current['SCHEMA_NAME'], false) . '\
|
||||
.' title="' . $strDatabasesStatsDisable . '">' . "\n"
|
||||
.' ' . $strDatabasesStatsDisable;
|
||||
}
|
||||
echo '</a></strong><br />' . "\n"
|
||||
.' <div class="warning">'
|
||||
. $strDatabasesStatsHeavyTraffic . '</div></li>' . "\n"
|
||||
echo '</a></strong><br />' . "\n";
|
||||
PMA_Message::warning('strDatabasesStatsHeavyTraffic')->display();
|
||||
echo '</li>' . "\n"
|
||||
.'</ul>' . "\n";
|
||||
echo '</form>';
|
||||
} else {
|
||||
|
@@ -309,7 +309,9 @@ elseif (!defined('PMA_IDX_INCLUDED')
|
||||
|
||||
|
||||
<br class="clearfloat" />
|
||||
<div class="warning"><?php echo $strPrimaryKeyWarning; ?></div>
|
||||
<?php
|
||||
PMA_Message::warning('strPrimaryKeyWarning')->display();
|
||||
?>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
@@ -441,8 +443,9 @@ elseif (!defined('PMA_IDX_INCLUDED')
|
||||
else {
|
||||
// none indexes
|
||||
echo '<tbody>'
|
||||
.'<tr><td colspan="7"><div class="warning">' . $strNoIndex
|
||||
.'</div></td></tr>' . "\n";
|
||||
.'<tr><td colspan="7">';
|
||||
PMA_Message::warning('strNoIndex')->display();
|
||||
echo '</td></tr>' . "\n";
|
||||
}
|
||||
?>
|
||||
|
||||
|
@@ -220,8 +220,10 @@ if (isset($_REQUEST['destination_innodb'])) {
|
||||
echo PMA_showMySQLDocu('manual_Table_types', 'InnoDB_foreign_key_constraints') . "\n";
|
||||
}
|
||||
if (substr($tmp_error, 1, 4) == '1005') {
|
||||
echo '<p class="warning">' . $strForeignKeyError . ' : ' . $master_field
|
||||
.'</p>' . PMA_showMySQLDocu('manual_Table_types', 'InnoDB_foreign_key_constraints') . "\n";
|
||||
$message = PMA_Message::warning('strForeignKeyError');
|
||||
$message->addMessage(htmlspecialchars($master_field), ' : ');
|
||||
$message->display();
|
||||
echo PMA_showMySQLDocu('manual_Table_types', 'InnoDB_foreign_key_constraints') . "\n";
|
||||
}
|
||||
unset($tmp_error);
|
||||
$sql_query = '';
|
||||
|
Reference in New Issue
Block a user