From 94cc3813dc25b1b50337388f49492b30f135049e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 30 Jul 2013 14:44:59 +0200 Subject: [PATCH 1/2] No parenthesis around include --- libraries/Footer.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/Footer.class.php b/libraries/Footer.class.php index 49b0798577..fff26f3da0 100644 --- a/libraries/Footer.class.php +++ b/libraries/Footer.class.php @@ -71,7 +71,7 @@ class PMA_Footer { $message = '' . __('phpMyAdmin Demo Server') . ': '; if (file_exists('./revision-info.php')) { - include('./revision-info.php'); + include './revision-info.php'; $message .= sprintf( __('Currently running Git revision %1$s from the %2$s branch.'), '' From 7a97781c238a6b1bc887a9dff8f96afe9bbf82d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 30 Jul 2013 14:53:51 +0200 Subject: [PATCH 2/2] Share code for checking whether to show icons --- db_tracking.php | 6 +--- libraries/DisplayResults.class.php | 6 +--- libraries/Footer.class.php | 6 +--- libraries/Menu.class.php | 6 ++-- libraries/Util.class.php | 30 ++++++++-------- libraries/display_create_table.lib.php | 6 +--- libraries/navigation/NavigationTree.class.php | 12 ++----- libraries/operations.lib.php | 36 ++++--------------- libraries/schema/User_Schema.class.php | 6 +--- libraries/server_bin_log.lib.php | 12 ++----- libraries/sql_query_form.lib.php | 6 +--- libraries/structure.lib.php | 8 ++--- 12 files changed, 36 insertions(+), 104 deletions(-) diff --git a/db_tracking.php b/db_tracking.php index df589ed723..73ecd5b23c 100644 --- a/db_tracking.php +++ b/db_tracking.php @@ -91,11 +91,7 @@ if ($GLOBALS['dbi']->numRows($all_tables_result) > 0) { // Print out information about versions $drop_image_or_text = ''; - if (in_array( - $GLOBALS['cfg']['ActionLinksMode'], - array('icons', 'both') - ) - ) { + if (PMA_Util::showIcons('ActionLinksMode')) { $drop_image_or_text .= PMA_Util::getImage( 'b_drop.png', __('Delete tracking data for this table') diff --git a/libraries/DisplayResults.class.php b/libraries/DisplayResults.class.php index fabb04fabd..5ff12d60f1 100644 --- a/libraries/DisplayResults.class.php +++ b/libraries/DisplayResults.class.php @@ -535,11 +535,7 @@ class PMA_DisplayResults ) { $caption_output = ''; - if (in_array( - $GLOBALS['cfg']['TableNavigationLinksMode'], - array('icons', 'both') - ) - ) { + if (PMA_Util::showIcons('TableNavigationLinksMode')) { $caption_output .= $caption; } diff --git a/libraries/Footer.class.php b/libraries/Footer.class.php index fff26f3da0..c845c826f8 100644 --- a/libraries/Footer.class.php +++ b/libraries/Footer.class.php @@ -161,11 +161,7 @@ class PMA_Footer $retval .= '