diff --git a/db_export.php b/db_export.php index bb9b0d353..30c84cdb0 100644 --- a/db_export.php +++ b/db_export.php @@ -29,7 +29,7 @@ $export_page_title = $strViewDumpDB; // exit if no tables in db found if ($num_tables < 1) { - echo '
' . $strNoTablesFound . '
'; + PMA_Message::error('strNoTablesFound')->display(); require './libraries/footer.inc.php'; exit; } // end if diff --git a/db_qbe.php b/db_qbe.php index d6bc57a91..e2edc71cf 100644 --- a/db_qbe.php +++ b/db_qbe.php @@ -38,7 +38,7 @@ if (isset($_REQUEST['submit_sql']) && ! empty($sql_query)) { if (isset($_REQUEST['submit_sql']) && ! preg_match('@^SELECT@i', $sql_query)) { - echo '
' . $GLOBALS['strHaveToShow'] . '
'; + PMA_Message::warning('strHaveToShow')->display(); } diff --git a/libraries/auth/http.auth.lib.php b/libraries/auth/http.auth.lib.php index 35635b030..4b98aa7a1 100644 --- a/libraries/auth/http.auth.lib.php +++ b/libraries/auth/http.auth.lib.php @@ -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,22 +46,25 @@ function PMA_auth() { ?> - +


-
- + display(); + + if (file_exists('./config.footer.inc.php')) { + require './config.footer.inc.php'; + } + ?> @@ -145,8 +148,8 @@ function PMA_auth_check() if (!empty($old_usr) && (isset($PHP_AUTH_USER) && $old_usr == $PHP_AUTH_USER)) { $PHP_AUTH_USER = ''; - // -> delete user's choices that were stored in session - session_destroy(); + // -> delete user's choices that were stored in session + session_destroy(); } // Returns whether we get authentication settings or not diff --git a/libraries/dbg/setup.php b/libraries/dbg/setup.php index 30d870000..be57d8b23 100644 --- a/libraries/dbg/setup.php +++ b/libraries/dbg/setup.php @@ -15,13 +15,14 @@ if ($GLOBALS['cfg']['DBG']['enable']) { * Loads the DBG extension if needed */ if (! @extension_loaded('dbg') && ! PMA_dl('dbg')) { - echo '
' - .sprintf($GLOBALS['strCantLoad'], 'DBG') - .' ' - .$GLOBALS['strDocu'] . '' - .'
'; + $message = PMA_Message::error('strCantLoad'); + $message->addParam('DBG'); + $message->addMessage(''); + $message->addString('strDocu'); + $message->addMessage(''); + $message->display(); } else { $GLOBALS['DBG'] = true; } } -?> \ No newline at end of file +?> diff --git a/libraries/display_import.lib.php b/libraries/display_import.lib.php index 2b0435156..a0c233392 100644 --- a/libraries/display_import.lib.php +++ b/libraries/display_import.lib.php @@ -36,23 +36,22 @@ echo PMA_pluginGetJavascript($import_list);
- +
- ' . "\n"; - echo $strUploadsNotAllowed . "\n"; - } - ?> +
-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 '
' . "\n"; if ($files === FALSE) { - echo '
' . "\n"; - echo ' ' . $strError . ': ' . "\n"; - echo ' ' . $strWebServerUploadDirectoryError . "\n"; - echo '
' . "\n"; + PMA_Message::error('strWebServerUploadDirectoryError')->display(); } elseif (!empty($files)) { echo "\n"; echo ' ' . $strOr . '
 : ' . "\n"; diff --git a/libraries/tbl_indexes.lib.php b/libraries/tbl_indexes.lib.php index 74f9eec05..6184fae5f 100644 --- a/libraries/tbl_indexes.lib.php +++ b/libraries/tbl_indexes.lib.php @@ -106,10 +106,9 @@ function PMA_check_indexes($idx_collection) reset($while_index); $first_column = current($while_index); - $output .= '
'; - $output .= $GLOBALS['strIndexesSeemEqual'] . ' '; - $output .= $each_index_name . ', ' . $first_column['Key_name']; - $output .= '
'; + $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 diff --git a/server_databases.php b/server_databases.php index 69bd752a6..11c5d604d 100644 --- a/server_databases.php +++ b/server_databases.php @@ -328,9 +328,9 @@ if (window.parent.openDb(\'' . PMA_jsFormat($current['SCHEMA_NAME'], false) . '\ .' title="' . $strDatabasesStatsDisable . '">' . "\n" .' ' . $strDatabasesStatsDisable; } - echo '
' . "\n" - .'
' - . $strDatabasesStatsHeavyTraffic . '
' . "\n" + echo '
' . "\n"; + PMA_Message::warning('strDatabasesStatsHeavyTraffic')->display(); + echo '' . "\n" .'' . "\n"; echo ''; } else { diff --git a/tbl_indexes.php b/tbl_indexes.php index 1b3bb0449..e2612b7aa 100644 --- a/tbl_indexes.php +++ b/tbl_indexes.php @@ -309,7 +309,9 @@ elseif (!defined('PMA_IDX_INCLUDED')
-
+display(); +?> @@ -441,8 +443,9 @@ elseif (!defined('PMA_IDX_INCLUDED') else { // none indexes echo '' - .'' . "\n"; + .'' . "\n"; } ?> diff --git a/tbl_relation.php b/tbl_relation.php index d0bb0916a..1e1ee9c15 100644 --- a/tbl_relation.php +++ b/tbl_relation.php @@ -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 '

' . $strForeignKeyError . ' : ' . $master_field - .'

' . 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 = '';
' . $strNoIndex - .'
'; + PMA_Message::warning('strNoIndex')->display(); + echo '