diff --git a/export.php b/export.php index c5af244c59..aa64600459 100644 --- a/export.php +++ b/export.php @@ -26,7 +26,7 @@ $type = $what; // Check export type if (! isset($export_list[$type])) { - die('Bad type!'); + die(__('Bad type!')); } /** @@ -103,7 +103,7 @@ if ($export_type == 'server') { } elseif ($export_type == 'table' && strlen($db) && strlen($table)) { $err_url = 'tbl_export.php?' . PMA_generate_common_url($db, $table); } else { - die('Bad parameters!'); + die(__('Bad parameters!')); } // Get the functions specific to the export type diff --git a/file_echo.php b/file_echo.php index 11a4487968..bdfc1735c2 100644 --- a/file_echo.php +++ b/file_echo.php @@ -18,7 +18,7 @@ if (isset($_REQUEST['filename']) && isset($_REQUEST['image'])) { /* Check whether MIME type is allowed */ if (! isset($allowed[$_REQUEST['type']])) { - die('Invalid export type'); + die(__('Invalid export type')); } /* diff --git a/libraries/Config.class.php b/libraries/Config.class.php index 669bf32e7f..43c04896ee 100644 --- a/libraries/Config.class.php +++ b/libraries/Config.class.php @@ -686,7 +686,7 @@ class PMA_Config { // Refuse to work while there still might be some world writable dir: if (is_dir('./config')) { - die('Remove "./config" directory before using phpMyAdmin!'); + die(__('Remove "./config" directory before using phpMyAdmin!')); } } @@ -710,8 +710,9 @@ class PMA_Config if (! is_readable($this->getSource())) { $this->source_mtime = 0; die( - 'Existing configuration file (' - . $this->getSource() . ') is not readable.' + sprintf(__('Existing configuration file (%d) is not readable.'), + $this->getSource() + ) ); } @@ -734,7 +735,7 @@ class PMA_Config $this->checkWebServerOs(); if ($this->get('PMA_IS_WINDOWS') == 0) { $this->source_mtime = 0; - die('Wrong permissions on configuration file, should not be world writable!'); + die(__('Wrong permissions on configuration file, should not be world writable!')); } } } diff --git a/libraries/auth/cookie.auth.lib.php b/libraries/auth/cookie.auth.lib.php index c2e50c0671..2a3f7c1ff7 100644 --- a/libraries/auth/cookie.auth.lib.php +++ b/libraries/auth/cookie.auth.lib.php @@ -32,7 +32,7 @@ if (function_exists('mcrypt_encrypt')) { srand((double) microtime() * 1000000); $td = mcrypt_module_open(MCRYPT_BLOWFISH, '', MCRYPT_MODE_CBC, ''); if ($td === false) { - die('Failed to use Blowfish from mcrypt!'); + die(__('Failed to use Blowfish from mcrypt!')); } $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td), MCRYPT_RAND); $GLOBALS['PMA_Config']->setCookie('pma_mcrypt_iv', base64_encode($iv)); diff --git a/libraries/common.inc.php b/libraries/common.inc.php index 26e7a0170f..085bcb22b1 100644 --- a/libraries/common.inc.php +++ b/libraries/common.inc.php @@ -144,7 +144,7 @@ if (!defined('PMA_MINIMUM_COMMON')) { * protect against possible exploits - there is no need to have so much variables */ if (count($_REQUEST) > 1000) { - die('possible exploit'); + die(__('possible exploit')); } /** @@ -153,7 +153,7 @@ if (count($_REQUEST) > 1000) { */ foreach ($GLOBALS as $key => $dummy) { if (is_numeric($key)) { - die('numeric key detected'); + die(__('numeric key detected')); } } unset($dummy); diff --git a/libraries/core.lib.php b/libraries/core.lib.php index 63793364f4..b4905c9803 100644 --- a/libraries/core.lib.php +++ b/libraries/core.lib.php @@ -406,7 +406,7 @@ function PMA_arrayWalkRecursive(&$array, $function, $apply_to_keys_also = false) { static $recursive_counter = 0; if (++$recursive_counter > 1000) { - die('possible deep recursion attack'); + die(__('possible deep recursion attack')); } foreach ($array as $key => $value) { if (is_array($value)) { diff --git a/libraries/header_http.inc.php b/libraries/header_http.inc.php index 3b32915a87..4b4e454f6f 100644 --- a/libraries/header_http.inc.php +++ b/libraries/header_http.inc.php @@ -12,7 +12,7 @@ if (! defined('PHPMYADMIN')) { * */ if (isset($_REQUEST['GLOBALS']) || isset($_FILES['GLOBALS'])) { - die("GLOBALS overwrite attempt"); + die(__("GLOBALS overwrite attempt")); } /** diff --git a/libraries/header_meta_style.inc.php b/libraries/header_meta_style.inc.php index 5e5c533da4..076035b858 100644 --- a/libraries/header_meta_style.inc.php +++ b/libraries/header_meta_style.inc.php @@ -12,7 +12,7 @@ if (! defined('PHPMYADMIN')) { * */ if (isset($_REQUEST['GLOBALS']) || isset($_FILES['GLOBALS'])) { - die("GLOBALS overwrite attempt"); + die(__("GLOBALS overwrite attempt")); } /** diff --git a/setup/frames/form.inc.php b/setup/frames/form.inc.php index 61484b2fed..5d34034f09 100644 --- a/setup/frames/form.inc.php +++ b/setup/frames/form.inc.php @@ -22,7 +22,7 @@ require './libraries/config/setup.forms.php'; $formset_id = filter_input(INPUT_GET, 'formset'); $mode = filter_input(INPUT_GET, 'mode'); if (! isset($forms[$formset_id])) { - die('Incorrect formset, check $formsets array in setup/frames/form.inc.php'); + die(__('Incorrect formset, check $formsets array in setup/frames/form.inc.php')); } if (isset($GLOBALS['strConfigFormset_' . $formset_id])) { @@ -33,4 +33,4 @@ foreach ($forms[$formset_id] as $form_name => $form) { $form_display->registerForm($form_name, $form); } process_formset($form_display); -?> \ No newline at end of file +?> diff --git a/setup/index.php b/setup/index.php index 99c784715d..304e00f762 100644 --- a/setup/index.php +++ b/setup/index.php @@ -19,7 +19,7 @@ if ($page === '') { } if (!file_exists("./setup/frames/$page.inc.php")) { // it will happen only when enterung URL by hand, we don't care for these cases - die('Wrong GET file attribute value'); + die(__('Wrong GET file attribute value')); } // Handle done action info diff --git a/setup/validate.php b/setup/validate.php index beeba71cee..22bdccb60c 100644 --- a/setup/validate.php +++ b/setup/validate.php @@ -19,7 +19,7 @@ header('Content-type: application/json'); $vids = explode(',', filter_input(INPUT_POST, 'id')); $values = json_decode(filter_input(INPUT_POST, 'values')); if (!($values instanceof stdClass)) { - die('Wrong data'); + die(__('Wrong data')); } $values = (array)$values; $result = PMA_config_validate($vids, $values, true);