diff options
author | Michal Čihař <mcihar@suse.cz> | 2011-07-22 11:18:02 +0400 |
---|---|---|
committer | Michal Čihař <mcihar@suse.cz> | 2011-07-22 11:18:02 +0400 |
commit | 25bda8e991f2820971c343315cd3ab3d974b2684 (patch) | |
tree | 6f68b4133c45eca085ee9a677ab196b037e22cd2 | |
parent | 219ec73d69a0bee94ac3bf98757db25360862b39 (diff) |
Fix spacing on opening code block
-rw-r--r-- | db_datadict.php | 2 | ||||
-rw-r--r-- | db_structure.php | 2 | ||||
-rw-r--r-- | libraries/common.lib.php | 6 | ||||
-rw-r--r-- | libraries/export/pdf.php | 10 | ||||
-rw-r--r-- | libraries/footer.inc.php | 2 | ||||
-rw-r--r-- | libraries/import/ldi.php | 2 | ||||
-rw-r--r-- | libraries/ip_allow_deny.lib.php | 2 | ||||
-rw-r--r-- | libraries/logging.lib.php | 2 | ||||
-rw-r--r-- | libraries/mult_submits.inc.php | 4 | ||||
-rw-r--r-- | libraries/relation.lib.php | 2 | ||||
-rw-r--r-- | libraries/sql_query_form.lib.php | 2 | ||||
-rw-r--r-- | libraries/sqlparser.lib.php | 6 | ||||
-rw-r--r-- | libraries/transformations.lib.php | 2 | ||||
-rw-r--r-- | pmd_general.php | 6 | ||||
-rw-r--r-- | schema_edit.php | 4 | ||||
-rw-r--r-- | server_privileges.php | 2 | ||||
-rw-r--r-- | server_synchronize.php | 2 | ||||
-rw-r--r-- | tbl_indexes.php | 2 | ||||
-rw-r--r-- | tbl_tracking.php | 10 | ||||
-rw-r--r-- | themes.php | 2 | ||||
-rw-r--r-- | transformation_wrapper.php | 2 |
21 files changed, 37 insertions, 37 deletions
diff --git a/db_datadict.php b/db_datadict.php index acd96dcbf2..531fbe06fc 100644 --- a/db_datadict.php +++ b/db_datadict.php @@ -91,7 +91,7 @@ while ($row = PMA_DBI_fetch_row($rowset)) { $pk_array[$row['Column_name']] = 1; } // Retains keys informations - if ($row['Key_name'] != $lastIndex){ + if ($row['Key_name'] != $lastIndex) { $indexes[] = $row['Key_name']; $lastIndex = $row['Key_name']; } diff --git a/db_structure.php b/db_structure.php index 6dc82bfd45..2bae5a7c62 100644 --- a/db_structure.php +++ b/db_structure.php @@ -367,7 +367,7 @@ foreach ($tables as $keyname => $each_table) { // that needs to be repaired if (isset($each_table['TABLE_ROWS']) && ($each_table['ENGINE'] != null || $table_is_view)) { if ($table_is_view) { - if ($each_table['TABLE_ROWS'] >= $GLOBALS['cfg']['MaxExactCountViews']){ + if ($each_table['TABLE_ROWS'] >= $GLOBALS['cfg']['MaxExactCountViews']) { $row_count_pre = '~'; $sum_row_count_pre = '~'; $show_superscript = PMA_showHint(PMA_sanitize(sprintf(__('This view has at least this number of rows. Please refer to %sdocumentation%s.'), '[a@./Documentation.html#cfg_MaxExactCountViews@_blank]', '[/a]'))); diff --git a/libraries/common.lib.php b/libraries/common.lib.php index fd0701bb83..34d20d9f42 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -567,7 +567,7 @@ function PMA_mysqlDie($error_message = '', $the_query = '', } // end if if (!empty($error_message)) { - $error_message = preg_replace("@((\015\012)|(\015)|(\012)){3,}@", "\n\n", $error_message); + $error_message = preg_replace("@((\015\012)|(\015)|(\012)) {3,}@", "\n\n", $error_message); } // modified to show the help on error-returns // (now error-messages-server) @@ -2692,7 +2692,7 @@ function PMA_replace_binary_contents($content) { function PMA_duplicateFirstNewline($string) { $first_occurence = strpos($string, "\r\n"); - if ($first_occurence === 0){ + if ($first_occurence === 0) { $string = "\n".$string; } return $string; @@ -3065,7 +3065,7 @@ function PMA_getFunctionsForField($field, $insert_mode) // Create the output $retval = ' <option></option>' . "\n"; // loop on the dropdown array and print all available options for that field. - foreach ($dropdown as $each_dropdown){ + foreach ($dropdown as $each_dropdown) { $retval .= ' '; $retval .= '<option'; if ($default_function === $each_dropdown) { diff --git a/libraries/export/pdf.php b/libraries/export/pdf.php index bb89fda34a..e135bc8b0e 100644 --- a/libraries/export/pdf.php +++ b/libraries/export/pdf.php @@ -213,7 +213,7 @@ class PMA_PDF extends TCPDF function setAttributes($attr = array()) { - foreach ($attr as $key => $val){ + foreach ($attr as $key => $val) { $this->$key = $val ; } } @@ -246,20 +246,20 @@ class PMA_PDF extends TCPDF // loop through results header and set initial col widths/ titles/ alignment // if a col title is less than the starting col width, reduce that column size - for ($i = 0; $i < $this->numFields; $i++){ + for ($i = 0; $i < $this->numFields; $i++) { $stringWidth = $this->getstringwidth($this->fields[$i]->name) + 6 ; // save the real title's width $titleWidth[$i] = $stringWidth; $totalTitleWidth += $stringWidth; // set any column titles less than the start width to the column title width - if ($stringWidth < $this->sColWidth){ + if ($stringWidth < $this->sColWidth) { $colFits[$i] = $stringWidth ; } $this->colTitles[$i] = $this->fields[$i]->name; $this->display_column[$i] = true; - switch ($this->fields[$i]->type){ + switch ($this->fields[$i]->type) { case 'int': $this->colAlign[$i] = 'R'; break; @@ -317,7 +317,7 @@ class PMA_PDF extends TCPDF } $totAlreadyFitted = 0; - foreach ($colFits as $key => $val){ + foreach ($colFits as $key => $val) { // set fitted columns to smallest size $this->tablewidths[$key] = $val; // to work out how much (if any) space has been freed up diff --git a/libraries/footer.inc.php b/libraries/footer.inc.php index bbeb04ba12..aa1af7a5d8 100644 --- a/libraries/footer.inc.php +++ b/libraries/footer.inc.php @@ -70,7 +70,7 @@ if (!$GLOBALS['is_ajax_request']) { <?php if (empty($GLOBALS['error_message'])) { ?> -$(document).ready(function(){ +$(document).ready(function() { // updates current settings if (window.parent.setAll) { window.parent.setAll('<?php diff --git a/libraries/import/ldi.php b/libraries/import/ldi.php index fe5264c3c7..b3b711eb91 100644 --- a/libraries/import/ldi.php +++ b/libraries/import/ldi.php @@ -80,7 +80,7 @@ if (strlen($ldi_enclosed) > 0) { if (strlen($ldi_escaped) > 0) { $sql .= ' ESCAPED BY \'' . PMA_sqlAddSlashes($ldi_escaped) . '\''; } -if (strlen($ldi_new_line) > 0){ +if (strlen($ldi_new_line) > 0) { if ($ldi_new_line == 'auto') { $ldi_new_line = PMA_whichCrlf() == "\n" ? '\n' : '\r\n'; } diff --git a/libraries/ip_allow_deny.lib.php b/libraries/ip_allow_deny.lib.php index 30bce24a74..1537b43f6c 100644 --- a/libraries/ip_allow_deny.lib.php +++ b/libraries/ip_allow_deny.lib.php @@ -30,7 +30,7 @@ function PMA_getIp() $trusted_header_value = PMA_getenv($GLOBALS['cfg']['TrustedProxies'][$direct_ip]); $matches = array(); // the $ checks that the header contains only one IP address, ?: makes sure the () don't capture - $is_ip = preg_match('|^(?:[0-9]{1,3}\.){3,3}[0-9]{1,3}$|', $trusted_header_value, $matches); + $is_ip = preg_match('|^(?:[0-9]{1,3}\.) {3,3}[0-9]{1,3}$|', $trusted_header_value, $matches); if ($is_ip && (count($matches) == 1)) { // True IP behind a proxy return $matches[0]; diff --git a/libraries/logging.lib.php b/libraries/logging.lib.php index 87642472f6..1dabc9a118 100644 --- a/libraries/logging.lib.php +++ b/libraries/logging.lib.php @@ -11,7 +11,7 @@ /** * Logs user information to webserver logs. */ -function PMA_log_user($user, $status = 'ok'){ +function PMA_log_user($user, $status = 'ok') { if (function_exists('apache_note')) { apache_note('userID', $user); apache_note('userStatus', $status); diff --git a/libraries/mult_submits.inc.php b/libraries/mult_submits.inc.php index 0f7e218d62..1d3cbd5e55 100644 --- a/libraries/mult_submits.inc.php +++ b/libraries/mult_submits.inc.php @@ -246,7 +246,7 @@ if (!empty($submit_mult) && !empty($what)) { <?php echo PMA_generate_common_hidden_inputs($_url_params); ?> -<?php if ($what == 'replace_prefix_tbl' || $what == 'copy_tbl_change_prefix'){ ?> +<?php if ($what == 'replace_prefix_tbl' || $what == 'copy_tbl_change_prefix') { ?> <fieldset class = "input"> <legend><?php echo ($what == 'replace_prefix_tbl' ? __('Replace table prefix') : __('Copy table with prefix')) ?>:</legend> <table> @@ -263,7 +263,7 @@ if (!empty($submit_mult) && !empty($what)) { </fieldset> <?php } - elseif ($what == 'add_prefix_tbl'){ ?> + elseif ($what == 'add_prefix_tbl') { ?> <fieldset class = "input"> <legend><?php echo __('Add table prefix') ?>:</legend> <table> diff --git a/libraries/relation.lib.php b/libraries/relation.lib.php index c2acd8e324..0b74c70877 100644 --- a/libraries/relation.lib.php +++ b/libraries/relation.lib.php @@ -628,7 +628,7 @@ function PMA_setDbComment($db, $comment = '') AND `column_name` = \'(db_comment)\''; } - if (isset($upd_query)){ + if (isset($upd_query)) { return PMA_query_as_controluser($upd_query); } diff --git a/libraries/sql_query_form.lib.php b/libraries/sql_query_form.lib.php index 5a0f364753..06a2b51b23 100644 --- a/libraries/sql_query_form.lib.php +++ b/libraries/sql_query_form.lib.php @@ -420,7 +420,7 @@ function PMA_sqlQueryFormBookmark() * * @usedby PMA_sqlQueryForm() */ -function PMA_sqlQueryFormUpload(){ +function PMA_sqlQueryFormUpload() { $errors = array (); $matcher = '@\.sql(\.(' . PMA_supportedDecompressions() . '))?$@'; // we allow only SQL here diff --git a/libraries/sqlparser.lib.php b/libraries/sqlparser.lib.php index 846934476b..10895f1096 100644 --- a/libraries/sqlparser.lib.php +++ b/libraries/sqlparser.lib.php @@ -1523,7 +1523,7 @@ if (! defined('PMA_MINIMUM_COMMON')) { $subresult['queryflags']['need_confirm'] = 1; } - if ($first_reserved_word=='SELECT'){ + if ($first_reserved_word=='SELECT') { $position_of_first_select = $i; } @@ -2550,7 +2550,7 @@ if (! defined('PMA_MINIMUM_COMMON')) { } break; default: - if ($close_docu_link && in_array($arr[$i]['data'], array('LIKE', 'NOT', 'IN', 'REGEXP', 'NULL'))){ + if ($close_docu_link && in_array($arr[$i]['data'], array('LIKE', 'NOT', 'IN', 'REGEXP', 'NULL'))) { $after .= '</a>'; $close_docu_link = false; } else if ($docu && isset($PMA_SQPdata_functions_docs[$arr[$i]['data']])) { @@ -2725,7 +2725,7 @@ if (! defined('PMA_MINIMUM_COMMON')) { function PMA_SQP_formatNone($arr) { $formatted_sql = htmlspecialchars($arr['raw']); - $formatted_sql = preg_replace("@((\015\012)|(\015)|(\012)){3,}@", "\n\n", $formatted_sql); + $formatted_sql = preg_replace("@((\015\012)|(\015)|(\012)) {3,}@", "\n\n", $formatted_sql); return $formatted_sql; } // end of the "PMA_SQP_formatNone()" function diff --git a/libraries/transformations.lib.php b/libraries/transformations.lib.php index e58ecf8bc1..4a69e77f35 100644 --- a/libraries/transformations.lib.php +++ b/libraries/transformations.lib.php @@ -208,7 +208,7 @@ function PMA_setMIME($db, $table, $key, $mimetype, $transformation, . '\'' . PMA_sqlAddSlashes($transformation_options) . '\')'; } - if (isset($upd_query)){ + if (isset($upd_query)) { return PMA_query_as_controluser($upd_query); } else { return false; diff --git a/pmd_general.php b/pmd_general.php index 10a862c2c5..74ff12493e 100644 --- a/pmd_general.php +++ b/pmd_general.php @@ -44,8 +44,8 @@ echo ' echo "\n"; if ($_REQUEST['query']) { echo ' - $(document).ready(function(){ - $(".trigger").click(function(){ + $(document).ready(function() { + $(".trigger").click(function() { $(".panel").toggle("fast"); $(this).toggleClass("active"); return false; @@ -113,7 +113,7 @@ echo $script_tabs . $script_contr . $script_display_field; ><img src="pmd/images/pdf.png" alt="key" width="20" height="20" title="<?php echo __('Import/Export coordinates for PDF schema'); ?>" /></a > - <?php if ($_REQUEST['query']){ + <?php if ($_REQUEST['query']) { echo '<a href="#" onClick="build_query(\'SQL Query on Database\', 0)" onmousedown="return false;" class="M_butt" target="_self">'; echo '<img src="pmd/images/query_builder.png" alt="key" width="20" height="20" title="'; diff --git a/schema_edit.php b/schema_edit.php index 1545d8f9be..4ab41d4539 100644 --- a/schema_edit.php +++ b/schema_edit.php @@ -53,7 +53,7 @@ if (! $cfgRelation['displaywork']) { require_once './libraries/footer.inc.php'; } -if (! isset($cfgRelation['table_coords'])){ +if (! isset($cfgRelation['table_coords'])) { echo sprintf(__('<b>%s</b> table not found or not set in %s'), 'table_coords', 'config.inc.php') . '<br />' . "\n" . PMA_showDocu('table_coords') . "\n"; require_once './libraries/footer.inc.php'; @@ -83,7 +83,7 @@ if ($cfgRelation['pdfwork']) { * @param string $do It tells what the Schema is supposed to do * create and select a page, generate schema etc */ - if (isset($_REQUEST['do'])){ + if (isset($_REQUEST['do'])) { $user_schema->setAction($_REQUEST['do']); $user_schema->processUserChoice(); } diff --git a/server_privileges.php b/server_privileges.php index ecd1fa6122..8dad17dc73 100644 --- a/server_privileges.php +++ b/server_privileges.php @@ -2376,7 +2376,7 @@ if (empty($_REQUEST['adduser']) && (! isset($checkprivs) || ! strlen($checkprivs $user_form .= '</tbody>' . "\n" . '</table></form>' . "\n"; - if ($GLOBALS['is_ajax_request'] == true){ + if ($GLOBALS['is_ajax_request'] == true) { $extra_data['user_form'] = $user_form; $message = PMA_Message::success(__('User has been added.')); PMA_ajaxResponse($message, $message->isSuccess(), $extra_data); diff --git a/server_synchronize.php b/server_synchronize.php index 341233601b..431ae6be4b 100644 --- a/server_synchronize.php +++ b/server_synchronize.php @@ -91,7 +91,7 @@ if ((isset($_REQUEST['submit_connect']))) { if (! $src_connection && $src_type != 'cur') { echo __('Could not connect to the source') . '<br />'; } - if (! $trg_connection && $trg_type != 'cur'){ + if (! $trg_connection && $trg_type != 'cur') { echo __('Could not connect to the target'); } echo '</div>'; diff --git a/tbl_indexes.php b/tbl_indexes.php index 84555d860c..1daca812da 100644 --- a/tbl_indexes.php +++ b/tbl_indexes.php @@ -87,7 +87,7 @@ if (isset($_REQUEST['do_save_data'])) { } } // end while - if (empty($index_fields)){ + if (empty($index_fields)) { $error = PMA_Message::error(__('No index parts defined!')); } else { $sql_query .= ' (' . implode(', ', $index_fields) . ')'; diff --git a/tbl_tracking.php b/tbl_tracking.php index b249f4c699..00030552c1 100644 --- a/tbl_tracking.php +++ b/tbl_tracking.php @@ -369,13 +369,13 @@ if (isset($_REQUEST['snapshot'])) { */ if (isset($_REQUEST['report']) && (isset($_REQUEST['delete_ddlog']) || isset($_REQUEST['delete_dmlog']))) { - if (isset($_REQUEST['delete_ddlog'])){ + if (isset($_REQUEST['delete_ddlog'])) { // Delete ddlog row data $delete_id = $_REQUEST['delete_ddlog']; // Only in case of valable id - if ($delete_id == (int)$delete_id){ + if ($delete_id == (int)$delete_id) { unset($data['ddlog'][$delete_id]); if (PMA_Tracker::changeTrackingData($_REQUEST['db'], $_REQUEST['table'], $_REQUEST['version'], 'DDL', $data['ddlog'])) @@ -386,13 +386,13 @@ if (isset($_REQUEST['report']) && (isset($_REQUEST['delete_ddlog']) || isset($_R } } - if (isset($_REQUEST['delete_dmlog'])){ + if (isset($_REQUEST['delete_dmlog'])) { // Delete dmlog row data $delete_id = $_REQUEST['delete_dmlog']; // Only in case of valable id - if ($delete_id == (int)$delete_id){ + if ($delete_id == (int)$delete_id) { unset($data['dmlog'][$delete_id]); if (PMA_Tracker::changeTrackingData($_REQUEST['db'], $_REQUEST['table'], $_REQUEST['version'], 'DML', $data['dmlog'])) @@ -658,7 +658,7 @@ if ($last_version > 0) { } else { $version_status = __('not active'); } - if ($version['version'] == $last_version){ + if ($version['version'] == $last_version) { if ($version['tracking_active'] == 1) { $tracking_active = true; } else { diff --git a/themes.php b/themes.php index 624c6680a4..0e37ee4940 100644 --- a/themes.php +++ b/themes.php @@ -22,7 +22,7 @@ require './libraries/header_meta_style.inc.php'; ?> <script type="text/javascript" language="javascript"> // <![CDATA[ -function takeThis(what){ +function takeThis(what) { if (window.opener && window.opener.document.forms['setTheme'].elements['set_theme']) { window.opener.document.forms['setTheme'].elements['set_theme'].value = what; window.opener.document.forms['setTheme'].submit(); diff --git a/transformation_wrapper.php b/transformation_wrapper.php index 50d7ceba7a..f229bd3a2f 100644 --- a/transformation_wrapper.php +++ b/transformation_wrapper.php @@ -88,7 +88,7 @@ if (! isset($resize)) { $ratioWidth = $srcWidth/$newWidth; $ratioHeight = $srcHeight/$newHeight; - if ($ratioWidth < $ratioHeight){ + if ($ratioWidth < $ratioHeight) { $destWidth = $srcWidth/$ratioHeight; $destHeight = $newHeight; } else { |