From 5d54482c66f3471bd9950fecaa43de911208edca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Wed, 11 Apr 2012 15:34:27 +0200 Subject: [PATCH] Drop $cfg['MainPageIconic']. --- Documentation.html | 3 -- libraries/common.lib.php | 5 ++- libraries/config.default.php | 7 ---- libraries/config/messages.inc.php | 1 - libraries/config/setup.forms.php | 1 - libraries/config/user_preferences.forms.php | 1 - libraries/navigation_header.inc.php | 39 ++++----------------- libraries/user_preferences.lib.php | 2 +- server_binlog.php | 2 +- server_collations.php | 4 +-- server_databases.php | 6 ++-- server_engines.php | 4 +-- server_plugins.php | 10 ++---- server_status.php | 4 +-- server_synchronize.php | 6 +--- server_variables.php | 3 +- themes/original/css/theme_right.css.php | 2 -- themes/pmahomme/css/theme_right.css.php | 2 -- 18 files changed, 21 insertions(+), 81 deletions(-) diff --git a/Documentation.html b/Documentation.html index e129868cb9..0dbafe4895 100644 --- a/Documentation.html +++ b/Documentation.html @@ -2302,9 +2302,6 @@ setfacl -d -m "g:www-data:rwx" tmp format string expansion. -
$cfg['MainPageIconic'] boolean
-
Uses icons on main page in lists and menu tabs.
-
$cfg['ReplaceHelpImg'] boolean
Shows a help button instead of the "Documentation" message.
diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 4d550e6155..bf7d007cc1 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -1772,9 +1772,8 @@ function PMA_generate_html_tab($tab, $url_params = array(), $base_dir = '') $tab['link'] .= $tab['fragment']; } - // display icon, even if iconic is disabled but the link-text is missing - if (($GLOBALS['cfg']['MainPageIconic'] || empty($tab['text'])) - && isset($tab['icon']) + // display icon + if (isset($tab['icon']) ) { // avoid generating an alt tag, because it only illustrates // the text that follows and if browser does not display diff --git a/libraries/config.default.php b/libraries/config.default.php index 0d388fa8aa..874a5ed87d 100644 --- a/libraries/config.default.php +++ b/libraries/config.default.php @@ -2527,13 +2527,6 @@ $cfg['TitleServer'] = '@HTTP_HOST@ / @VSERVER@ | @PHPMYADMIN@'; */ $cfg['TitleDefault'] = '@HTTP_HOST@ | @PHPMYADMIN@'; -/** - * show icons in list on main page and on menu tabs (true|false)? - * - * @global boolean $cfg['MainPageIconic'] - */ -$cfg['MainPageIconic'] = true; - /** * show help button instead of Documentation text (true|false)? * diff --git a/libraries/config/messages.inc.php b/libraries/config/messages.inc.php index c4050f2054..416ed28674 100644 --- a/libraries/config/messages.inc.php +++ b/libraries/config/messages.inc.php @@ -303,7 +303,6 @@ $strConfigLoginCookieValidity_desc = __('Define how long (in seconds) a login co $strConfigLoginCookieValidity_name = __('Login cookie validity'); $strConfigLongtextDoubleTextarea_desc = __('Double size of textarea for LONGTEXT columns'); $strConfigLongtextDoubleTextarea_name = __('Bigger textarea for LONGTEXT'); -$strConfigMainPageIconic_name = __('Use icons on main page'); $strConfigMaxCharactersInDisplayedSQL_desc = __('Maximum number of characters used when a SQL query is displayed'); $strConfigMaxCharactersInDisplayedSQL_name = __('Maximum displayed SQL length'); $strConfigMaxDbList_cmt = __('Users cannot set a higher value'); diff --git a/libraries/config/setup.forms.php b/libraries/config/setup.forms.php index 714f9e4f97..70fd17e750 100644 --- a/libraries/config/setup.forms.php +++ b/libraries/config/setup.forms.php @@ -186,7 +186,6 @@ $forms['Left_frame']['Left_tables'] = array( 'ShowTooltip', 'ShowTooltipAliasTB'); $forms['Main_frame']['Startup'] = array( - 'MainPageIconic', 'ShowCreateDb' => ':group', 'SuggestDBName', ':group:end', diff --git a/libraries/config/user_preferences.forms.php b/libraries/config/user_preferences.forms.php index 1b3e286b19..a8a0f7a46d 100644 --- a/libraries/config/user_preferences.forms.php +++ b/libraries/config/user_preferences.forms.php @@ -96,7 +96,6 @@ $forms['Left_frame']['Left_tables'] = array( 'ShowTooltip', 'ShowTooltipAliasTB'); $forms['Main_frame']['Startup'] = array( - 'MainPageIconic', 'ShowCreateDb' => ':group', 'SuggestDBName', ':group:end', diff --git a/libraries/navigation_header.inc.php b/libraries/navigation_header.inc.php index 24f2f78eb7..21f74e2dbb 100644 --- a/libraries/navigation_header.inc.php +++ b/libraries/navigation_header.inc.php @@ -55,57 +55,34 @@ if ($GLOBALS['cfg']['LeftDisplayLogo']) { ' - .($GLOBALS['cfg']['MainPageIconic'] - ? PMA_getImage('b_home.png', __('Home')) - : __('Home')) + . PMA_getImage('b_home.png', __('Home')) .'' . "\n"; // if we have chosen server if ($server != 0) { // Logout for advanced authentication if ($GLOBALS['cfg']['Server']['auth_type'] != 'config') { - echo ($GLOBALS['cfg']['MainPageIconic'] ? '' : ' - '); echo '' - .($GLOBALS['cfg']['MainPageIconic'] - ? PMA_getImage('s_loggoff.png', __('Log out')) - : __('Log out')) + . PMA_getImage('s_loggoff.png', __('Log out')) .'' . "\n"; } // end if ($GLOBALS['cfg']['Server']['auth_type'] != 'config' $anchor = 'querywindow.php?' . PMA_generate_common_url($db, $table); - if ($GLOBALS['cfg']['MainPageIconic']) { - $query_frame_link_text = PMA_getImage('b_selboard.png', __('Query window')); - } else { - echo '
' . "\n"; - $query_frame_link_text = __('Query window'); - } echo '' . $query_frame_link_text . '' . "\n"; + echo '>' . PMA_getImage('b_selboard.png', __('Query window')) . '' . "\n"; } // end if ($server != 0) echo ' '; - if ($GLOBALS['cfg']['MainPageIconic']) { - echo PMA_getImage('b_docs.png', __('phpMyAdmin documentation')); - } else { - echo '
' . __('phpMyAdmin documentation'); - } + echo PMA_getImage('b_docs.png', __('phpMyAdmin documentation')); echo '
'; - $documentation_link = PMA_showMySQLDocu('', '', true); - if ($GLOBALS['cfg']['MainPageIconic']) { - echo $documentation_link . "\n"; - } else { - preg_match('/]*>/', $documentation_link, $matches); - $link = $matches[0]; - echo substr($link, 0, strlen($link) - 1) . ' title="' . __('Documentation') . '" >' - . '
' . __('Documentation') . ''; - } + echo PMA_showMySQLDocu('', '', true) . "\n"; $params = array('uniqid' => uniqid()); if (!empty($GLOBALS['db'])) { @@ -113,11 +90,7 @@ if ($GLOBALS['cfg']['LeftDisplayLogo']) { } echo ''; - if ($GLOBALS['cfg']['MainPageIconic']) { - echo PMA_getImage('s_reload.png', __('Reload navigation frame')); - } else { - echo '
' . __('Reload navigation frame'); - } + echo PMA_getImage('s_reload.png', __('Reload navigation frame')); echo '
'; echo '' . "\n"; diff --git a/libraries/user_preferences.lib.php b/libraries/user_preferences.lib.php index 497b28ed11..73588a4d35 100644 --- a/libraries/user_preferences.lib.php +++ b/libraries/user_preferences.lib.php @@ -234,7 +234,7 @@ function PMA_userprefs_redirect(array $forms, array $old_settings, $file_name, $ array_diff_assoc($old_settings, $new_settings) + array_diff_assoc($new_settings, $old_settings) ); - $check_keys = array('NaturalOrder', 'MainPageIconic', 'DefaultTabDatabase', + $check_keys = array('NaturalOrder', 'DefaultTabDatabase', 'Server/hide_db', 'Server/only_db'); $check_keys = array_merge( $check_keys, $forms['Left_frame']['Left_frame'], diff --git a/server_binlog.php b/server_binlog.php index adfa9a39f1..db5313d774 100644 --- a/server_binlog.php +++ b/server_binlog.php @@ -73,7 +73,7 @@ if (empty($_REQUEST['dontlimitchars'])) { * Displays the sub-page heading */ echo '

' . "\n" - . ($GLOBALS['cfg']['MainPageIconic'] ? PMA_getImage('s_tbl.png') : '') + . PMA_getImage('s_tbl.png') . ' ' . __('Binary log') . "\n" . '

' . "\n"; diff --git a/server_collations.php b/server_collations.php index 2d2a67b78b..5ce7643d74 100644 --- a/server_collations.php +++ b/server_collations.php @@ -26,9 +26,7 @@ require 'libraries/server_links.inc.php'; * Displays the sub-page heading */ echo '

' . "\n" - . ' ' . ($GLOBALS['cfg']['MainPageIconic'] - ? PMA_getImage('s_asci.png') - : '') + . ' ' . PMA_getImage('s_asci.png') . '' . __('Character Sets and Collations') . "\n" . '

' . "\n"; diff --git a/server_databases.php b/server_databases.php index 7b6fd7ca7c..57ae0edfc0 100644 --- a/server_databases.php +++ b/server_databases.php @@ -94,7 +94,7 @@ if ((isset($_REQUEST['drop_selected_dbs']) || isset($_REQUEST['query_type'])) if ($mult_btn == __('Yes')) { $number_of_databases = count($selected); } else { - $number_of_databases = 0; + $number_of_databases = 0; } $message = PMA_Message::success(_ngettext('%1$d database has been dropped successfully.', '%1$d databases have been dropped successfully.', $number_of_databases)); $message->addParam($number_of_databases); @@ -113,9 +113,7 @@ require 'libraries/server_links.inc.php'; * Displays the sub-page heading */ echo '

' . "\n" - . ($GLOBALS['cfg']['MainPageIconic'] - ? PMA_getImage('s_db.png') - : '') + . PMA_getImage('s_db.png') . ($dbstats ? __('Databases statistics') : __('Databases')) . "\n" .'

' . "\n"; diff --git a/server_engines.php b/server_engines.php index 81d0bdbcbe..19e484a0bb 100644 --- a/server_engines.php +++ b/server_engines.php @@ -33,7 +33,7 @@ if (empty($_REQUEST['engine']) * Displays the sub-page heading */ echo '

' . "\n" - . ($GLOBALS['cfg']['MainPageIconic'] ? PMA_getImage('b_engine.png') : '') + . PMA_getImage('b_engine.png') . "\n" . __('Storage Engines') . "\n" . '

' . "\n"; @@ -82,7 +82,7 @@ if (empty($_REQUEST['engine']) $engine_plugin = PMA_StorageEngine::getEngine($_REQUEST['engine']); echo '

' . "\n" - . ($GLOBALS['cfg']['MainPageIconic'] ? PMA_getImage('b_engine.png') : '') + . PMA_getImage('b_engine.png') . ' ' . htmlspecialchars($engine_plugin->getTitle()) . "\n" . ' ' . PMA_showMySQLDocu('', $engine_plugin->getMysqlHelpPage()) . "\n" . '

' . "\n\n"; diff --git a/server_plugins.php b/server_plugins.php index 0b836b946f..26fec2fe11 100644 --- a/server_plugins.php +++ b/server_plugins.php @@ -32,9 +32,7 @@ require 'libraries/server_links.inc.php'; * Displays the sub-page heading */ echo '

' . "\n" - . ($GLOBALS['cfg']['MainPageIconic'] - ? '' : '') + . PMA_getImage('b_engine.png') . "\n" . __('Plugins') . "\n" . '

' . "\n"; @@ -91,10 +89,8 @@ pma_theme_image = ''; ' - : ''; ?> + echo PMA_getImage('s_asc.png'); + ?> diff --git a/server_status.php b/server_status.php index c35ae5a7bc..be4f8ac748 100644 --- a/server_status.php +++ b/server_status.php @@ -786,9 +786,7 @@ require 'libraries/server_links.inc.php'; /** * Displays the sub-page heading */ -if ($GLOBALS['cfg']['MainPageIconic']) { - echo PMA_getImage('s_status.png'); -} +echo PMA_getImage('s_status.png'); echo __('Runtime Information'); diff --git a/server_synchronize.php b/server_synchronize.php index 029202e494..68a859a24a 100644 --- a/server_synchronize.php +++ b/server_synchronize.php @@ -1222,11 +1222,7 @@ if (! isset($_REQUEST['submit_connect']) /** * Displays the sub-page heading */ - echo '

' . ($GLOBALS['cfg']['MainPageIconic'] - ? PMA_getImage('s_sync.png') - : '') - . __('Synchronize') - .'

'; + echo '

' . PMA_getImage('s_sync.png') . __('Synchronize') .'

'; echo '
' . "\n" - . ($cfg['MainPageIconic'] ? PMA_getImage('s_vars.png') : '') +echo '

' . PMA_getImage('s_vars.png') . '' . __('Server variables and settings') . "\n" . PMA_showMySQLDocu('server_system_variables', 'server_system_variables') . '

' . "\n"; diff --git a/themes/original/css/theme_right.css.php b/themes/original/css/theme_right.css.php index e83d33bd75..683e382359 100644 --- a/themes/original/css/theme_right.css.php +++ b/themes/original/css/theme_right.css.php @@ -1267,7 +1267,6 @@ div#queryboxcontainer div#bookmarkoptions { /* END main page */ - /* iconic view for ul items */ li#li_create_database { list-style-image: url(getImgPath(); ?>b_newdb.png); @@ -1349,7 +1348,6 @@ li#li_user_preferences { list-style-image: url(getImgPath(); ?>b_tblops.png); } /* END iconic view for ul items */ - #body_browse_foreigners { diff --git a/themes/pmahomme/css/theme_right.css.php b/themes/pmahomme/css/theme_right.css.php index d32fbc3e89..f5e4cd071b 100644 --- a/themes/pmahomme/css/theme_right.css.php +++ b/themes/pmahomme/css/theme_right.css.php @@ -1655,7 +1655,6 @@ div#queryboxcontainer div#bookmarkoptions { /* END main page */ - /* iconic view for ul items */ li#li_create_database { list-style-image: url(getImgPath(); ?>b_newdb.png); @@ -1737,7 +1736,6 @@ li#li_user_preferences { list-style-image: url(getImgPath(); ?>b_tblops.png); } /* END iconic view for ul items */ - #body_browse_foreigners {