Permalink
Browse files

Spaces between parameters in function calls

  • Loading branch information...
1 parent ac088aa commit e67a0a2531fff325477c5babcfffbf205ca755b3 @madhuracj madhuracj committed Sep 23, 2011
Showing with 171 additions and 171 deletions.
  1. +1 −1 db_operations.php
  2. +1 −1 export.php
  3. +2 −2 libraries/List_Database.class.php
  4. +20 −20 libraries/auth/swekey/swekey.php
  5. +1 −1 libraries/header_scripts.inc.php
  6. +1 −1 libraries/import.lib.php
  7. +2 −2 libraries/mult_submits.inc.php
  8. +1 −1 libraries/replication.inc.php
  9. +2 −2 libraries/select_lang.lib.php
  10. +4 −4 libraries/server_synchronize.lib.php
  11. +6 −6 libraries/svg_plot/pma_scatter_plot.php
  12. +4 −4 libraries/svg_plot/pma_svg_data_point.php
  13. +2 −2 libraries/sysinfo.lib.php
  14. +1 −1 navigation.php
  15. +9 −9 pmd_general.php
  16. +2 −2 pmd_pdf.php
  17. +4 −4 pmd_relation_new.php
  18. +3 −3 pmd_relation_upd.php
  19. +2 −2 schema_export.php
  20. +4 −4 server_synchronize.php
  21. +7 −7 server_variables.php
  22. +3 −3 sql.php
  23. +1 −1 tbl_addfield.php
  24. +1 −1 tbl_export.php
  25. +1 −1 tbl_operations.php
  26. +1 −1 tbl_replace.php
  27. +2 −2 tbl_select.php
  28. +1 −1 tbl_structure.php
  29. +2 −2 tbl_tracking.php
  30. +1 −1 test/Environment_test.php
  31. +16 −16 test/classes/PMA_Config_test.php
  32. +2 −2 test/libraries/common/PMA_contains_nonprintable_ascii_test.php
  33. +4 −4 test/libraries/common/PMA_display_html_checkbox_test.php
  34. +8 −8 test/libraries/common/PMA_display_html_radio_test.php
  35. +4 −4 test/libraries/common/PMA_extractValueFromFormattedSize_test.php
  36. +14 −14 test/libraries/common/PMA_formatSql_test.php
  37. +3 −3 test/libraries/common/PMA_generate_html_dropdown_test.php
  38. +3 −3 test/libraries/common/PMA_generate_slider_effect_test.php
  39. +3 −3 test/libraries/common/PMA_getDbLink_test.php
  40. +1 −1 test/libraries/common/PMA_getTitleForTarget_test.php
  41. +6 −6 test/libraries/core/PMA_array_test.php
  42. +5 −5 test/libraries/core/PMA_checkPageValidity_test.php
  43. +1 −1 test/libraries/core/PMA_getTableCount_test_dis.php
  44. +4 −4 test/libraries/core/PMA_headerLocation_test_disabled.php
  45. +5 −5 test/libraries/core/PMA_warnMissingExtension_test.php
View
@@ -234,7 +234,7 @@
// to avoid selecting alternatively the current and new db
// we would need to modify the CREATE definitions to qualify
// the db name
- $event_names = PMA_DBI_fetch_result('SELECT EVENT_NAME FROM information_schema.EVENTS WHERE EVENT_SCHEMA= \'' . PMA_sqlAddSlashes($db,true) . '\';');
+ $event_names = PMA_DBI_fetch_result('SELECT EVENT_NAME FROM information_schema.EVENTS WHERE EVENT_SCHEMA= \'' . PMA_sqlAddSlashes($db, true) . '\';');
if ($event_names) {
foreach ($event_names as $event_name) {
PMA_DBI_select_db($db);
View
@@ -342,7 +342,7 @@ function PMA_exportOutputHandler($line)
// Download
// (avoid rewriting data containing HTML with anchors and forms;
// this was reported to happen under Plesk)
- @ini_set('url_rewriter.tags','');
+ @ini_set('url_rewriter.tags', '');
$filename = PMA_sanitize_filename($filename);
PMA_download_header($filename, $mime_type);
@@ -453,10 +453,10 @@ protected function _checkAgainstPrivTables()
// TODO: db names may contain characters
// that are regexp instructions
$re = '(^|(\\\\\\\\)+|[^\])';
- $tmp_regex = preg_replace('/' . addcslashes($re,'/') . '%/', '\\1.*', preg_replace('/' . addcslashes($re,'/') . '_/', '\\1.{1}', $tmp_matchpattern));
+ $tmp_regex = preg_replace('/' . addcslashes($re, '/') . '%/', '\\1.*', preg_replace('/' . addcslashes($re,'/') . '_/', '\\1.{1}', $tmp_matchpattern));
// Fixed db name matching
// 2000-08-28 -- Benjamin Gandon
- if (preg_match('/^' . addcslashes($tmp_regex,'/') . '$/', $tmp_db)) {
+ if (preg_match('/^' . addcslashes($tmp_regex, '/') . '$/', $tmp_db)) {
$dblist[] = $tmp_db;
break;
}
@@ -18,18 +18,18 @@
/**
* Errors codes
*/
-define ("SWEKEY_ERR_INVALID_DEV_STATUS",901); // The satus of the device is not SWEKEY_STATUS_OK
-define ("SWEKEY_ERR_INTERNAL",902); // Should never occurd
-define ("SWEKEY_ERR_OUTDATED_RND_TOKEN",910); // You random token is too old
-define ("SWEKEY_ERR_INVALID_OTP",911); // The otp was not correct
+define ("SWEKEY_ERR_INVALID_DEV_STATUS", 901); // The satus of the device is not SWEKEY_STATUS_OK
+define ("SWEKEY_ERR_INTERNAL", 902); // Should never occurd
+define ("SWEKEY_ERR_OUTDATED_RND_TOKEN", 910); // You random token is too old
+define ("SWEKEY_ERR_INVALID_OTP", 911); // The otp was not correct
/**
* Those errors are considered as an attack and your site will be blacklisted during one minute
* if you receive one of those errors
*/
-define ("SWEKEY_ERR_BADLY_ENCODED_REQUEST",920);
-define ("SWEKEY_ERR_INVALID_RND_TOKEN",921);
-define ("SWEKEY_ERR_DEV_NOT_FOUND",922);
+define ("SWEKEY_ERR_BADLY_ENCODED_REQUEST", 920);
+define ("SWEKEY_ERR_INVALID_RND_TOKEN", 921);
+define ("SWEKEY_ERR_DEV_NOT_FOUND", 922);
/**
* Default values for configuration.
@@ -252,7 +252,7 @@ function Swekey_HttpGet($url, &$response_code)
$r = new HttpRequest($url);
$options = array('timeout' => '3');
- if (substr($url,0, 6) == "https:")
+ if (substr($url, 0, 6) == "https:")
{
$sslOptions = array();
$sslOptions['verifypeer'] = true;
@@ -392,7 +392,7 @@ function Swekey_GetFastHalfRndToken()
{
// we unlink the file so no possible tempfile race attack
unlink($cachefile);
- $file = fopen($cachefile , "x");
+ $file = fopen($cachefile, "x");
if ($file != false)
{
@fwrite($file, $res);
@@ -442,22 +442,22 @@ function Swekey_CheckOtp($id, $rt, $otp)
* Values that are associated with a key.
* The following values can be returned by the Swekey_GetStatus() function
*/
-define ("SWEKEY_STATUS_OK",0);
-define ("SWEKEY_STATUS_NOT_FOUND",1); // The key does not exist in the db
-define ("SWEKEY_STATUS_INACTIVE",2); // The key has never been activated
-define ("SWEKEY_STATUS_LOST",3); // The user has lost his key
-define ("SWEKEY_STATUS_STOLEN",4); // The key was stolen
-define ("SWEKEY_STATUS_FEE_DUE",5); // The annual fee was not paid
-define ("SWEKEY_STATUS_OBSOLETE",6); // The hardware is no longer supported
-define ("SWEKEY_STATUS_UNKOWN",201); // We could not connect to the authentication server
+define ("SWEKEY_STATUS_OK", 0);
+define ("SWEKEY_STATUS_NOT_FOUND", 1); // The key does not exist in the db
+define ("SWEKEY_STATUS_INACTIVE", 2); // The key has never been activated
+define ("SWEKEY_STATUS_LOST", 3); // The user has lost his key
+define ("SWEKEY_STATUS_STOLEN", 4); // The key was stolen
+define ("SWEKEY_STATUS_FEE_DUE", 5); // The annual fee was not paid
+define ("SWEKEY_STATUS_OBSOLETE", 6); // The hardware is no longer supported
+define ("SWEKEY_STATUS_UNKOWN", 201); // We could not connect to the authentication server
/**
* Values that are associated with a key.
* The Javascript Api can also return the following values
*/
-define ("SWEKEY_STATUS_REPLACED",100); // This key has been replaced by a backup key
-define ("SWEKEY_STATUS_BACKUP_KEY",101); // This key is a backup key that is not activated yet
-define ("SWEKEY_STATUS_NOTPLUGGED",200); // This key is not plugged in the computer
+define ("SWEKEY_STATUS_REPLACED", 100); // This key has been replaced by a backup key
+define ("SWEKEY_STATUS_BACKUP_KEY", 101); // This key is a backup key that is not activated yet
+define ("SWEKEY_STATUS_NOTPLUGGED", 200); // This key is not plugged in the computer
/**
@@ -61,7 +61,7 @@
}
<?php
if(count($GLOBALS['js_script']) > 0) {
- echo implode("\n",$GLOBALS['js_script'])."\n";
+ echo implode("\n", $GLOBALS['js_script'])."\n";
}
foreach ($GLOBALS['js_events'] as $js_event) {
View
@@ -407,7 +407,7 @@ function PMA_getColumnNumberFromName($name)
// base26 to base10 conversion : multiply each number
// with corresponding value of the position, in this case
// $i=0 : 1; $i=1 : 26; $i=2 : 676; ...
- $column_number += $number * pow(26,$i);
+ $column_number += $number * pow(26, $i);
}
return $column_number;
} else {
@@ -430,14 +430,14 @@
case 'replace_prefix_tbl':
$current = $selected[$i];
- $newtablename = preg_replace("/^" . $from_prefix . "/" , $to_prefix , $current);
+ $newtablename = preg_replace("/^" . $from_prefix . "/", $to_prefix, $current);
$a_query = 'ALTER TABLE ' . PMA_backquote($selected[$i]) . ' RENAME ' . PMA_backquote($newtablename) ; // CHANGE PREFIX PATTERN
$run_parts = true;
break;
case 'copy_tbl_change_prefix':
$current = $selected[$i];
- $newtablename = preg_replace("/^" . $from_prefix . "/" , $to_prefix , $current);
+ $newtablename = preg_replace("/^" . $from_prefix . "/", $to_prefix, $current);
$a_query = 'CREATE TABLE ' . PMA_backquote($newtablename) . ' SELECT * FROM ' . PMA_backquote($selected[$i]) ; // COPY TABLE AND CHANGE PREFIX PATTERN
$run_parts = true;
break;
@@ -369,7 +369,7 @@ function PMA_replication_synchronize_db($db, $src_link, $trg_link, $data = true)
$target_columns, $alter_str_array, $add_column_array, $uncommon_columns, $criteria, $target_tables_keys, $counter);
PMA_indexesDiffInTables($src_db, $trg_db, $src_link, $trg_link, $matching_tables, $source_indexes, $target_indexes,
- $add_indexes_array, $alter_indexes_array,$remove_indexes_array, $counter);
+ $add_indexes_array, $alter_indexes_array, $remove_indexes_array, $counter);
}
/**
@@ -149,8 +149,8 @@ function PMA_langDetect($str, $envType)
if (strpos($expr, '[-_]') === false) {
$expr = str_replace('|', '([-_][[:alpha:]]{2,3})?|', $expr);
}
- if (($envType == 1 && preg_match('/^(' . addcslashes($expr,'/') . ')(;q=[0-9]\\.[0-9])?$/i', $str))
- || ($envType == 2 && preg_match('/(\(|\[|;[[:space:]])(' . addcslashes($expr,'/') . ')(;|\]|\))/i', $str))) {
+ if (($envType == 1 && preg_match('/^(' . addcslashes($expr, '/') . ')(;q=[0-9]\\.[0-9])?$/i', $str))
+ || ($envType == 2 && preg_match('/(\(|\[|;[[:space:]])(' . addcslashes($expr, '/') . ')(;|\]|\))/i', $str))) {
if (PMA_langSet($lang)) {
return true;
}
@@ -467,7 +467,7 @@ function PMA_updateTargetTables($table, $update_array, $src_db, $trg_db, $trg_li
*/
function PMA_insertIntoTargetTable($matching_table, $src_db, $trg_db, $src_link, $trg_link, $table_fields, &$array_insert, $matching_table_index,
$matching_tables_keys, $source_columns, &$add_column_array, $criteria, $target_tables_keys, $uncommon_tables, &$uncommon_tables_fields, $uncommon_cols,
- &$alter_str_array,&$source_indexes, &$target_indexes, &$add_indexes_array, &$alter_indexes_array, &$delete_array, &$update_array, $display)
+ &$alter_str_array, &$source_indexes, &$target_indexes, &$add_indexes_array, &$alter_indexes_array, &$delete_array, &$update_array, $display)
{
if (isset($array_insert[$matching_table_index])) {
if (sizeof($array_insert[$matching_table_index])) {
@@ -519,7 +519,7 @@ function PMA_insertIntoTargetTable($matching_table, $src_db, $trg_db, $src_link,
unset($delete_array[$table_index[0]]);
}
PMA_addColumnsInTargetTable($src_db, $trg_db, $src_link, $trg_link, $matching_tables, $source_columns, $add_column_array,
- $matching_tables_fields, $criteria, $matching_tables_keys, $target_tables_keys, $uncommon_tables,$uncommon_tables_fields,
+ $matching_tables_fields, $criteria, $matching_tables_keys, $target_tables_keys, $uncommon_tables, $uncommon_tables_fields,
$table_index[0], $uncommon_cols, $display);
unset($add_column_array[$table_index[0]]);
}
@@ -1125,8 +1125,8 @@ function PMA_indexesDiffInTables($src_db, $trg_db, $src_link, $trg_link, $matchi
&$alter_indexes_array, &$remove_indexes_array, $table_counter)
{
//Gets indexes information for source and target table
- $source_indexes[$table_counter] = PMA_DBI_get_table_indexes($src_db, $matching_tables[$table_counter],$src_link);
- $target_indexes[$table_counter] = PMA_DBI_get_table_indexes($trg_db, $matching_tables[$table_counter],$trg_link);
+ $source_indexes[$table_counter] = PMA_DBI_get_table_indexes($src_db, $matching_tables[$table_counter], $src_link);
+ $target_indexes[$table_counter] = PMA_DBI_get_table_indexes($trg_db, $matching_tables[$table_counter], $trg_link);
for ($a = 0; $a < sizeof($source_indexes[$table_counter]); $a++) {
$found = false;
$z = 0;
@@ -119,7 +119,7 @@ private function _handleOptions()
$this->_dataPoints = array();
if (! is_null($this->_userSpecifiedSettings)) {
foreach (array_keys($this->_userSpecifiedSettings) as $key){
- $this->_settings[$key] = $this->_userSpecifiedSettings[$key];
+ $this->_settings[$key] = $this->_userSpecifiedSettings[$key];
}
}
if ($this->_settings['dataLabel'] == '') {
@@ -188,17 +188,17 @@ public function asSVG()
*
* @return an array containing the scale, x and y offsets
*/
- private function _scaleDataSet($data,$xField,$yField)
+ private function _scaleDataSet($data, $xField, $yField)
{
- // Currently assuming only numeric fields are selected
+ // Currently assuming only numeric fields are selected
$coordinates = array();
foreach ($data as $row) {
$coordinates[0][] = $row[$xField];
$coordinates[1][] = $row[$yField];
}
for ($i = 0 ; $i < 2 ; $i++) {
- $maxC = ($i == 0) ? 500 : 320;
+ $maxC = ($i == 0) ? 500 : 320;
if ( !is_numeric($coordinates[$i][0])) {
$uniqueC = array_unique($coordinates[$i]);
@@ -244,8 +244,8 @@ private function _prepareDataSet($data, $color_number, $scale_data, $label)
for ($i = 0 ; $i < count($data) ; $i++) {
$index = $color_number % sizeof($this->_settings['colors']);
-
- $data_element = new PMA_SVG_Data_Point($scale_data[0][$i],$scale_data[1][$i],$data[$i][$label],$data[$i]);
+
+ $data_element = new PMA_SVG_Data_Point($scale_data[0][$i], $scale_data[1][$i], $data[$i][$label], $data[$i]);
$options = array('color' => $this->_settings['colors'][$index], 'id' => $i);
$this->_dataPoints[] = $data_element;
@@ -13,7 +13,7 @@ class PMA_SVG_Data_Point extends PMA_SVG_Data_Element
* X-Coordinate of the point
*/
private $cx;
-
+
/*
* Y-Coordinate of the point
*/
@@ -24,7 +24,7 @@ class PMA_SVG_Data_Point extends PMA_SVG_Data_Element
*/
public function __construct($cx, $cy, $label, $dataRow)
{
- parent::__construct($label,$dataRow);
+ parent::__construct($label, $dataRow);
$this->cx = $cx;
$this->cy = $cy;
}
@@ -50,7 +50,7 @@ protected function prepareSvg($options)
'stroke' => $options['color'],
'stroke-width'=> 2,
);
-
+
$row = '<circle cx="' . $this->cx . '" cy="' . $this->cy . '" r=".1"';
foreach ($point_options as $option => $val) {
$row .= ' ' . $option . '="' . trim($val) . '"';
@@ -59,7 +59,7 @@ protected function prepareSvg($options)
return $row;
}
-
+
public function getCx()
{
return $this->cx;
@@ -14,7 +14,7 @@
*/
function getSysInfo()
{
- $supported = array('Linux','WINNT');
+ $supported = array('Linux', 'WINNT');
$sysinfo = array();
@@ -110,7 +110,7 @@ class Linux
function loadavg() {
$buf = file_get_contents('/proc/stat');
- $nums=preg_split("/\s+/", substr($buf,0,strpos($buf,"\n")));
+ $nums=preg_split("/\s+/", substr($buf, 0, strpos($buf, "\n")));
return Array('busy' => $nums[1]+$nums[2]+$nums[3], 'idle' => intval($nums[4]));
}
View
@@ -315,7 +315,7 @@ function PMA_exitNavigationFrame()
echo '</div>' . "\n";
$common_url_query = PMA_generate_common_url();
- PMA_displayDbList($GLOBALS['pma']->databases->getGroupedDetails($_SESSION['tmp_user_values']['navi_limit_offset'],$GLOBALS['cfg']['MaxDbList']), $_SESSION['tmp_user_values']['navi_limit_offset'],$GLOBALS['cfg']['MaxDbList']);
+ PMA_displayDbList($GLOBALS['pma']->databases->getGroupedDetails($_SESSION['tmp_user_values']['navi_limit_offset'], $GLOBALS['cfg']['MaxDbList']), $_SESSION['tmp_user_values']['navi_limit_offset'], $GLOBALS['cfg']['MaxDbList']);
}
/**
View
@@ -287,17 +287,17 @@ class="M_butt" target="_self">';
} else {
?>
<img src="<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>pmd/Field_small<?php
- if (strstr($tab_column[$t_n]["TYPE"][$j],'char')
- || strstr($tab_column[$t_n]["TYPE"][$j],'text')) {
+ if (strstr($tab_column[$t_n]["TYPE"][$j], 'char')
+ || strstr($tab_column[$t_n]["TYPE"][$j], 'text')) {
echo '_char';
- } elseif (strstr($tab_column[$t_n]["TYPE"][$j],'int')
- || strstr($tab_column[$t_n]["TYPE"][$j],'float')
- || strstr($tab_column[$t_n]["TYPE"][$j],'double')
- || strstr($tab_column[$t_n]["TYPE"][$j],'decimal')) {
+ } elseif (strstr($tab_column[$t_n]["TYPE"][$j], 'int')
+ || strstr($tab_column[$t_n]["TYPE"][$j], 'float')
+ || strstr($tab_column[$t_n]["TYPE"][$j], 'double')
+ || strstr($tab_column[$t_n]["TYPE"][$j], 'decimal')) {
echo '_int';
- } elseif (strstr($tab_column[$t_n]["TYPE"][$j],'date')
- || strstr($tab_column[$t_n]["TYPE"][$j],'time')
- || strstr($tab_column[$t_n]["TYPE"][$j],'year')) {
+ } elseif (strstr($tab_column[$t_n]["TYPE"][$j], 'date')
+ || strstr($tab_column[$t_n]["TYPE"][$j], 'time')
+ || strstr($tab_column[$t_n]["TYPE"][$j], 'year')) {
echo '_date';
}
?>.png" alt="*" />
View
@@ -39,7 +39,7 @@
if ('export' == $mode) {
$sql = "REPLACE INTO " . $pma_table . " (db_name, table_name, pdf_page_number, x, y) SELECT db_name, table_name, " . $pdf_page_number_q . ", ROUND(x/" . $scale_q . ") , ROUND(y/" . $scale_q . ") y FROM " . $pmd_table . " WHERE db_name = '" . PMA_sqlAddSlashes($db) . "'";
- PMA_query_as_controluser($sql,true,PMA_DBI_QUERY_STORE);
+ PMA_query_as_controluser($sql, true, PMA_DBI_QUERY_STORE);
}
if ('import' == $mode) {
@@ -101,7 +101,7 @@
echo $choices['create_export'];
echo '<input type="hidden" name="mode" value="create_export" />';
} else {
- PMA_display_html_radio('mode', $choices, $checked_choice = '', $line_break = true, $escape_label = false, $class='');
+ PMA_display_html_radio('mode', $choices, $checked_choice = '', $line_break = true, $escape_label = false, $class = '');
}
echo '<br />';
echo '<label for="newpage">' . __('New page name: ') . '</label>';
View
@@ -24,7 +24,7 @@
$existrel_foreign = PMA_getForeigners($db, $T2, '', 'foreign');
if (isset($existrel_foreign[$F2])
&& isset($existrel_foreign[$F2]['constraint'])) {
- PMD_return_new(0,__('Error: relation already exists.'));
+ PMD_return_new(0, __('Error: relation already exists.'));
}
// note: in InnoDB, the index does not requires to be on a PRIMARY
// or UNIQUE key
@@ -56,8 +56,8 @@
if ($on_update != 'nix') {
$upd_query .= ' ON UPDATE ' . $on_update;
}
- PMA_DBI_try_query($upd_query) or PMD_return_new(0,__('Error: Relation not added.'));
- PMD_return_new(1,__('FOREIGN KEY relation added'));
+ PMA_DBI_try_query($upd_query) or PMD_return_new(0, __('Error: Relation not added.'));
+ PMD_return_new(1, __('FOREIGN KEY relation added'));
}
// internal (pmadb) relation
@@ -78,7 +78,7 @@
. '\'' . PMA_sqlAddSlashes($T1) . '\','
. '\'' . PMA_sqlAddSlashes($F1) . '\')';
- if (PMA_query_as_controluser($q , false, PMA_DBI_QUERY_STORE)) {
+ if (PMA_query_as_controluser($q, false, PMA_DBI_QUERY_STORE)) {
PMD_return_new(1, __('Internal relation added'));
} else {
PMD_return_new(0, __('Error: Relation not added.'));
View
@@ -13,8 +13,8 @@
extract($_GET, EXTR_SKIP);
$die_save_pos = 0;
require_once 'pmd_save_pos.php';
-list($DB1,$T1) = explode(".",$T1);
-list($DB2,$T2) = explode(".",$T2);
+list($DB1, $T1) = explode(".", $T1);
+list($DB2, $T2) = explode(".", $T2);
$tables = PMA_DBI_get_tables_full($db, $T1);
$type_T1 = strtoupper($tables[$T1]['ENGINE']);
@@ -54,7 +54,7 @@
}
PMD_return_upd(1, __('Relation deleted'));
-function PMD_return_upd($b,$ret)
+function PMD_return_upd($b, $ret)
{
global $K;
header("Content-Type: text/xml; charset=utf-8");
Oops, something went wrong.

0 comments on commit e67a0a2

Please sign in to comment.