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-06-02 22:27:20 +0400
committerMadhura Jayaratne <madhura.cj@gmail.com>2012-06-02 22:27:20 +0400
commit8fe94907282a157e3e5d3b63faebfa9df98b5420 (patch)
tree90387a1a75f4d791bdf27f23f4fa81b97acce130 /libraries
parentbff981f893aa9537f11e530b547761c965ddda42 (diff)
Various coding style fixes
Diffstat (limited to 'libraries')
-rw-r--r--libraries/StorageEngine.class.php3
-rw-r--r--libraries/Theme_Manager.class.php9
-rw-r--r--libraries/sqlvalidator.lib.php11
-rw-r--r--libraries/tbl_replace_fields.inc.php4
-rw-r--r--libraries/tbl_select.lib.php60
5 files changed, 50 insertions, 37 deletions
diff --git a/libraries/StorageEngine.class.php b/libraries/StorageEngine.class.php
index 41d582e87f..d4e51dae6b 100644
--- a/libraries/StorageEngine.class.php
+++ b/libraries/StorageEngine.class.php
@@ -252,7 +252,8 @@ class PMA_StorageEngine
if (isset($variables[$row['Variable_name']])) {
$mysql_vars[$row['Variable_name']] = $variables[$row['Variable_name']];
} elseif (! $like
- && strpos(strtolower($row['Variable_name']), strtolower($this->engine)) !== 0) {
+ && strpos(strtolower($row['Variable_name']), strtolower($this->engine)) !== 0
+ ) {
continue;
}
$mysql_vars[$row['Variable_name']]['value'] = $row['Value'];
diff --git a/libraries/Theme_Manager.class.php b/libraries/Theme_Manager.class.php
index 0a83f42bd2..3aa286c119 100644
--- a/libraries/Theme_Manager.class.php
+++ b/libraries/Theme_Manager.class.php
@@ -293,13 +293,18 @@ class PMA_Theme_Manager
// check for themes directory
while (false !== ($PMA_Theme = readdir($handleThemes))) {
// Skip non dirs, . and ..
- if ($PMA_Theme == '.' || $PMA_Theme == '..' || ! is_dir($this->getThemesPath() . '/' . $PMA_Theme)) {
+ if ($PMA_Theme == '.'
+ || $PMA_Theme == '..'
+ || ! is_dir($this->getThemesPath() . '/' . $PMA_Theme)
+ ) {
continue;
}
if (array_key_exists($PMA_Theme, $this->themes)) {
continue;
}
- $new_theme = PMA_Theme::load($this->getThemesPath() . '/' . $PMA_Theme);
+ $new_theme = PMA_Theme::load(
+ $this->getThemesPath() . '/' . $PMA_Theme
+ );
if ($new_theme) {
$new_theme->setId($PMA_Theme);
$this->themes[$PMA_Theme] = $new_theme;
diff --git a/libraries/sqlvalidator.lib.php b/libraries/sqlvalidator.lib.php
index 0f5ed9e112..e6d6d5c992 100644
--- a/libraries/sqlvalidator.lib.php
+++ b/libraries/sqlvalidator.lib.php
@@ -49,11 +49,11 @@ if ($cfg['SQLValidator']['use'] == true) {
*
* <http://developer.mimer.com/validator/index.htm>
*
- * @param string SQL query to validate
+ * @param string $sql SQL query to validate
*
- * @return string Validator result string
+ * @return string Validator result string
*
- * @global array The PMA configuration array
+ * @global array The PMA configuration array
*/
function PMA_validateSQL($sql)
{
@@ -74,7 +74,10 @@ function PMA_validateSQL($sql)
// The class defaults to anonymous with an empty password
// automatically
if ($cfg['SQLValidator']['username'] != '') {
- $srv->setCredentials($cfg['SQLValidator']['username'], $cfg['SQLValidator']['password']);
+ $srv->setCredentials(
+ $cfg['SQLValidator']['username'],
+ $cfg['SQLValidator']['password']
+ );
}
// Identify ourselves to the server properly...
diff --git a/libraries/tbl_replace_fields.inc.php b/libraries/tbl_replace_fields.inc.php
index e5a33d4654..e410dbff0e 100644
--- a/libraries/tbl_replace_fields.inc.php
+++ b/libraries/tbl_replace_fields.inc.php
@@ -51,7 +51,9 @@ if (false !== $possibly_uploaded_val) {
// $key contains the md5() of the fieldname
if ($type != 'protected' && $type != 'set' && 0 === strlen($val)) {
// best way to avoid problems in strict mode (works also in non-strict mode)
- if (isset($multi_edit_auto_increment) && isset($multi_edit_auto_increment[$key])) {
+ if (isset($multi_edit_auto_increment)
+ && isset($multi_edit_auto_increment[$key])
+ ) {
$val = 'NULL';
} else {
$val = "''";
diff --git a/libraries/tbl_select.lib.php b/libraries/tbl_select.lib.php
index ae94346cde..757b94970c 100644
--- a/libraries/tbl_select.lib.php
+++ b/libraries/tbl_select.lib.php
@@ -414,18 +414,18 @@ function PMA_tbl_search_getWhereClause($fields, $names, $types, $collations,
/**
* Builds the sql search query from the post parameters
*
- * @param string $table Selected table
- * @param array $fields Entered values of the columns
- * @param array $criteriaColumnNames Names of all columns
- * @param array $criteriaColumnTypes Types of all columns
- * @param array $criteriaColumnCollations Collations of all columns
- * @param array $criteriaColumnOperators Operators for given column type
+ * @param string $table Selected table
+ * @param array $fields Entered values of the columns
+ * @param array $criteriaColumnNames Names of all columns
+ * @param array $criteriaColumnTypes Types of all columns
+ * @param array $criteriaColumnCollations Collations of all columns
+ * @param array $criteriaColumnOperators Operators for given column type
*
* @return string the generated SQL query
*/
function PMA_tblSearchBuildSqlQuery($table, $fields, $criteriaColumnNames,
- $criteriaColumnTypes, $criteriaColumnCollations, $criteriaColumnOperators)
-{
+ $criteriaColumnTypes, $criteriaColumnCollations, $criteriaColumnOperators
+) {
$sql_query = 'SELECT ';
// If only distinct values are needed
@@ -449,7 +449,7 @@ function PMA_tblSearchBuildSqlQuery($table, $fields, $criteriaColumnNames,
$criteriaColumnCollations, $criteriaColumnOperators
);
$sql_query .= $whereClause;
-
+
// if the search results are to be ordered
if ($_POST['orderByColumn'] != '--nil--') {
$sql_query .= ' ORDER BY ' . PMA_backquote($_POST['orderByColumn'])
@@ -461,17 +461,17 @@ function PMA_tblSearchBuildSqlQuery($table, $fields, $criteriaColumnNames,
/**
* Generates the where clause for the SQL search query to be executed
*
- * @param array $fields Entered values of the columns
- * @param array $criteriaColumnNames Names of all columns
- * @param array $criteriaColumnTypes Types of all columns
- * @param array $criteriaColumnCollations Collations of all columns
- * @param array $criteriaColumnOperators Operators for given column type
+ * @param array $fields Entered values of the columns
+ * @param array $criteriaColumnNames Names of all columns
+ * @param array $criteriaColumnTypes Types of all columns
+ * @param array $criteriaColumnCollations Collations of all columns
+ * @param array $criteriaColumnOperators Operators for given column type
*
* @return string the generated where clause
*/
function PMA_tblSearchGenerateWhereClause($fields, $criteriaColumnNames,
- $criteriaColumnTypes, $criteriaColumnCollations, $criteriaColumnOperators)
-{
+ $criteriaColumnTypes, $criteriaColumnCollations, $criteriaColumnOperators
+) {
$fullWhereClause = '';
if (trim($_POST['customWhereClause']) != '') {
@@ -520,8 +520,8 @@ function PMA_tblSearchGenerateWhereClause($fields, $criteriaColumnNames,
* @return string the generated HTML
*/
function PMA_tblSearchGetGeomFuncHtml($geomColumnFlag, $columnTypes,
-$geom_types, $column_index)
-{
+ $geom_types, $column_index
+) {
$html_output = '';
// return if geometrical column is not present
if (! $geomColumnFlag) {
@@ -530,7 +530,7 @@ $geom_types, $column_index)
/**
* Displays 'Function' column if it is present
- */
+ */
$html_output .= '<td>';
// if a geometry column is present
if (in_array($columnTypes[$column_index], $geom_types)) {
@@ -563,7 +563,7 @@ $geom_types, $column_index)
* @return string the generated HTML
*/
function PMA_tblSearchGetOptions($columnNames, $columnCount)
-{
+{
$html_output = '';
$html_output .= PMA_getDivForSliderEffect('searchoptions', __('Options'));
/**
@@ -619,7 +619,9 @@ function PMA_tblSearchGetOptions($columnNames, $columnCount)
'ASC' => __('Ascending'),
'DESC' => __('Descending')
);
- $html_output .= PMA_getRadioFields('order', $choices, 'ASC', false, true, "formelement");
+ $html_output .= PMA_getRadioFields(
+ 'order', $choices, 'ASC', false, true, "formelement"
+ );
unset($choices);
$html_output .= '</fieldset><br style="clear: both;"/></div></fieldset>';
@@ -642,9 +644,9 @@ function PMA_tblSearchGetOptions($columnNames, $columnCount)
* @return string the generated HTML
*/
function PMA_tblSearchGetFieldsTableHtml($columnNames, $columnTypes,
-$columnCollations, $columnNullFlags, $geomColumnFlag, $columnCount,
-$foreigners, $db, $table)
-{
+ $columnCollations, $columnNullFlags, $geomColumnFlag, $columnCount,
+ $foreigners, $db, $table
+) {
$html_output = '';
$html_output .= '<table class="data">';
$html_output .= PMA_tbl_setTableHeader($geomColumnFlag) . '<tbody>';
@@ -704,7 +706,7 @@ $foreigners, $db, $table)
/**
* Generates the table search form under table search tab
*
- * @param string $goto Goto URL
+ * @param string $goto Goto URL
* @param array $columnNames Names of columns in the table
* @param array $columnTypes Types of columns in the table
* @param array $columnCollations Collation of all columns
@@ -718,9 +720,9 @@ $foreigners, $db, $table)
* @return string the generated HTML for table search form
*/
function PMA_tblSearchGetSelectionForm($goto, $columnNames, $columnTypes,
-$columnCollations, $columnNullFlags, $geomColumnFlag, $columnCount,
-$foreigners, $db, $table)
-{
+ $columnCollations, $columnNullFlags, $geomColumnFlag, $columnCount,
+ $foreigners, $db, $table
+) {
$html_output = '';
$html_output .= '<fieldset id="fieldset_subtab">';
$url_params = array();
@@ -742,7 +744,7 @@ $foreigners, $db, $table)
*/
$html_output .= PMA_tblSearchGetFieldsTableHtml(
$columnNames, $columnTypes, $columnCollations, $columnNullFlags,
- $geomColumnFlag, $columnCount, $foreigners, $db, $table
+ $geomColumnFlag, $columnCount, $foreigners, $db, $table
);
$html_output .= '<div id="gis_editor"></div>'