From e67a0a2531fff325477c5babcfffbf205ca755b3 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Fri, 23 Sep 2011 08:43:41 +0530 Subject: [PATCH] Spaces between parameters in function calls --- db_operations.php | 2 +- export.php | 2 +- libraries/List_Database.class.php | 4 +- libraries/auth/swekey/swekey.php | 40 +++++++++---------- libraries/header_scripts.inc.php | 2 +- libraries/import.lib.php | 2 +- libraries/mult_submits.inc.php | 4 +- libraries/replication.inc.php | 2 +- libraries/select_lang.lib.php | 4 +- libraries/server_synchronize.lib.php | 8 ++-- libraries/svg_plot/pma_scatter_plot.php | 12 +++--- libraries/svg_plot/pma_svg_data_point.php | 8 ++-- libraries/sysinfo.lib.php | 4 +- navigation.php | 2 +- pmd_general.php | 18 ++++----- pmd_pdf.php | 4 +- pmd_relation_new.php | 8 ++-- pmd_relation_upd.php | 6 +-- schema_export.php | 4 +- server_synchronize.php | 8 ++-- server_variables.php | 14 +++---- sql.php | 6 +-- tbl_addfield.php | 2 +- tbl_export.php | 2 +- tbl_operations.php | 2 +- tbl_replace.php | 2 +- tbl_select.php | 4 +- tbl_structure.php | 2 +- tbl_tracking.php | 4 +- test/Environment_test.php | 2 +- test/classes/PMA_Config_test.php | 32 +++++++-------- .../PMA_contains_nonprintable_ascii_test.php | 4 +- .../common/PMA_display_html_checkbox_test.php | 8 ++-- .../common/PMA_display_html_radio_test.php | 16 ++++---- ...PMA_extractValueFromFormattedSize_test.php | 8 ++-- test/libraries/common/PMA_formatSql_test.php | 28 ++++++------- .../PMA_generate_html_dropdown_test.php | 6 +-- .../PMA_generate_slider_effect_test.php | 6 +-- test/libraries/common/PMA_getDbLink_test.php | 6 +-- .../common/PMA_getTitleForTarget_test.php | 2 +- test/libraries/core/PMA_array_test.php | 12 +++--- .../core/PMA_checkPageValidity_test.php | 10 ++--- .../core/PMA_getTableCount_test_dis.php | 2 +- .../core/PMA_headerLocation_test_disabled.php | 8 ++-- .../core/PMA_warnMissingExtension_test.php | 10 ++--- 45 files changed, 171 insertions(+), 171 deletions(-) diff --git a/db_operations.php b/db_operations.php index 512c894c9f..b364d8134c 100644 --- a/db_operations.php +++ b/db_operations.php @@ -234,7 +234,7 @@ if (strlen($db) && (! empty($db_rename) || ! empty($db_copy))) { // 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); diff --git a/export.php b/export.php index b82ef99233..0c8a644d48 100644 --- a/export.php +++ b/export.php @@ -342,7 +342,7 @@ if (!$save_on_server) { // 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); diff --git a/libraries/List_Database.class.php b/libraries/List_Database.class.php index 1e1b31fe46..760d19d294 100644 --- a/libraries/List_Database.class.php +++ b/libraries/List_Database.class.php @@ -453,10 +453,10 @@ require_once './libraries/List.class.php'; // 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; } diff --git a/libraries/auth/swekey/swekey.php b/libraries/auth/swekey/swekey.php index 869d3d5c97..453437eea5 100644 --- a/libraries/auth/swekey/swekey.php +++ b/libraries/auth/swekey/swekey.php @@ -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 /** diff --git a/libraries/header_scripts.inc.php b/libraries/header_scripts.inc.php index 056386882a..21c5d9a870 100644 --- a/libraries/header_scripts.inc.php +++ b/libraries/header_scripts.inc.php @@ -61,7 +61,7 @@ if (typeof(parent.document) != 'undefined' && typeof(parent.document) != 'unknow } 0) { - echo implode("\n",$GLOBALS['js_script'])."\n"; + echo implode("\n", $GLOBALS['js_script'])."\n"; } foreach ($GLOBALS['js_events'] as $js_event) { diff --git a/libraries/import.lib.php b/libraries/import.lib.php index c2de6692c6..c44cb16b2a 100644 --- a/libraries/import.lib.php +++ b/libraries/import.lib.php @@ -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 { diff --git a/libraries/mult_submits.inc.php b/libraries/mult_submits.inc.php index 6a4c2422a8..1c3713bafd 100644 --- a/libraries/mult_submits.inc.php +++ b/libraries/mult_submits.inc.php @@ -430,14 +430,14 @@ elseif ($mult_btn == __('Yes')) { 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; diff --git a/libraries/replication.inc.php b/libraries/replication.inc.php index 0871d32ec5..b0576800ab 100644 --- a/libraries/replication.inc.php +++ b/libraries/replication.inc.php @@ -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); } /** diff --git a/libraries/select_lang.lib.php b/libraries/select_lang.lib.php index 62b1ea7d83..a755511ede 100644 --- a/libraries/select_lang.lib.php +++ b/libraries/select_lang.lib.php @@ -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; } diff --git a/libraries/server_synchronize.lib.php b/libraries/server_synchronize.lib.php index 8947b00d19..0bc7ae555c 100644 --- a/libraries/server_synchronize.lib.php +++ b/libraries/server_synchronize.lib.php @@ -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; diff --git a/libraries/svg_plot/pma_scatter_plot.php b/libraries/svg_plot/pma_scatter_plot.php index c0be405289..e7ef90e804 100644 --- a/libraries/svg_plot/pma_scatter_plot.php +++ b/libraries/svg_plot/pma_scatter_plot.php @@ -119,7 +119,7 @@ class PMA_Scatter_Plot $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 @@ class PMA_Scatter_Plot * * @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 @@ class PMA_Scatter_Plot 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; diff --git a/libraries/svg_plot/pma_svg_data_point.php b/libraries/svg_plot/pma_svg_data_point.php index ceaa8bc46b..cc07bffca5 100644 --- a/libraries/svg_plot/pma_svg_data_point.php +++ b/libraries/svg_plot/pma_svg_data_point.php @@ -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 @@ class PMA_SVG_Data_Point extends PMA_SVG_Data_Element 'stroke' => $options['color'], 'stroke-width'=> 2, ); - + $row = ' $val) { $row .= ' ' . $option . '="' . trim($val) . '"'; @@ -59,7 +59,7 @@ class PMA_SVG_Data_Point extends PMA_SVG_Data_Element return $row; } - + public function getCx() { return $this->cx; diff --git a/libraries/sysinfo.lib.php b/libraries/sysinfo.lib.php index 96ac0e2939..e5f18b704a 100644 --- a/libraries/sysinfo.lib.php +++ b/libraries/sysinfo.lib.php @@ -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])); } diff --git a/navigation.php b/navigation.php index 26716ac7bd..1db459c7e0 100644 --- a/navigation.php +++ b/navigation.php @@ -315,7 +315,7 @@ if ($GLOBALS['cfg']['LeftFrameLight'] && strlen($GLOBALS['db'])) { echo '' . "\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']); } /** diff --git a/pmd_general.php b/pmd_general.php index 73c65439df..3f59a4cd64 100644 --- a/pmd_general.php +++ b/pmd_general.php @@ -287,17 +287,17 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) { } else { ?> .png" alt="*" /> diff --git a/pmd_pdf.php b/pmd_pdf.php index f8102dae1d..95a412b5b0 100644 --- a/pmd_pdf.php +++ b/pmd_pdf.php @@ -39,7 +39,7 @@ if (isset($mode)) { 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 @@ if (1 == count($choices)) { echo $choices['create_export']; echo ''; } 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 '
'; echo ''; diff --git a/pmd_relation_new.php b/pmd_relation_new.php index a171658661..c0a6ad8d7c 100644 --- a/pmd_relation_new.php +++ b/pmd_relation_new.php @@ -24,7 +24,7 @@ if (PMA_foreignkey_supported($type_T1) && PMA_foreignkey_supported($type_T2) && $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 (PMA_foreignkey_supported($type_T1) && PMA_foreignkey_supported($type_T2) && 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 @@ if (PMA_foreignkey_supported($type_T1) && PMA_foreignkey_supported($type_T2) && . '\'' . 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.')); diff --git a/pmd_relation_upd.php b/pmd_relation_upd.php index 29bc68832b..7fd78e4953 100644 --- a/pmd_relation_upd.php +++ b/pmd_relation_upd.php @@ -13,8 +13,8 @@ extract($_POST, EXTR_SKIP); 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 @@ if ($try_to_delete_internal_relation) { } 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"); diff --git a/schema_export.php b/schema_export.php index e566c7c416..d67bc85aff 100644 --- a/schema_export.php +++ b/schema_export.php @@ -28,7 +28,7 @@ require_once "./libraries/schema/Export_Relation_Schema.class.php"; * call and include the appropriate Schema Class depending on $export_type * default is PDF */ -global $db,$export_type; +global $db, $export_type; if (!isset($export_type) || !preg_match('/^[a-zA-Z]+$/', $export_type)) { $export_type = 'pdf'; } @@ -36,7 +36,7 @@ PMA_DBI_select_db($db); $path = PMA_securePath(ucfirst($export_type)); if (!file_exists('./libraries/schema/' . $path . '_Relation_Schema.class.php')) { - PMA_Export_Relation_Schema::dieSchema($_POST['chpage'],$export_type,__('File doesn\'t exist')); + PMA_Export_Relation_Schema::dieSchema($_POST['chpage'], $export_type, __('File doesn\'t exist')); } require "./libraries/schema/".$path."_Relation_Schema.class.php"; $obj_schema = eval("new PMA_".$path."_Relation_Schema();"); diff --git a/server_synchronize.php b/server_synchronize.php index 8057f892b4..d4627cf5ad 100644 --- a/server_synchronize.php +++ b/server_synchronize.php @@ -587,10 +587,10 @@ if (isset($_REQUEST['Table_ids'])) { unset($delete_array[$matching_table_structure_diff[$q]]); } - PMA_addColumnsInTargetTable($src_db, $trg_db,$src_link, $trg_link, + 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, + $target_tables_keys, $uncommon_tables, $uncommon_tables_fields, $matching_table_structure_diff[$q], $uncommon_cols, false); unset($add_column_array[$matching_table_structure_diff[$q]]); @@ -653,7 +653,7 @@ if (isset($_REQUEST['Table_ids'])) { unset($delete_array[$matching_table_data_diff[$p]]); } - PMA_addColumnsInTargetTable($src_db, $trg_db,$src_link, $trg_link, + 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, @@ -1113,7 +1113,7 @@ if (isset($_REQUEST['synchronize_db'])) { $trg_link , $matching_tables_fields, $insert_array, $p, $matching_tables_keys, $matching_tables_keys, $source_columns, $add_column_array, $criteria, $target_tables_keys, $uncommon_tables, - $uncommon_tables_fields,$uncommon_cols, $alter_str_array,$source_indexes, + $uncommon_tables_fields, $uncommon_cols, $alter_str_array, $source_indexes, $target_indexes, $add_indexes_array, $alter_indexes_array, $delete_array, $update_array, true); } diff --git a/server_variables.php b/server_variables.php index af47f1fe83..f09706aaf2 100644 --- a/server_variables.php +++ b/server_variables.php @@ -45,7 +45,7 @@ if (isset($_REQUEST['ajax_request']) && $_REQUEST['ajax_request'] == true) { $varValue = PMA_DBI_fetch_single_row('SHOW GLOBAL VARIABLES WHERE Variable_name="' . PMA_sqlAddslashes($_REQUEST['varName']) . '";', 'NUM'); if (isset($VARIABLE_DOC_LINKS[$_REQUEST['varName']][3]) && $VARIABLE_DOC_LINKS[$_REQUEST['varName']][3] == 'byte') { - exit(implode(' ', PMA_formatByteDown($varValue[1],3,3))); + exit(implode(' ', PMA_formatByteDown($varValue[1], 3, 3))); } exit($varValue[1]); break; @@ -55,7 +55,7 @@ if (isset($_REQUEST['ajax_request']) && $_REQUEST['ajax_request'] == true) { if (isset($VARIABLE_DOC_LINKS[$_REQUEST['varName']][3]) && $VARIABLE_DOC_LINKS[$_REQUEST['varName']][3] == 'byte' - && preg_match('/^\s*(\d+(\.\d+)?)\s*(mb|kb|mib|kib|gb|gib)\s*$/i',$value,$matches)) { + && preg_match('/^\s*(\d+(\.\d+)?)\s*(mb|kb|mib|kib|gb|gib)\s*$/i', $value, $matches)) { $exp = array('kb' => 1, 'kib' => 1, 'mb' => 2, 'mib' => 2, 'gb' => 3, 'gib' => 3); $value = floatval($matches[1]) * pow(1024, $exp[strtolower($matches[3])]); } else { @@ -97,7 +97,7 @@ require './libraries/server_links.inc.php'; echo '

' . "\n" . ($cfg['MainPageIconic'] ? '' : '') . '' . __('Server variables and settings') . "\n" - . PMA_showMySQLDocu('server_system_variables','server_system_variables') + . PMA_showMySQLDocu('server_system_variables', 'server_system_variables') . '

' . "\n"; /** @@ -138,7 +138,7 @@ foreach ($serverVars as $name => $value) { ?> - + $value) { () - + @@ -162,13 +162,13 @@ foreach ($serverVars as $name => $value) { '.implode(' ',PMA_formatByteDown($value,3,3)).''; + return ''.implode(' ', PMA_formatByteDown($value, 3, 3)).''; else return PMA_formatNumber($value, 0); } return htmlspecialchars($value); diff --git a/sql.php b/sql.php index 619893af8e..53d9759ade 100644 --- a/sql.php +++ b/sql.php @@ -751,7 +751,7 @@ if (0 == $num_rows || $is_affected) { } else { // avoid a redirect loop when last record was deleted if (0 == $num_rows && 'sql.php' == $cfg['DefaultTabTable']) { - $goto = str_replace('sql.php','tbl_structure.php',$goto); + $goto = str_replace('sql.php', 'tbl_structure.php', $goto); } PMA_sendHeaderLocation($cfg['PmaAbsoluteUri'] . str_replace('&', '&', $goto) . '&message=' . urlencode($message)); } // end else @@ -869,7 +869,7 @@ $(document).ready(makeProfilingChart); echo '
'; echo '' . "\n"; echo ' ' . "\n"; - echo ' ' . "\n"; + echo ' ' . "\n"; echo ' ' . "\n"; echo ' ' . "\n"; @@ -877,7 +877,7 @@ $(document).ready(makeProfilingChart); foreach ($profiling_results as $one_result) { echo ' ' . "\n"; echo '' . "\n"; - echo '' . "\n"; + echo '' . "\n"; $chart_json[ucwords($one_result['Status'])] = $one_result['Duration']; } diff --git a/tbl_addfield.php b/tbl_addfield.php index 50fb4226a9..f9324fe9f3 100644 --- a/tbl_addfield.php +++ b/tbl_addfield.php @@ -187,7 +187,7 @@ if (isset($_REQUEST['do_save_data'])) { if( $GLOBALS['is_ajax_request'] == true) { $extra_data['sql_query'] = PMA_showMessage(NULL, $sql_query); - PMA_ajaxResponse($message, $message->isSuccess(),$extra_data); + PMA_ajaxResponse($message, $message->isSuccess(), $extra_data); } $active_page = 'tbl_structure.php'; diff --git a/tbl_export.php b/tbl_export.php index a2ce305d6d..379d26c37a 100644 --- a/tbl_export.php +++ b/tbl_export.php @@ -51,7 +51,7 @@ if (! empty($sql_query)) { if (isset($where_clause) && is_array($where_clause) && count($where_clause) > 0) { - $wheres[] = '(' . implode(') OR (',$where_clause) . ')'; + $wheres[] = '(' . implode(') OR (', $where_clause) . ')'; } if (!empty($analyzed_sql[0]['where_clause'])) { diff --git a/tbl_operations.php b/tbl_operations.php index b2f8ab16df..95b602e208 100644 --- a/tbl_operations.php +++ b/tbl_operations.php @@ -231,7 +231,7 @@ if (isset($result) && empty($message_to_show)) { $_type = $result ? 'success' : 'error'; if ( $_REQUEST['ajax_request'] == true) { $extra_data['sql_query'] = PMA_showMessage(NULL, $sql_query); - PMA_ajaxResponse($_message,$_message->isSuccess() ,$extra_data); + PMA_ajaxResponse($_message, $_message->isSuccess(), $extra_data); } } if (! empty($warning_messages)) { diff --git a/tbl_replace.php b/tbl_replace.php index 987fb0a779..b6da1ba655 100644 --- a/tbl_replace.php +++ b/tbl_replace.php @@ -554,7 +554,7 @@ if ($GLOBALS['is_ajax_request'] == true) { } /**Get the total row count of the table*/ - $extra_data['row_count'] = PMA_Table::countRecords($_REQUEST['db'],$_REQUEST['table']); + $extra_data['row_count'] = PMA_Table::countRecords($_REQUEST['db'], $_REQUEST['table']); $extra_data['sql_query'] = PMA_showMessage($message, $GLOBALS['display_query']); PMA_ajaxResponse($message, $message->isSuccess(), $extra_data); } diff --git a/tbl_select.php b/tbl_select.php index 8bb3b0e6cd..ebc3621782 100644 --- a/tbl_select.php +++ b/tbl_select.php @@ -153,7 +153,7 @@ echo PMA_generate_html_tabs(PMA_tbl_getSubTabs(), $url_params, '', 'topmenu2'); $foreignData = PMA_getForeignData($foreigners, $field, false, '', ''); - echo PMA_getForeignFields_Values($foreigners, $foreignData, $field, $fields_type, $i, $db, $table, $titles,$GLOBALS['cfg']['ForeignKeyMaxLimit'], '', true); + echo PMA_getForeignFields_Values($foreigners, $foreignData, $field, $fields_type, $i, $db, $table, $titles, $GLOBALS['cfg']['ForeignKeyMaxLimit'], '', true); ?> ' . _pgettext('None for default','None') . ''; + echo '' . _pgettext('None for default', 'None') . ''; } ?> diff --git a/test/Environment_test.php b/test/Environment_test.php index c72a1656e0..4cae38fbbd 100644 --- a/test/Environment_test.php +++ b/test/Environment_test.php @@ -26,7 +26,7 @@ class Environment_test extends PHPUnit_Framework_TestCase { try{ $pdo = new PDO("mysql:host=".TESTSUITE_SERVER.";dbname=".TESTSUITE_DATABASE, TESTSUITE_USER, TESTSUITE_PASSWORD); - $this->assertNull($pdo->errorCode(),"Error when trying to connect to database"); + $this->assertNull($pdo->errorCode(), "Error when trying to connect to database"); //$pdo->beginTransaction(); $test = $pdo->exec("SHOW TABLES;"); diff --git a/test/classes/PMA_Config_test.php b/test/classes/PMA_Config_test.php index 9a5bf7845b..42fab56033 100644 --- a/test/classes/PMA_Config_test.php +++ b/test/classes/PMA_Config_test.php @@ -46,7 +46,7 @@ class PMA_ConfigTest extends PHPUnit_Framework_TestCase public function testCheckSystem() { $this->object->checkSystem(); - + $this->assertNotNull($this->object->get('PMA_VERSION')); $this->assertNotEmpty($this->object->get('PMA_THEME_VERSION')); $this->assertNotEmpty($this->object->get('PMA_THEME_GENERATION')); @@ -66,7 +66,7 @@ class PMA_ConfigTest extends PHPUnit_Framework_TestCase $this->object->set('PMA_USR_BROWSER_AGENT', 'MOZILLA'); $this->object->set('PMA_USR_BROWSER_VER', 5); $this->object->checkOutputCompression(); - $this->assertEquals('auto',$this->object->get("OBGzip")); + $this->assertEquals('auto', $this->object->get("OBGzip")); ini_set('zlib.output_compression', 'Off'); $this->object->checkOutputCompression(); @@ -120,15 +120,15 @@ class PMA_ConfigTest extends PHPUnit_Framework_TestCase { $prevIsGb2Val = $this->object->get('PMA_IS_GD2'); - $this->object->set('GD2Available','yes'); + $this->object->set('GD2Available', 'yes'); $this->object->checkGd2(); $this->assertEquals(1, $this->object->get('PMA_IS_GD2')); - $this->object->set('GD2Available','no'); + $this->object->set('GD2Available', 'no'); $this->object->checkGd2(); $this->assertEquals(0, $this->object->get('PMA_IS_GD2')); - $this->object->set('GD2Available',$prevIsGb2Val); + $this->object->set('GD2Available', $prevIsGb2Val); if (!@function_exists('imagecreatetruecolor')) { $this->object->checkGd2(); @@ -179,7 +179,7 @@ class PMA_ConfigTest extends PHPUnit_Framework_TestCase if (defined('PHP_OS')) { switch (PHP_OS) { - case stristr(PHP_OS,'win'): + case stristr(PHP_OS, 'win'): $this->assertEquals(1, $this->object->get('PMA_IS_WINDOWS'), 'PHP_OS equals: ' . PHP_OS . ' PMA_IS_WINDOWS should be 1'); break; case stristr(PHP_OS, 'OS/2'): @@ -192,7 +192,7 @@ class PMA_ConfigTest extends PHPUnit_Framework_TestCase } else { $this->assertEquals(0, $this->object->get('PMA_IS_WINDOWS'), 'PMA_IS_WINDOWS Default to Unix or Equiv'); - define('PHP_OS','Windows'); + define('PHP_OS', 'Windows'); $this->assertEquals(1, $this->object->get('PMA_IS_WINDOWS'), 'PMA_IS_WINDOWS must be 1'); } } @@ -247,7 +247,7 @@ class PMA_ConfigTest extends PHPUnit_Framework_TestCase $expectedSettings = PMA_array_merge_recursive($this->object->settings, $loadedConf); - $this->assertEquals($expectedSettings, $this->object->settings,'Settings loaded wrong'); + $this->assertEquals($expectedSettings, $this->object->settings, 'Settings loaded wrong'); $this->assertFalse($this->object->error_config_default_file); } @@ -298,7 +298,7 @@ class PMA_ConfigTest extends PHPUnit_Framework_TestCase public function testCheckPmaAbsoluteUriEmpty() { - $this->object->set('PmaAbsoluteUri',''); + $this->object->set('PmaAbsoluteUri', ''); $this->assertFalse($this->object->checkPmaAbsoluteUri(), 'PmaAbsoluteUri is not set and should be error'); $this->assertTrue($this->object->error_pma_uri, 'PmaAbsoluteUri is not set and should be error'); } @@ -308,11 +308,11 @@ class PMA_ConfigTest extends PHPUnit_Framework_TestCase */ public function testCheckPmaAbsoluteUriNormal() { - $this->object->set('PmaAbsoluteUri','http://localhost/phpmyadmin/'); + $this->object->set('PmaAbsoluteUri', 'http://localhost/phpmyadmin/'); $this->object->checkPmaAbsoluteUri(); $this->assertEquals("http://localhost/phpmyadmin/", $this->object->get('PmaAbsoluteUri')); - $this->object->set('PmaAbsoluteUri','http://localhost/phpmyadmin'); + $this->object->set('PmaAbsoluteUri', 'http://localhost/phpmyadmin'); $this->object->checkPmaAbsoluteUri(); $this->assertEquals("http://localhost/phpmyadmin/", $this->object->get('PmaAbsoluteUri'), 'Expected trailing slash at the end of the phpMyAdmin uri'); @@ -328,7 +328,7 @@ class PMA_ConfigTest extends PHPUnit_Framework_TestCase $_SERVER['HTTPS'] = 'off'; $GLOBALS['PMA_PHP_SELF'] = 'index.php'; - $this->object->set('PmaAbsoluteUri',''); + $this->object->set('PmaAbsoluteUri', ''); $this->object->checkPmaAbsoluteUri(); $this->assertEquals("http://localhost/", $this->object->get('PmaAbsoluteUri')); @@ -339,12 +339,12 @@ class PMA_ConfigTest extends PHPUnit_Framework_TestCase */ public function testCheckPmaAbsoluteUriUser() { - $this->object->set('PmaAbsoluteUri','http://user:pwd@localhost/phpmyadmin/index.php'); + $this->object->set('PmaAbsoluteUri', 'http://user:pwd@localhost/phpmyadmin/index.php'); $this->object->checkPmaAbsoluteUri(); $this->assertEquals("http://user:pwd@localhost/phpmyadmin/index.php/", $this->object->get('PmaAbsoluteUri')); - $this->object->set('PmaAbsoluteUri','https://user:pwd@localhost/phpmyadmin/index.php'); + $this->object->set('PmaAbsoluteUri', 'https://user:pwd@localhost/phpmyadmin/index.php'); $this->object->checkPmaAbsoluteUri(); $this->assertEquals("https://user:pwd@localhost/phpmyadmin/index.php/", $this->object->get('PmaAbsoluteUri')); @@ -400,7 +400,7 @@ class PMA_ConfigTest extends PHPUnit_Framework_TestCase { $this->object->checkCookiePath(); echo $this->object->get('cookie_path'); - $this->assertEquals('',$this->object->get('cookie_path')); + $this->assertEquals('', $this->object->get('cookie_path')); } /** @@ -546,7 +546,7 @@ class PMA_ConfigTest extends PHPUnit_Framework_TestCase public function testSetUserValue() { $this->object->setUserValue(null, 'lang', $GLOBALS['lang'], 'en'); - $this->object->setUserValue("TEST_COOKIE_USER_VAL",'','cfg_val_1'); + $this->object->setUserValue("TEST_COOKIE_USER_VAL", '', 'cfg_val_1'); // Remove the following lines when you implement this test. // $this->markTestIncomplete( diff --git a/test/libraries/common/PMA_contains_nonprintable_ascii_test.php b/test/libraries/common/PMA_contains_nonprintable_ascii_test.php index a5c04c1839..f13154bfe6 100644 --- a/test/libraries/common/PMA_contains_nonprintable_ascii_test.php +++ b/test/libraries/common/PMA_contains_nonprintable_ascii_test.php @@ -22,7 +22,7 @@ class PMA_contains_nonprintable_ascii extends PHPUnit_Framework_TestCase array("new\nline", 1), array("tab\tspace", 1), array("escape" . chr(27) . "char", 1), - array("chars%$\r\n",1), + array("chars%$\r\n", 1), ); } @@ -30,7 +30,7 @@ class PMA_contains_nonprintable_ascii extends PHPUnit_Framework_TestCase * @dataProvider dataProvider */ function testContainsNonPrintableAscii($str, $res){ - $this->assertEquals($res,PMA_contains_nonprintable_ascii($str)); + $this->assertEquals($res, PMA_contains_nonprintable_ascii($str)); } } diff --git a/test/libraries/common/PMA_display_html_checkbox_test.php b/test/libraries/common/PMA_display_html_checkbox_test.php index b33a5fe848..4eca6368f6 100644 --- a/test/libraries/common/PMA_display_html_checkbox_test.php +++ b/test/libraries/common/PMA_display_html_checkbox_test.php @@ -21,7 +21,7 @@ class PMA_display_html_checkbox_test extends PHPUnit_Extensions_OutputTestCase $label = "text_label_for_checkbox"; $this->expectOutputString(''); - PMA_display_html_checkbox($name,$label,false,false); + PMA_display_html_checkbox($name, $label, false, false); } function testDisplayHtmlCheckboxChecked() @@ -30,7 +30,7 @@ class PMA_display_html_checkbox_test extends PHPUnit_Extensions_OutputTestCase $label = "text_label_for_checkbox"; $this->expectOutputString(''); - PMA_display_html_checkbox($name,$label,true,false); + PMA_display_html_checkbox($name, $label, true, false); } function testDisplayHtmlCheckboxOnclick() @@ -39,7 +39,7 @@ class PMA_display_html_checkbox_test extends PHPUnit_Extensions_OutputTestCase $label = "text_label_for_checkbox"; $this->expectOutputString(''); - PMA_display_html_checkbox($name,$label,false,true); + PMA_display_html_checkbox($name, $label, false, true); } function testDisplayHtmlCheckboxCheckedOnclick() @@ -48,7 +48,7 @@ class PMA_display_html_checkbox_test extends PHPUnit_Extensions_OutputTestCase $label = "text_label_for_checkbox"; $this->expectOutputString(''); - PMA_display_html_checkbox($name,$label,true,true); + PMA_display_html_checkbox($name, $label, true, true); } } diff --git a/test/libraries/common/PMA_display_html_radio_test.php b/test/libraries/common/PMA_display_html_radio_test.php index c5f2d4b898..6e7c014120 100644 --- a/test/libraries/common/PMA_display_html_radio_test.php +++ b/test/libraries/common/PMA_display_html_radio_test.php @@ -21,7 +21,7 @@ class PMA_display_html_radio_test extends PHPUnit_Extensions_OutputTestCase $choices = array(); $this->expectOutputString(""); - PMA_display_html_radio($name,$choices); + PMA_display_html_radio($name, $choices); } function testDisplayHtmlRadio() @@ -40,7 +40,7 @@ class PMA_display_html_radio_test extends PHPUnit_Extensions_OutputTestCase } $this->expectOutputString($out); - PMA_display_html_radio($name,$choices); + PMA_display_html_radio($name, $choices); } function testDisplayHtmlRadioWithChecked() @@ -63,7 +63,7 @@ class PMA_display_html_radio_test extends PHPUnit_Extensions_OutputTestCase } $this->expectOutputString($out); - PMA_display_html_radio($name,$choices,$checked_choice); + PMA_display_html_radio($name, $choices, $checked_choice); } function testDisplayHtmlRadioWithCheckedWithClass() @@ -89,7 +89,7 @@ class PMA_display_html_radio_test extends PHPUnit_Extensions_OutputTestCase } $this->expectOutputString($out); - PMA_display_html_radio($name,$choices,$checked_choice,true,false,$class); + PMA_display_html_radio($name, $choices, $checked_choice, true, false, $class); } function testDisplayHtmlRadioWithoutBR() @@ -111,7 +111,7 @@ class PMA_display_html_radio_test extends PHPUnit_Extensions_OutputTestCase } $this->expectOutputString($out); - PMA_display_html_radio($name,$choices,$checked_choice,false); + PMA_display_html_radio($name, $choices, $checked_choice, false); } function testDisplayHtmlRadioEscapeLabelEscapeLabel() @@ -134,7 +134,7 @@ class PMA_display_html_radio_test extends PHPUnit_Extensions_OutputTestCase } $this->expectOutputString($out); - PMA_display_html_radio($name,$choices,$checked_choice,true,true); + PMA_display_html_radio($name, $choices, $checked_choice, true, true); } function testDisplayHtmlRadioEscapeLabelNotEscapeLabel() @@ -157,7 +157,7 @@ class PMA_display_html_radio_test extends PHPUnit_Extensions_OutputTestCase } $this->expectOutputString($out); - PMA_display_html_radio($name,$choices,$checked_choice,true,false); + PMA_display_html_radio($name, $choices, $checked_choice, true, false); } function testDisplayHtmlRadioEscapeLabelEscapeLabelWithClass() @@ -183,6 +183,6 @@ class PMA_display_html_radio_test extends PHPUnit_Extensions_OutputTestCase } $this->expectOutputString($out); - PMA_display_html_radio($name,$choices,$checked_choice,true,true,$class); + PMA_display_html_radio($name, $choices, $checked_choice, true, true, $class); } } \ No newline at end of file diff --git a/test/libraries/common/PMA_extractValueFromFormattedSize_test.php b/test/libraries/common/PMA_extractValueFromFormattedSize_test.php index c1e4f20773..d80c79748f 100644 --- a/test/libraries/common/PMA_extractValueFromFormattedSize_test.php +++ b/test/libraries/common/PMA_extractValueFromFormattedSize_test.php @@ -18,21 +18,21 @@ class PMA_extractValueFromFormattedSize_test extends PHPUnit_Framework_TestCase function testExtractValueFromFormattedSizeNoFormat(){ - $this->assertEquals(-1,PMA_extractValueFromFormattedSize(100)); + $this->assertEquals(-1, PMA_extractValueFromFormattedSize(100)); } function testExtractValueFromFormattedSizeGB(){ - $this->assertEquals(10737418240,PMA_extractValueFromFormattedSize("10GB")); + $this->assertEquals(10737418240, PMA_extractValueFromFormattedSize("10GB")); } function testExtractValueFromFormattedSizeMB(){ - $this->assertEquals(15728640,PMA_extractValueFromFormattedSize("15MB")); + $this->assertEquals(15728640, PMA_extractValueFromFormattedSize("15MB")); } function testExtractValueFromFormattedSizeK(){ - $this->assertEquals(262144,PMA_extractValueFromFormattedSize("256K")); + $this->assertEquals(262144, PMA_extractValueFromFormattedSize("256K")); } } diff --git a/test/libraries/common/PMA_formatSql_test.php b/test/libraries/common/PMA_formatSql_test.php index a3683f82f5..e7a1c1faee 100644 --- a/test/libraries/common/PMA_formatSql_test.php +++ b/test/libraries/common/PMA_formatSql_test.php @@ -47,7 +47,7 @@ class PMA_formatSql_test extends PHPUnit_Framework_TestCase global $cfg; $cfg['SQP']['fmtType'] = 'html'; $sql = "SELECT * FROM tTable;"; - $this->assertEquals("
\n$sql\n
",PMA_formatSql($sql)); + $this->assertEquals("
\n$sql\n
", PMA_formatSql($sql)); } function testFormatSQLfmTypeHtml_1(){ @@ -81,7 +81,7 @@ class PMA_formatSql_test extends PHPUnit_Framework_TestCase $unparsed = "SELECT 1;"; $expected = 'SELECT 1 ;

'; - $this->assertEquals($expected,PMA_formatSql($sql, $unparsed)); + $this->assertEquals($expected, PMA_formatSql($sql, $unparsed)); } function testFormatSQLfmTypeHtml_2(){ @@ -128,7 +128,7 @@ class PMA_formatSql_test extends PHPUnit_Framework_TestCase ); $expected = 'SELECT *
FROM `tTable` ;

'; - $this->assertEquals($expected,PMA_formatSql($sql, $unparsed)); + $this->assertEquals($expected, PMA_formatSql($sql, $unparsed)); } function testFormatSQLfmTypeHtml_3(){ @@ -263,7 +263,7 @@ class PMA_formatSql_test extends PHPUnit_Framework_TestCase $expected = 'SELECT *
FROM `tTable_A` A
INNER JOIN `tTable_B` B ON B.ID = A.ID;

'; - $this->assertEquals($expected,PMA_formatSql($sql, $unparsed)); + $this->assertEquals($expected, PMA_formatSql($sql, $unparsed)); } function testFormatSQLfmTypeText_1(){ @@ -297,7 +297,7 @@ class PMA_formatSql_test extends PHPUnit_Framework_TestCase $unparsed = "SELECT 1;"; $expected = 'SELECT 1 ;

'; - $this->assertEquals($expected,PMA_formatSql($sql, $unparsed)); + $this->assertEquals($expected, PMA_formatSql($sql, $unparsed)); } function testFormatSQLfmTypeText_2(){ @@ -344,7 +344,7 @@ class PMA_formatSql_test extends PHPUnit_Framework_TestCase ); $expected = 'SELECT *
FROM `tTable` ;

'; - $this->assertEquals($expected,PMA_formatSql($sql, $unparsed)); + $this->assertEquals($expected, PMA_formatSql($sql, $unparsed)); } function testFormatSQLfmTypeText_3(){ @@ -478,7 +478,7 @@ class PMA_formatSql_test extends PHPUnit_Framework_TestCase ); $expected = 'SELECT *
FROM `tTable_A` A
INNER JOIN `tTable_B` B ON B.ID = A.ID;

'; - $this->assertEquals($expected,PMA_formatSql($sql, $unparsed)); + $this->assertEquals($expected, PMA_formatSql($sql, $unparsed)); } function testFormatSQLfmTypeNone_1(){ @@ -512,10 +512,10 @@ class PMA_formatSql_test extends PHPUnit_Framework_TestCase $unparsed = "SELECT 1;"; $expected = "
\nSELECT 1;\n
"; - $this->assertEquals($expected,PMA_formatSql($sql, $unparsed)); + $this->assertEquals($expected, PMA_formatSql($sql, $unparsed)); $expected = "SELECT 1;"; - $this->assertEquals($expected,PMA_formatSql($sql)); + $this->assertEquals($expected, PMA_formatSql($sql)); } function testFormatSQLfmTypeNone_2(){ @@ -562,10 +562,10 @@ class PMA_formatSql_test extends PHPUnit_Framework_TestCase ); $expected = "
\nSELECT * from `tTable`;\n
"; - $this->assertEquals($expected,PMA_formatSql($sql, $unparsed)); + $this->assertEquals($expected, PMA_formatSql($sql, $unparsed)); $expected = "SELECT * from `tTable`;"; - $this->assertEquals($expected,PMA_formatSql($sql)); + $this->assertEquals($expected, PMA_formatSql($sql)); } function testFormatSQLfmTypeNone_3(){ @@ -699,10 +699,10 @@ class PMA_formatSql_test extends PHPUnit_Framework_TestCase ); $expected = "
\nSELECT * FROM `tTable_A` A INNER JOIN `tTable_B` B ON B.ID = A.ID;\n
"; - $this->assertEquals($expected,PMA_formatSql($sql, $unparsed)); + $this->assertEquals($expected, PMA_formatSql($sql, $unparsed)); $expected = 'SELECT * FROM `tTable_A` A INNER JOIN `tTable_B` B ON B.ID = A.ID;'; - $this->assertEquals($expected,PMA_formatSql($sql)); + $this->assertEquals($expected, PMA_formatSql($sql)); } function testFormatSQLWithoutType(){ @@ -739,7 +739,7 @@ class PMA_formatSql_test extends PHPUnit_Framework_TestCase global $SQP_errorString; $SQP_errorString = true; $sql = array("raw" => "& \" < >"); - $this->assertEquals("& " < >",PMA_formatSql($sql)); + $this->assertEquals("& " < >", PMA_formatSql($sql)); $SQP_errorString = false; } } diff --git a/test/libraries/common/PMA_generate_html_dropdown_test.php b/test/libraries/common/PMA_generate_html_dropdown_test.php index 8e27c2088b..0035646496 100644 --- a/test/libraries/common/PMA_generate_html_dropdown_test.php +++ b/test/libraries/common/PMA_generate_html_dropdown_test.php @@ -24,7 +24,7 @@ class PMA_generate_html_dropdown_test extends PHPUnit_Framework_TestCase $result = ''; - $this->assertEquals($result, PMA_generate_html_dropdown($name,$choices,$active_choice,$id)); + $this->assertEquals($result, PMA_generate_html_dropdown($name, $choices, $active_choice, $id)); } function testGenerateHtmlDropdown() @@ -44,7 +44,7 @@ class PMA_generate_html_dropdown_test extends PHPUnit_Framework_TestCase } $result .= ''; - $this->assertEquals($result, PMA_generate_html_dropdown($name,$choices,$active_choice,$id)); + $this->assertEquals($result, PMA_generate_html_dropdown($name, $choices, $active_choice, $id)); } function testGenerateHtmlDropdownWithActive() @@ -64,6 +64,6 @@ class PMA_generate_html_dropdown_test extends PHPUnit_Framework_TestCase } $result .= ''; - $this->assertEquals($result, PMA_generate_html_dropdown($name,$choices,$active_choice,$id)); + $this->assertEquals($result, PMA_generate_html_dropdown($name, $choices, $active_choice, $id)); } } \ No newline at end of file diff --git a/test/libraries/common/PMA_generate_slider_effect_test.php b/test/libraries/common/PMA_generate_slider_effect_test.php index 62458be8da..8012cef7b7 100644 --- a/test/libraries/common/PMA_generate_slider_effect_test.php +++ b/test/libraries/common/PMA_generate_slider_effect_test.php @@ -24,7 +24,7 @@ class PMA_generate_slider_effect_test extends PHPUnit_Extensions_OutputTestCase $message = "test_message"; $this->expectOutputString('
' . "\n" . ' '); - PMA_generate_slider_effect($id,$message); + PMA_generate_slider_effect($id, $message); } function testGenerateSliderEffectTestClosed() @@ -36,7 +36,7 @@ class PMA_generate_slider_effect_test extends PHPUnit_Extensions_OutputTestCase $message = "test_message"; $this->expectOutputString('
' . __('Status') . PMA_showMySQLDocu('general-thread-states','general-thread-states') . '' . __('Status') . PMA_showMySQLDocu('general-thread-states', 'general-thread-states') . '' . __('Time') . '
' . ucwords($one_result['Status']) . '' . (PMA_formatNumber($one_result['Duration'],3,1)) . 's' . (PMA_formatNumber($one_result['Duration'], 3, 1)) . 's diff --git a/tbl_tracking.php b/tbl_tracking.php index 6148bbbd3d..847578c794 100644 --- a/tbl_tracking.php +++ b/tbl_tracking.php @@ -104,7 +104,7 @@ if (isset($_REQUEST['report_export'])) { // Export as file download if (isset($_REQUEST['report_export']) && $_REQUEST['export_type'] == 'sqldumpfile') { - @ini_set('url_rewriter.tags',''); + @ini_set('url_rewriter.tags', ''); $dump = "# " . sprintf(__('Tracking report for table `%s`'), htmlspecialchars($_REQUEST['table'])) . "\n" . "# " . date('Y-m-d H:i:s') . "\n"; @@ -665,7 +665,7 @@ if ($last_version > 0) { +);?>"> |