From d6c630c64e279e85cc9b2062e3b499c1567ded7e Mon Sep 17 00:00:00 2001 From: Adnan Date: Wed, 18 Aug 2010 15:58:24 +0500 Subject: [PATCH] Proper Error handling of Schema --- .../schema/Export_Relation_Schema.class.php | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/libraries/schema/Export_Relation_Schema.class.php b/libraries/schema/Export_Relation_Schema.class.php index d88d33a50..b9115015a 100644 --- a/libraries/schema/Export_Relation_Schema.class.php +++ b/libraries/schema/Export_Relation_Schema.class.php @@ -183,9 +183,29 @@ class PMA_Export_Relation_Schema /** * Displays an error message + * + * @param integer pageNumber ID of the page choosen + * @param string type Schema Type + * @param string error_message the error mesage + * @global array the PMA configuration array + * @global integer the current server id + * @global string the current language + * @global string the charset to convert to + * @global string the current database name + * @global string the current charset + * @global string the current text direction + * @global string a localized string + * @global string an other localized string + * @access public + * @return void */ - function dieSchema($type = '',$error_message = '') + function dieSchema($pageNumber, $type = '', $error_message = '') { + global $cfg; + global $server, $lang, $convcharset, $db; + global $charset, $text_dir; + + require_once './libraries/header.inc.php'; echo "

" . __("SCHEMA ERROR: ") . $type ."

" . "\n"; if (!empty($error_message)) { $error_message = htmlspecialchars($error_message); @@ -193,6 +213,11 @@ class PMA_Export_Relation_Schema echo '

' . "\n"; echo ' ' . $error_message . "\n"; echo '

' . "\n"; + echo '' . __('Back') . ''; + echo "\n"; + require_once './libraries/footer.inc.php'; + exit(); } } ?> \ No newline at end of file