From 817e790762d33c1b216636ef20929d8473804eee Mon Sep 17 00:00:00 2001 From: Sebastian Mendel Date: Mon, 19 Mar 2007 17:55:39 +0000 Subject: [PATCH] synced/fixed vim line --- browse_foreigners.php | 2 +- calendar.php | 1 + changelog.php | 4 +- chk_rel.php | 2 +- config.sample.inc.php | 3 +- db_create.php | 2 +- db_datadict.php | 1 + db_export.php | 6 +-- db_import.php | 2 +- db_operations.php | 2 +- db_printview.php | 2 +- db_qbe.php | 2 +- db_sql.php | 2 +- db_structure.php | 6 +-- import.php | 4 +- index.php | 2 +- js/navigation.js | 11 +++- libraries/Config.class.php | 4 +- libraries/PMA_Sql.class.php | 2 +- libraries/Table.class.php | 30 +++++------ libraries/Theme.class.php | 2 +- libraries/Theme_Manager.class.php | 2 +- libraries/auth/config.auth.lib.php | 13 +++-- libraries/auth/http.auth.lib.php | 14 +++--- libraries/auth/signon.auth.lib.php | 12 ++--- libraries/blowfish.php | 5 +- libraries/bookmark.lib.php | 2 +- libraries/charset_conversion.lib.php | 2 +- libraries/check_user_privileges.lib.php | 2 +- libraries/cleanup.lib.php | 2 +- libraries/common.lib.php | 2 +- libraries/config.default.php | 4 +- libraries/database_interface.lib.php | 2 +- libraries/db_common.inc.php | 2 +- libraries/db_info.inc.php | 8 +-- libraries/db_links.inc.php | 2 +- libraries/db_routines.inc.php | 8 +-- libraries/db_table_exists.lib.php | 2 +- libraries/dbg/setup.php | 11 ++-- libraries/dbi/mysql.dbi.lib.php | 9 ++-- libraries/dbi/mysqli.dbi.lib.php | 6 +-- libraries/display_create_database.lib.php | 2 +- libraries/display_create_table.lib.php | 4 +- libraries/display_export.lib.php | 2 +- libraries/display_import.lib.php | 2 +- libraries/display_select_lang.lib.php | 3 +- libraries/display_tbl.lib.php | 6 +-- libraries/display_tbl_links.lib.php | 2 +- libraries/engines/bdb.lib.php | 9 +++- libraries/engines/berkeleydb.lib.php | 9 +++- libraries/engines/binlog.lib.php | 9 +++- libraries/engines/innobase.lib.php | 16 ++++-- libraries/engines/innodb.lib.php | 9 +++- libraries/engines/memory.lib.php | 7 ++- libraries/engines/merge.lib.php | 9 +++- libraries/engines/mrg_myisam.lib.php | 12 ++++- libraries/engines/myisam.lib.php | 7 ++- libraries/engines/ndbcluster.lib.php | 9 +++- libraries/export/csv.php | 6 ++- libraries/export/excel.php | 2 +- libraries/export/htmlexcel.php | 4 +- libraries/export/htmlword.php | 4 +- libraries/export/latex.php | 4 +- libraries/export/ods.php | 2 +- libraries/export/odt.php | 4 +- libraries/export/pdf.php | 2 +- libraries/export/sql.php | 27 +++++----- libraries/export/xls.php | 2 +- libraries/export/xml.php | 2 +- libraries/export/yaml.php | 17 ++++--- libraries/file_listing.php | 6 +-- libraries/footer.inc.php | 4 +- libraries/get_foreign.lib.php | 2 +- libraries/grab_globals.lib.php | 2 +- libraries/header.inc.php | 2 +- libraries/header_http.inc.php | 2 +- libraries/header_meta_style.inc.php | 2 +- libraries/header_printview.inc.php | 2 +- libraries/iconv_wrapper.lib.php | 4 +- libraries/import/docsql.php | 6 +-- libraries/import/ldi.php | 6 +-- libraries/import/sql.php | 9 ++-- .../information_schema_relations.lib.php | 2 +- libraries/ip_allow_deny.lib.php | 2 +- libraries/js_escape.lib.php | 32 ++++++------ libraries/kanji-encoding.lib.php | 2 +- libraries/language.lib.php | 2 +- libraries/mcrypt.lib.php | 3 +- libraries/mult_submits.inc.php | 8 +-- libraries/mysql_charsets.lib.php | 2 +- libraries/navigation_header.inc.php | 2 +- libraries/ob.lib.php | 2 +- libraries/opendocument.lib.php | 2 +- libraries/parse_analyze.lib.php | 2 +- libraries/plugin_interface.lib.php | 2 +- libraries/relation.lib.php | 2 +- libraries/relation_cleanup.lib.php | 2 +- libraries/select_lang.lib.php | 2 +- libraries/select_server.lib.php | 4 +- libraries/server_links.inc.php | 2 +- libraries/session.inc.php | 2 +- libraries/sql_query_form.lib.php | 4 +- libraries/sqlparser.data.php | 2 +- libraries/sqlvalidator.class.php | 2 +- libraries/sqlvalidator.lib.php | 3 +- libraries/storage_engines.lib.php | 2 +- libraries/string.lib.php | 10 ++-- libraries/tbl_common.php | 2 +- libraries/tbl_info.inc.php | 2 +- libraries/tbl_links.inc.php | 4 +- libraries/tbl_properties.inc.php | 8 +-- libraries/tbl_replace_fields.inc.php | 3 +- libraries/transformations.lib.php | 2 +- .../application_octetstream__download.inc.php | 4 +- .../application_octetstream__hex.inc.php | 2 +- libraries/transformations/global.inc.php | 2 +- .../image_jpeg__inline.inc.php | 2 +- .../transformations/image_jpeg__link.inc.php | 2 +- .../transformations/image_png__inline.inc.php | 2 +- .../text_plain__dateformat.inc.php | 2 +- .../text_plain__external.inc.php | 4 +- .../text_plain__formatted.inc.php | 2 +- .../text_plain__imagelink.inc.php | 2 +- .../transformations/text_plain__link.inc.php | 2 +- .../transformations/text_plain__sql.inc.php | 2 +- .../text_plain__substr.inc.php | 2 +- libraries/url_generating.lib.php | 2 +- libraries/zip.lib.php | 2 +- license.php | 2 +- main.php | 2 +- navigation.php | 2 +- pdf_pages.php | 8 +-- pdf_schema.php | 4 +- phpinfo.php | 2 +- phpmyadmin.css.php | 2 +- pmd_common.php | 50 +++++++++---------- pmd_display_field.php | 6 +-- pmd_general.php | 2 +- pmd_help.php | 2 +- pmd_pdf.php | 2 +- pmd_relation_new.php | 22 ++++---- pmd_relation_upd.php | 18 +++---- pmd_save_pos.php | 2 +- readme.php | 2 +- scripts/check_lang.php | 2 +- scripts/decode_bug.php | 2 +- scripts/setup.php | 5 +- scripts/signon.php | 8 +-- server_collations.php | 2 +- server_databases.php | 2 +- server_engines.php | 2 +- server_export.php | 2 +- server_import.php | 2 +- server_privileges.php | 2 +- server_processlist.php | 2 +- server_sql.php | 2 +- server_status.php | 4 +- server_variables.php | 2 +- show_config_errors.php | 2 +- sql.php | 2 +- tbl_addfield.php | 2 +- tbl_alter.php | 2 +- tbl_export.php | 2 +- tbl_import.php | 2 +- tbl_move_copy.php | 2 +- tbl_operations.php | 2 +- tbl_printview.php | 1 + tbl_relation.php | 8 +-- tbl_replace.php | 2 +- tbl_row_action.php | 2 +- tbl_select.php | 4 +- tbl_sql.php | 2 +- tbl_structure.php | 2 +- themes.php | 1 + .../darkblue_orange/css/theme_right.css.php | 1 + themes/darkblue_orange/info.inc.php | 1 + themes/darkblue_orange/layout.inc.php | 1 + themes/original/css/theme_left.css.php | 1 + themes/original/css/theme_right.css.php | 1 + themes/original/info.inc.php | 1 + themes/original/layout.inc.php | 1 + transformation_overview.php | 2 +- transformation_wrapper.php | 2 +- user_password.php | 2 +- view_create.php | 12 ++--- 185 files changed, 451 insertions(+), 376 deletions(-) diff --git a/browse_foreigners.php b/browse_foreigners.php index 22c3ab057..349188a99 100644 --- a/browse_foreigners.php +++ b/browse_foreigners.php @@ -1,6 +1,6 @@ ' . $table_html . '' . "\n"; } // end for $multi_values .= "\n"; diff --git a/db_import.php b/db_import.php index 0d1ab19b4..16d1a8dc8 100644 --- a/db_import.php +++ b/db_import.php @@ -1,6 +1,6 @@ $each_table) { // so ensure that we'll display "in use" below for a table // that needs to be repaired - if (isset($each_table['TABLE_ROWS']) && ($each_table['ENGINE'] != null || $table_is_view)) { + if (isset($each_table['TABLE_ROWS']) && ($each_table['ENGINE'] != null || $table_is_view)) { if ($table_is_view && $each_table['TABLE_ROWS'] >= $cfg['MaxExactCountViews']) { $at_least_one_view_exceeds_max_count = true; $show_superscript = '1'; @@ -496,7 +496,7 @@ if ($at_least_one_view_exceeds_max_count && !$db_is_information_schema) {
' . "\n"; echo ' ' . $strRoutines . '' . "\n"; require './libraries/db_routines.inc.php'; diff --git a/import.php b/import.php index bcb613f18..5ded83779 100644 --- a/import.php +++ b/import.php @@ -1,6 +1,6 @@ _encryptBlock($L, $R); return pack("NN", $parts['L'], $parts['R']); } - + /** * Encrypt a block on data. * diff --git a/libraries/bookmark.lib.php b/libraries/bookmark.lib.php index 66c0e2e68..846438c3a 100644 --- a/libraries/bookmark.lib.php +++ b/libraries/bookmark.lib.php @@ -1,6 +1,6 @@ 0) { while ($tmp = PMA_DBI_fetch_row($db_info_result)) { @@ -97,7 +97,7 @@ if ( true === $cfg['SkipLockedTables'] ) { } } PMA_DBI_free_result($db_info_result); - + if ( $GLOBALS['cfg']['NaturalOrder'] ) { uksort( $tables, 'strnatcasecmp' ); } @@ -123,7 +123,7 @@ if ( ! isset( $sot_ready ) ) { // all tables in db $tables = PMA_DBI_get_tables_full( $db ); } - + if ( $cfg['ShowTooltip'] ) { foreach ( $tables as $each_table ) { fillTooltip( $tooltip_truename, $tooltip_aliasname, $each_table ); diff --git a/libraries/db_links.inc.php b/libraries/db_links.inc.php index 9ccd5b173..c06eb2ec9 100644 --- a/libraries/db_links.inc.php +++ b/libraries/db_links.inc.php @@ -1,6 +1,6 @@ = 50002 ) { $url_query .= '&goto=db_structure.php'; - + $routines = PMA_DBI_fetch_result('SELECT SPECIFIC_NAME,ROUTINE_NAME,ROUTINE_TYPE,DTD_IDENTIFIER FROM information_schema.ROUTINES WHERE ROUTINE_SCHEMA= \'' . PMA_sqlAddslashes($db,true) . '\';'); if ($routines) { @@ -23,7 +23,7 @@ if ( PMA_MYSQL_INT_VERSION >= 50002 ) { $strRoutineReturnType); $ct=0; $delimiter = '//'; - foreach ($routines as $routine) { + foreach ($routines as $routine) { $drop_and_create = '\'DROP ' . $routine['ROUTINE_TYPE'] . ' ' . PMA_backquote($routine['SPECIFIC_NAME']) . $delimiter . "\n" . 'CREATE ' . $routine['ROUTINE_TYPE'] . ' ' . PMA_backquote($routine['SPECIFIC_NAME']) . '()' . "\n" . '\''; @@ -53,7 +53,7 @@ if ( PMA_MYSQL_INT_VERSION >= 50002 ) { %s %s %s - %s + %s %s %s ', diff --git a/libraries/db_table_exists.lib.php b/libraries/db_table_exists.lib.php index b8e8e4191..dc95b7ce6 100644 --- a/libraries/db_table_exists.lib.php +++ b/libraries/db_table_exists.lib.php @@ -1,6 +1,6 @@ ' .sprintf( $GLOBALS['strCantLoad'], 'DBG' ) - .' ' + .' ' .$GLOBALS['strDocu'] . '' .''; } else { diff --git a/libraries/dbi/mysql.dbi.lib.php b/libraries/dbi/mysql.dbi.lib.php index 187410faf..4a77318ee 100644 --- a/libraries/dbi/mysql.dbi.lib.php +++ b/libraries/dbi/mysql.dbi.lib.php @@ -1,11 +1,14 @@ ' . - ( $cfg['ReplaceHelpImg'] ? + ( $cfg['ReplaceHelpImg'] ? 'Info' : '(*)' ) . ''; if ($use_fieldset) { diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php index 1e4a86d63..a96773dce 100644 --- a/libraries/display_tbl.lib.php +++ b/libraries/display_tbl.lib.php @@ -1,6 +1,6 @@ // - bugfix for select all checkboxes diff --git a/libraries/engines/bdb.lib.php b/libraries/engines/bdb.lib.php index dd33c8c4c..2b37e1b22 100644 --- a/libraries/engines/bdb.lib.php +++ b/libraries/engines/bdb.lib.php @@ -1,7 +1,12 @@ diff --git a/libraries/engines/innodb.lib.php b/libraries/engines/innodb.lib.php index dcb6bc7a3..87c8b8abc 100644 --- a/libraries/engines/innodb.lib.php +++ b/libraries/engines/innodb.lib.php @@ -1,7 +1,12 @@ - + diff --git a/libraries/export/htmlword.php b/libraries/export/htmlword.php index dfa0bd215..43316cab9 100644 --- a/libraries/export/htmlword.php +++ b/libraries/export/htmlword.php @@ -1,6 +1,6 @@ - + '); } diff --git a/libraries/export/latex.php b/libraries/export/latex.php index b1e046ae0..8e3b4a4f1 100644 --- a/libraries/export/latex.php +++ b/libraries/export/latex.php @@ -1,6 +1,6 @@ $definition) { $tmp[] = PMA_backquote($column_name) . ' ' . $definition['Type'] . $crlf; } - $create_query .= implode(',', $tmp) . ');'; + $create_query .= implode(',', $tmp) . ');'; return($create_query); } @@ -528,11 +529,11 @@ function PMA_getTableDef($db, $table, $crlf, $error_url, $show_dates = false) if (strpos($sql_lines[$j], 'CONSTRAINT') === FALSE) { $str_tmp = preg_replace('/(FOREIGN[\s]+KEY)/', 'ADD \1', $sql_lines[$j]); $sql_constraints_query .= $str_tmp; - $sql_constraints .= $str_tmp; + $sql_constraints .= $str_tmp; } else { $str_tmp = preg_replace('/(CONSTRAINT)/', 'ADD \1', $sql_lines[$j]); $sql_constraints_query .= $str_tmp; - $sql_constraints .= $str_tmp; + $sql_constraints .= $str_tmp; } $first = FALSE; } else { @@ -552,7 +553,7 @@ function PMA_getTableDef($db, $table, $crlf, $error_url, $show_dates = false) // remove a possible "AUTO_INCREMENT = value" clause // that could be there starting with MySQL 5.0.24 $schema_create = preg_replace('/AUTO_INCREMENT\s*=\s*([0-9])+/', '', $schema_create); - + $schema_create .= $auto_increment; PMA_DBI_free_result($result); @@ -656,7 +657,7 @@ function PMA_getTableComments($db, $table, $crlf, $do_relation = false, $do_comm * @param boolean whether to include relation comments * @param boolean whether to include column comments * @param boolean whether to include mime comments - * @param string 'stand_in', 'create_table', 'create_view' + * @param string 'stand_in', 'create_table', 'create_view' * * @return bool Whether it suceeded * diff --git a/libraries/export/xls.php b/libraries/export/xls.php index d5f6c3179..58cb680e8 100644 --- a/libraries/export/xls.php +++ b/libraries/export/xls.php @@ -1,6 +1,6 @@ 'yml', 'mime_type' => 'text/yaml', 'force_file' => true, - 'options' => array( + 'options' => array( array('type' => 'hidden', 'name' => 'data'), ), 'options_text' => 'strOptions', @@ -51,7 +52,7 @@ function PMA_exportFooter() */ function PMA_exportHeader() { - return TRUE; + return TRUE; } /** @@ -119,14 +120,14 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) } unset($i); - $cnt = 0; - $buffer = ''; + $cnt = 0; + $buffer = ''; while ($record = PMA_DBI_fetch_row($result)) { - $cnt++; - $buffer = $cnt . ":$crlf"; + $cnt++; + $buffer = $cnt . ":$crlf"; for ($i = 0; $i < $columns_cnt; $i++) { if ( isset($record[$i]) && !is_null($record[$i])) { - $buffer .= ' ' . $columns[$i] . ': ' . htmlspecialchars($record[$i]) . $crlf; + $buffer .= ' ' . $columns[$i] . ': ' . htmlspecialchars($record[$i]) . $crlf; } } diff --git a/libraries/file_listing.php b/libraries/file_listing.php index d54b29aba..2a6d71c7b 100644 --- a/libraries/file_listing.php +++ b/libraries/file_listing.php @@ -1,6 +1,6 @@ + * @author bwiberg Björn Wiberg */ function PMA_aix_iconv_wrapper($in_charset, $out_charset, $str) { diff --git a/libraries/import/docsql.php b/libraries/import/docsql.php index 06e12379a..627104937 100644 --- a/libraries/import/docsql.php +++ b/libraries/import/docsql.php @@ -1,6 +1,6 @@ 0 && $GLOBALS['cfgRe 'text' => 'strDocSQL', // text to be displayed as choice 'extension' => '', // extension this plugin can handle 'options' => array( // array of options for your plugin (optional) - array('type' => 'text', 'name' => 'table', 'text' => 'strTableName'), + array('type' => 'text', 'name' => 'table', 'text' => 'strTableName'), ), 'options_text' => 'strDocSQLOptions', // text to describe plugin options (must be set if options are used) ); @@ -56,7 +56,7 @@ if ($plugin_param == 'database' && $GLOBALS['num_tables'] > 0 && $GLOBALS['cfgRe if (!empty($inf[2]) && strlen(trim($inf[2])) > 0) { $for = explode('->', $inf[2]); $qry = ' - INSERT INTO + INSERT INTO ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($GLOBALS['cfgRelation']['relation']) . ' ( master_db, master_table, master_field, foreign_db, foreign_table, foreign_field) VALUES ( diff --git a/libraries/import/ldi.php b/libraries/import/ldi.php index 77584b4c6..a7d0dbc62 100644 --- a/libraries/import/ldi.php +++ b/libraries/import/ldi.php @@ -1,6 +1,6 @@ diff --git a/libraries/import/sql.php b/libraries/import/sql.php index 7f7c2f044..9c4eea1c6 100644 --- a/libraries/import/sql.php +++ b/libraries/import/sql.php @@ -1,7 +1,6 @@ array( diff --git a/libraries/ip_allow_deny.lib.php b/libraries/ip_allow_deny.lib.php index fd5d8e87b..4ae321112 100644 --- a/libraries/ip_allow_deny.lib.php +++ b/libraries/ip_allow_deny.lib.php @@ -1,6 +1,6 @@ '\\\\', - '\'' => '\\\'', - "\n" => '\n', - "\r" => '\r'))); + return preg_replace('@ '\\\\', + '\'' => '\\\'', + "\n" => '\n', + "\r" => '\r'))); } ?> diff --git a/libraries/kanji-encoding.lib.php b/libraries/kanji-encoding.lib.php index 20d3404fa..5aba38f3b 100644 --- a/libraries/kanji-encoding.lib.php +++ b/libraries/kanji-encoding.lib.php @@ -1,6 +1,6 @@ ', $full_query); } break; - + case 'drop_fld': if ($full_query == '') { $full_query .= 'ALTER TABLE ' @@ -302,7 +302,7 @@ elseif ($mult_btn == $strYes) { } // end while PMA_DBI_free_result($result); } - + for ($i = 0; $i < $selected_cnt; $i++) { switch ($query_type) { case 'row_delete': @@ -399,7 +399,7 @@ elseif ($mult_btn == $strYes) { // All "DROP TABLE", "DROP FIELD", "OPTIMIZE TABLE" and "REPAIR TABLE" // statements will be run at once below - if ($run_parts) { + if ($run_parts) { $sql_query .= $a_query . ';' . "\n"; if ($query_type != 'drop_db') { PMA_DBI_select_db($db); diff --git a/libraries/mysql_charsets.lib.php b/libraries/mysql_charsets.lib.php index 73d8ab0b9..d2beb0507 100644 --- a/libraries/mysql_charsets.lib.php +++ b/libraries/mysql_charsets.lib.php @@ -1,6 +1,6 @@ = 40100){ diff --git a/libraries/navigation_header.inc.php b/libraries/navigation_header.inc.php index 99c838319..39b6e48b8 100644 --- a/libraries/navigation_header.inc.php +++ b/libraries/navigation_header.inc.php @@ -1,6 +1,6 @@ page; foreach ($this->Alias AS $alias => $value) { for ($n = 1;$n <= $nb;$n++) - $this->pages[$n]=str_replace($alias, $value, $this->pages[$n]); + $this->pages[$n]=str_replace($alias, $value, $this->pages[$n]); } } parent::_putpages(); diff --git a/phpinfo.php b/phpinfo.php index add1f181e..29fbb20c9 100644 --- a/phpinfo.php +++ b/phpinfo.php @@ -1,6 +1,6 @@ \n"; // return $GLOBALS['PMD']; // many bases // not use ?????? } function get_tab_info() // PMA_DBI //PMA_backquote -{ +{ global $db; PMA_DBI_select_db($db); $tab_column = array(); @@ -63,7 +63,7 @@ function get_tab_info() // PMA_DBI //PMA_backquote $fields_rs = PMA_DBI_query('SHOW FULL FIELDS FROM '.PMA_backquote($GLOBALS['PMD']["TABLE_NAME_SMALL"][$i]), NULL, PMA_DBI_QUERY_STORE); $fields_cnt = PMA_DBI_num_rows($fields_rs); $j=0; - while ($row = PMA_DBI_fetch_assoc($fields_rs)) { + while ($row = PMA_DBI_fetch_assoc($fields_rs)) { $tab_column[$GLOBALS['PMD']['TABLE_NAME'][$i]]['COLUMN_ID'][$j] = $j; $tab_column[$GLOBALS['PMD']['TABLE_NAME'][$i]]['COLUMN_NAME'][$j] = $row['Field']; $tab_column[$GLOBALS['PMD']['TABLE_NAME'][$i]]['TYPE'][$j] = $row['Type']; @@ -85,7 +85,7 @@ function get_script_contr() { //echo "
internal ".$db." - ".$val[0]." - "; //print_r($row ); if ($row !== false) { - foreach ($row as $field => $value) { + foreach ($row as $field => $value) { $con['C_NAME'][$i] = ''; $con['DTN'][$i] = urlencode($db . "." . $val[0]); $con['DCN'][$i] = urlencode($field); @@ -98,7 +98,7 @@ function get_script_contr() { //echo "
INNO "; //print_r($row ); if ($row !== false) { - foreach ($row as $field => $value) { + foreach ($row as $field => $value) { $con['C_NAME'][$i] = ''; $con['DTN'][$i] = urlencode($db.".".$val[0]); $con['DCN'][$i] = urlencode($field); @@ -107,8 +107,8 @@ function get_script_contr() { $i++; } } - } - + } + $ti = 0; $script_contr = " diff --git a/tbl_sql.php b/tbl_sql.php index a022f2054..fa76ae230 100644 --- a/tbl_sql.php +++ b/tbl_sql.php @@ -1,6 +1,6 @@