Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMadhura Jayaratne <madhura.cj@gmail.com>2012-04-25 21:32:37 +0400
committerMadhura Jayaratne <madhura.cj@gmail.com>2012-04-25 21:32:37 +0400
commit50e6f3b387379becc11911ff755f3d54579c69f7 (patch)
tree401d7b4ef43b5b33c83acf80021f9fcd8b0df600
parenta817542fda9d84172ea378cc607156ca5d8c1b42 (diff)
Coding style improvements (ControlSignature)
-rw-r--r--export.php3
-rw-r--r--libraries/Config.class.php11
-rw-r--r--libraries/auth/swekey/swekey.php3
-rw-r--r--libraries/common.lib.php3
-rw-r--r--libraries/core.lib.php12
-rw-r--r--libraries/export/htmlword.php2
-rw-r--r--libraries/export/odt.php2
-rw-r--r--libraries/export/texytext.php2
-rw-r--r--libraries/mult_submits.inc.php13
-rw-r--r--libraries/rte/rte_list.lib.php6
-rw-r--r--user_password.php2
11 files changed, 28 insertions, 31 deletions
diff --git a/export.php b/export.php
index 3e93bb758f..3c54a82672 100644
--- a/export.php
+++ b/export.php
@@ -16,8 +16,7 @@ require_once 'libraries/plugin_interface.lib.php';
* Sets globals from all $_POST (in export.php only)
* Would it not be tiresome to list all export-plugin options here?
*/
-foreach ($_POST as $one_post_param => $one_post_value)
-{
+foreach ($_POST as $one_post_param => $one_post_value) {
$GLOBALS[$one_post_param] = $one_post_value;
}
diff --git a/libraries/Config.class.php b/libraries/Config.class.php
index 20df29d663..cd7a7b2148 100644
--- a/libraries/Config.class.php
+++ b/libraries/Config.class.php
@@ -469,22 +469,19 @@ class PMA_Config
$dataline = array_shift($commit);
$datalinearr = explode(' ', $dataline, 2);
$linetype = $datalinearr[0];
- if (in_array($linetype, array('author', 'committer')))
- {
+ if (in_array($linetype, array('author', 'committer'))) {
$user = $datalinearr[1];
preg_match('/([^<]+)<([^>]+)> ([0-9]+)( [^ ]+)?/', $user, $user);
$user2 = array(
'name' => trim($user[1]),
'email' => trim($user[2]),
'date' => date('Y-m-d H:i:s', $user[3]));
- if (isset($user[4]))
- {
+ if (isset($user[4])) {
$user2['date'] .= $user[4];
}
$$linetype = $user2;
}
- }
- while ($dataline != '');
+ } while ($dataline != '');
$message = trim(implode(' ', $commit));
} elseif (isset($commit_json)) {
@@ -1185,7 +1182,7 @@ class PMA_Config
}
// Reconstruct URL using parsed parts
- if($this->get('SSLPort')) {
+ if ($this->get('SSLPort')) {
$port_number = $this->get('SSLPort');
} else {
$port_number = 443;
diff --git a/libraries/auth/swekey/swekey.php b/libraries/auth/swekey/swekey.php
index 3c6bd8079a..4bf1899340 100644
--- a/libraries/auth/swekey/swekey.php
+++ b/libraries/auth/swekey/swekey.php
@@ -271,8 +271,7 @@ function Swekey_HttpGet($url, &$response_code)
$res = $reply->getBody();
$info = $r->getResponseInfo();
$response_code = $info['response_code'];
- if ($response_code != 200)
- {
+ if ($response_code != 200) {
$gSwekeyLastError = $response_code;
error_log("SWEKEY_ERROR:Error ".$gSwekeyLastError." getting ".$url);
return "";
diff --git a/libraries/common.lib.php b/libraries/common.lib.php
index a474f19e56..4bac5a0d47 100644
--- a/libraries/common.lib.php
+++ b/libraries/common.lib.php
@@ -3318,8 +3318,7 @@ function PMA_browseUploadFile($max_upload_size)
{
if ($GLOBALS['is_upload'] && !empty($GLOBALS['cfg']['UploadDir'])) {
echo '<label for="radio_import_file">';
- }
- else {
+ } else {
echo '<label for="input_import_file">';
}
echo __("Browse your computer:") . '</label>';
diff --git a/libraries/core.lib.php b/libraries/core.lib.php
index 765bea49d3..882eb1e942 100644
--- a/libraries/core.lib.php
+++ b/libraries/core.lib.php
@@ -738,16 +738,16 @@ function PMA_includeJS($url, $ie_conditional = false)
if ($ie_conditional !== false) {
if ($ie_conditional === true) {
$include .= '<!--[if IE]>' . "\n ";
- }
- else {
+ } else {
$include .= '<!--[if IE ' . $ie_conditional . ']>' . "\n ";
}
}
if (strpos($url, '?') === false) {
- $include .= '<script src="js/' . $url . '?ts=' . filemtime('js/' . $url) . '" type="text/javascript"></script>' . "\n";
- }
- else {
- $include .= '<script src="js/' . $url . '" type="text/javascript"></script>' . "\n";
+ $include .= '<script src="js/' . $url . '?ts=' . filemtime('js/' . $url)
+ . '" type="text/javascript"></script>' . "\n";
+ } else {
+ $include .= '<script src="js/' . $url
+ . '" type="text/javascript"></script>' . "\n";
}
if ($ie_conditional !== false) {
$include .= '<![endif]-->' . "\n";
diff --git a/libraries/export/htmlword.php b/libraries/export/htmlword.php
index 1c4c685fa4..81f905f0ce 100644
--- a/libraries/export/htmlword.php
+++ b/libraries/export/htmlword.php
@@ -400,7 +400,7 @@ if (isset($plugin_list)) {
$triggers = PMA_DBI_get_triggers($db, $table);
- foreach($triggers as $trigger) {
+ foreach ($triggers as $trigger) {
$dump .= '<tr class="print-category">';
$dump .= '<td class="print">' . htmlspecialchars($trigger['name']) . '</td>';
$dump .= '<td class="print">' . htmlspecialchars($trigger['action_timing']) . '</td>';
diff --git a/libraries/export/odt.php b/libraries/export/odt.php
index 6005312d6f..80be80f8c4 100644
--- a/libraries/export/odt.php
+++ b/libraries/export/odt.php
@@ -513,7 +513,7 @@ if (isset($plugin_list)) {
$triggers = PMA_DBI_get_triggers($db, $table);
- foreach($triggers as $trigger) {
+ foreach ($triggers as $trigger) {
$GLOBALS['odt_buffer'] .= '<table:table-row>';
$GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
. '<text:p>' . htmlspecialchars($trigger['name']) . '</text:p>'
diff --git a/libraries/export/texytext.php b/libraries/export/texytext.php
index 9b5fbcc075..b24509dfcf 100644
--- a/libraries/export/texytext.php
+++ b/libraries/export/texytext.php
@@ -397,7 +397,7 @@ if (isset($plugin_list)) {
$triggers = PMA_DBI_get_triggers($db, $table);
- foreach($triggers as $trigger) {
+ foreach ($triggers as $trigger) {
$dump .= '|' . $trigger['name'];
$dump .= '|' . $trigger['action_timing'];
$dump .= '|' . $trigger['event_manipulation'];
diff --git a/libraries/mult_submits.inc.php b/libraries/mult_submits.inc.php
index 7f81b3e273..9cdb39dbdb 100644
--- a/libraries/mult_submits.inc.php
+++ b/libraries/mult_submits.inc.php
@@ -251,11 +251,10 @@ if (!empty($submit_mult) && !empty($what)) {
$_url_params['table']= $table;
}
foreach ($selected as $idx => $sval) {
- if ($what == 'row_delete'){
+ if ($what == 'row_delete') {
$_url_params['selected'][] = 'DELETE FROM ' . PMA_backquote($db) . '.' . PMA_backquote($table)
. ' WHERE ' . urldecode($sval) . ' LIMIT 1;';
- }
- else {
+ } else {
$_url_params['selected'][] = $sval;
}
}
@@ -506,11 +505,15 @@ if (!empty($submit_mult) && !empty($what)) {
include './sql.php';
} elseif (!$run_parts) {
PMA_DBI_select_db($db);
- if(!isset($_REQUEST['fk_check']) && $query_type == 'drop_tbl') { // for disabling foreign key checks while dropping tables
+ // for disabling foreign key checks while dropping tables
+ if (! isset($_REQUEST['fk_check']) && $query_type == 'drop_tbl') {
PMA_DBI_query('SET FOREIGN_KEY_CHECKS = 0;');
}
$result = PMA_DBI_try_query($sql_query);
- if(!isset($_REQUEST['fk_check']) && $query_type == 'drop_tbl' && $default_fk_check_value) {
+ if (! isset($_REQUEST['fk_check'])
+ && $query_type == 'drop_tbl'
+ && $default_fk_check_value
+ ) {
PMA_DBI_query('SET FOREIGN_KEY_CHECKS = 1;');
}
if ($result && !empty($sql_query_views)) {
diff --git a/libraries/rte/rte_list.lib.php b/libraries/rte/rte_list.lib.php
index f277bdd991..b8fdb5b088 100644
--- a/libraries/rte/rte_list.lib.php
+++ b/libraries/rte/rte_list.lib.php
@@ -55,7 +55,7 @@ function PMA_RTE_getList($type, $items)
$retval .= " <th>" . __('Returns') . "</th>\n";
$retval .= " </tr>\n";
$retval .= " <tr style='display: none'>\n"; // see comment above
- for($i = 0; $i < 7; $i++) {
+ for ($i = 0; $i < 7; $i++) {
$retval .= " <td></td>\n";
}
break;
@@ -69,7 +69,7 @@ function PMA_RTE_getList($type, $items)
$retval .= " <th>" . __('Event') . "</th>\n";
$retval .= " </tr>\n";
$retval .= " <tr style='display: none'>\n"; // see comment above
- for($i = 0; $i < (empty($table) ? 7 : 6); $i++) {
+ for ($i = 0; $i < (empty($table) ? 7 : 6); $i++) {
$retval .= " <td></td>\n";
}
break;
@@ -80,7 +80,7 @@ function PMA_RTE_getList($type, $items)
$retval .= " <th>" . __('Type') . "</th>\n";
$retval .= " </tr>\n";
$retval .= " <tr style='display: none'>\n"; // see comment above
- for($i = 0; $i < 6; $i++) {
+ for ($i = 0; $i < 6; $i++) {
$retval .= " <td></td>\n";
}
break;
diff --git a/user_password.php b/user_password.php
index a9e21827b3..988e1a06c3 100644
--- a/user_password.php
+++ b/user_password.php
@@ -39,7 +39,7 @@ if (isset($_REQUEST['nopass'])) {
}
$change_password_message = PMA_setChangePasswordMsg();
$message = $change_password_message['msg'];
- if(! $change_password_message['error']) {
+ if (! $change_password_message['error']) {
PMA_changePassword($password, $message, $change_password_message);
} else {
PMA_getChangePassMessage($change_password_message);