The branch, master has been updated
via 88db32fafd2b8a6e3b4f3c04af4b1a34fdac7b3c (commit)
via 388dfb0e5d46961a4f987991bc76451a2052e96e (commit)
from ca16dfb46f98776555e0bcca8bcf17b8fafd49fc (commit)
- Log -----------------------------------------------------------------
commit 88db32fafd2b8a6e3b4f3c04af4b1a34fdac7b3c
Author: Madhura Jayaratne <[email protected]>
Date: Fri Aug 19 20:31:44 2011 +0530
More coding style improvements
commit 388dfb0e5d46961a4f987991bc76451a2052e96e
Author: Madhura Jayaratne <[email protected]>
Date: Fri Aug 19 20:29:47 2011 +0530
Coding style improvements
-----------------------------------------------------------------------
Summary of changes:
libraries/user_preferences.inc.php | 9 +++++--
libraries/user_preferences.lib.php | 40 ++++++++++++++++++++++++-----------
2 files changed, 33 insertions(+), 16 deletions(-)
diff --git a/libraries/user_preferences.inc.php
b/libraries/user_preferences.inc.php
index 1b04217..8295100 100644
--- a/libraries/user_preferences.inc.php
+++ b/libraries/user_preferences.inc.php
@@ -27,9 +27,12 @@ $tabs_icons = array(
'Import' => 'ic_b_import',
'Export' => 'ic_b_export');
echo '<ul id="topmenu2">';
-echo PMA_generate_html_tab(array(
- 'link' => 'prefs_manage.php',
- 'text' => __('Manage your settings'))) . "\n";
+echo PMA_generate_html_tab(
+ array(
+ 'link' => 'prefs_manage.php',
+ 'text' => __('Manage your settings')
+ )
+) . "\n";
echo '<li> </li>' . "\n";
$script_name = basename($GLOBALS['PMA_PHP_SELF']);
foreach (array_keys($forms) as $formset) {
diff --git a/libraries/user_preferences.lib.php
b/libraries/user_preferences.lib.php
index 2246a4d..84ca5c4 100644
--- a/libraries/user_preferences.lib.php
+++ b/libraries/user_preferences.lib.php
@@ -16,9 +16,12 @@ function PMA_userprefs_pageinit()
$cf = ConfigFile::getInstance();
$cf->resetConfigData(); // start with a clean instance
$cf->setAllowedKeys($forms_all_keys);
- $cf->setCfgUpdateReadMapping(array(
- 'Server/hide_db' => 'Servers/1/hide_db',
- 'Server/only_db' => 'Servers/1/only_db'));
+ $cf->setCfgUpdateReadMapping(
+ array(
+ 'Server/hide_db' => 'Servers/1/hide_db',
+ 'Server/only_db' => 'Servers/1/only_db'
+ )
+ );
$cf->updateWithGlobalConfig($GLOBALS['cfg']);
}
@@ -64,7 +67,8 @@ function PMA_load_userprefs()
/**
* Saves user preferences
*
- * @param array $config_data
+ * @param array $config_array configuration array
+ *
* @return true|PMA_Message
*/
function PMA_save_userprefs(array $config_array)
@@ -80,7 +84,7 @@ function PMA_save_userprefs(array $config_array)
'db' => $config_array,
'ts' => time());
if (isset($_SESSION['cache'][$cache_key]['userprefs'])) {
- unset($_SESSION['cache'][$cache_key]['userprefs']);
+ unset($_SESSION['cache'][$cache_key]['userprefs']);
}
return true;
}
@@ -122,6 +126,7 @@ function PMA_save_userprefs(array $config_array)
* (blacklist) and keys from user preferences form (whitelist)
*
* @param array $config_data path => value pairs
+ *
* @return array
*/
function PMA_apply_userprefs(array $config_data)
@@ -155,6 +160,7 @@ function PMA_apply_userprefs(array $config_data)
* Reads user preferences field names
*
* @param array|null $forms
+ *
* @return array
*/
function PMA_read_userprefs_fieldnames(array $forms = null)
@@ -185,8 +191,10 @@ function PMA_read_userprefs_fieldnames(array $forms = null)
*
* No validation is done!
*
- * @param string $cfg_name
- * @param mixed $value
+ * @param string $path configuration
+ * @param mixed $value value
+ * @param mixed $default_value default value
+ *
* @return void
*/
function PMA_persist_option($path, $value, $default_value)
@@ -222,12 +230,16 @@ function PMA_userprefs_redirect(array $forms, array
$old_settings, $file_name, $
? $old_settings['config_data']
: array();
$new_settings = ConfigFile::getInstance()->getConfigArray();
- $diff_keys = array_keys(array_diff_assoc($old_settings, $new_settings)
- + array_diff_assoc($new_settings, $old_settings));
+ $diff_keys = array_keys(
+ array_diff_assoc($old_settings, $new_settings)
+ + array_diff_assoc($new_settings, $old_settings)
+ );
$check_keys = array('NaturalOrder', 'MainPageIconic',
'DefaultTabDatabase',
'Server/hide_db', 'Server/only_db');
- $check_keys = array_merge($check_keys,
$forms['Left_frame']['Left_frame'],
- $forms['Left_frame']['Left_databases']);
+ $check_keys = array_merge(
+ $check_keys, $forms['Left_frame']['Left_frame'],
+ $forms['Left_frame']['Left_databases']
+ );
$diff = array_intersect($check_keys, $diff_keys);
$reload_left_frame = !empty($diff);
}
@@ -242,8 +254,10 @@ function PMA_userprefs_redirect(array $forms, array
$old_settings, $file_name, $
if ($hash) {
$hash = '#' . urlencode($hash);
}
- PMA_sendHeaderLocation($GLOBALS['cfg']['PmaAbsoluteUri'] . $file_name
- . PMA_generate_common_url($url_params, '&') . $hash);
+ PMA_sendHeaderLocation(
+ $GLOBALS['cfg']['PmaAbsoluteUri'] . $file_name
+ . PMA_generate_common_url($url_params, '&') . $hash
+ );
}
/**
hooks/post-receive
--
phpMyAdmin
------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
user administration capabilities and model configuration. Take
the hassle out of deploying and managing Subversion and the
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
Phpmyadmin-git mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/phpmyadmin-git