diff --git a/ChangeLog b/ChangeLog index 6bdb7006b..4c7cb6fa9 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,12 @@ phpMyAdmin - Changelog $Id$ $Source$ +2002-08-21 Loïc Chapeaux + * config.inc.php3, db_details.php3, db_details_export.php3, + db_details_qbe.php3, Documentation.html, ldi_check.php3, ldi_table.php3, + tbl_dump.php3, tbl_properties_export.php3, tbl_query_box.php3, + libraries/charset_conversion.lib.php3: Coding standards. + 2002-08-21 Michal Cihar * libraries/common.lib.php3: revised to fit coding standards (by Loïc) and added documentation about parameters for PMA_showMySQLDocu() diff --git a/Documentation.html b/Documentation.html index 9589ce44b..a97aaa41b 100755 --- a/Documentation.html +++ b/Documentation.html @@ -1141,7 +1141,8 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
$cfg['MySQLManualBase'] string
If set to an URL which points to the MySQL documentation (type depends - on $cfg['MySQLManualType']), appropriate help links are generated. + on $cfg['MySQLManualType']), appropriate help links are + generated.
See MySQL Documentation page for more information about MySQL manuals and @@ -1154,9 +1155,9 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' Type of MySQL documentation:
  • old - old style used in phpMyAdmin 2.3.0 and sooner
  • -
  • searchable - "Searchable, with user comments"
  • -
  • chapters - "HTML, one page per chapter"
  • -
  • big - "HTML, all on one page"
  • +
  • searchable - "Searchable, with user comments"
  • +
  • chapters - "HTML, one page per chapter"
  • +
  • big - "HTML, all on one page"
  • none - do not show documentation links


@@ -1200,7 +1201,8 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
$cfg['RecodingEngine'] string
- You can select here which functions will be used for charset conversion. + You can select here which functions will be used for charset + conversion. Possible values are:
  • auto - automatically use available one (first is tested @@ -1209,6 +1211,7 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
  • recode - use recode_string function
Default is auto. +

$cfg['AvailableCharsets'] array
@@ -1303,8 +1306,8 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' $cfg['TextareaAutoSelect'] boolean
- Defines if the whole textarea of the query box will be selected - on click. + Defines if the whole textarea of the query box will be selected on + click.

@@ -2118,7 +2121,7 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'

[6.5] How can I restore (upload) my database or table using a dump? - How can I run a ".sql" file? + How can I run a ".sql" file?
Click on a database name in the left frame, the properties will be local displayed. Then in the "Run SQL query" section, type in diff --git a/config.inc.php3 b/config.inc.php3 index 89f6ea035..a479468b0 100755 --- a/config.inc.php3 +++ b/config.inc.php3 @@ -234,11 +234,11 @@ $cfg['MySQLManualBase'] = 'http://www.mysql.com/doc/en'; /** * Type of MySQL documentation: - * old - old style used in phpMyAdmin 2.3.0 and sooner + * old - old style used in phpMyAdmin 2.3.0 and sooner * searchable - "Searchable, with user comments" - * chapters - "HTML, one page per chapter" - * big - "HTML, all on one page" - * none - do not show documentation links + * chapters - "HTML, one page per chapter" + * big - "HTML, all on one page" + * none - do not show documentation links */ $cfg['MySQLManualType'] = 'searchable'; diff --git a/db_details.php3 b/db_details.php3 index 1b6a61f61..fd584e077 100755 --- a/db_details.php3 +++ b/db_details.php3 @@ -45,6 +45,10 @@ $is_upload = (PMA_PHP_INT_VERSION >= 40000 && function_exists('ini_get')) ? ((strtolower(ini_get('file_uploads')) == 'on' || ini_get('file_uploads') == 1) && intval(ini_get('upload_max_filesize'))) // loic1: php 3.0.15 and lower bug -> always enabled : (PMA_PHP_INT_VERSION < 30016 || intval(@get_cfg_var('upload_max_filesize'))); + +$auto_sel = ($cfg['TextareaAutoSelect']) + ? "\n" . ' onfocus="if (typeof(document.layers) == \'undefined\' || typeof(textarea_selected) == \'undefined\') {textarea_selected = 1; this.form.elements[\'sql_query\'].select();}"' + : ''; ?> @@ -61,11 +65,7 @@ $is_upload = (PMA_PHP_INT_VERSION >= 40000 && function_exists('ini_get'))  :

-
  diff --git a/db_details_export.php3 b/db_details_export.php3 index 8d85459f4..e21135b72 100644 --- a/db_details_export.php3 +++ b/db_details_export.php3 @@ -108,28 +108,28 @@ echo "\n"; > - ' . "\n" - . ' ' . "\n"; + while ($temp_charset = next($cfg['AvailableCharsets'])) { + echo ' ' . "\n"; - while ($temp_charset = next($cfg['AvailableCharsets'])) { - echo ' ' . "\n"; - } // end while - echo ' '; - } // end if - echo "\n"; - ?> -'; +} // end if +echo "\n"; + // zip, gzip and bzip2 encode features if (PMA_PHP_INT_VERSION >= 40004) { $is_zip = (isset($cfg['ZipDump']) && $cfg['ZipDump'] && @function_exists('gzcompress')); diff --git a/db_details_qbe.php3 b/db_details_qbe.php3 index ab5fd95a2..d8a284b8a 100755 --- a/db_details_qbe.php3 +++ b/db_details_qbe.php3 @@ -775,15 +775,17 @@ if (isset($Field) && count($Field) > 0) { // if there was nothing starting with '=' we have to use all we got in - // the first place + // the first place (we can't use an "&=" assignment because of PHP3 + // compliance) if (count($wheretabs) == 0) { - $wheretabs = &$where; + $wheretabs = $where; } - // when we want the fastest SELECT Statement, it would be great - // to have one Table as $master (that is the one that will be in FROM ... contrary to the - // rest which will just show in the LEFT JOIN lines) that has a good whereclause and is - // FOREIGN table to as many tables as possible + // When we want the fastest SELECT Statement, it would be great + // to have one Table as $master (that is the one that will be in + // FROM ... contrary to the rest which will just show in the LEFT JOIN + // lines) that has a good whereclause and is FOREIGN table to as many + // tables as possible // We will need this a few times: $incrit = '(\'' . implode('\', \'', $alltabs) . '\')'; @@ -791,12 +793,12 @@ if (isset($Field) && count($Field) > 0) { $rel_query = 'SELECT foreign_table AS wer, COUNT(master_table) AS hits' . ' FROM ' . PMA_backquote($cfgRelation['relation']) - . ' WHERE master_db = \'' . $db . '\'' - . ' AND foreign_db = \'' . $db . '\'' + . ' WHERE master_db = \'' . PMA_sqlAddslashes($db) . '\'' + . ' AND foreign_db = \'' . PMA_sqlAddslashes($db) . '\'' . ' AND master_table IN ' . $incrit . ' AND foreign_table IN ' . $incrit; if (!empty($column)) { - $rel_query .= ' AND foreign_field = \'' . $column . '\''; + $rel_query .= ' AND foreign_field = \'' . PMA_sqlAddslashes($column) . '\''; } $rel_query .= ' GROUP BY foreign_table ORDER BY hits DESC'; $relations = PMA_query_as_cu($rel_query); @@ -804,8 +806,9 @@ if (isset($Field) && count($Field) > 0) { $bpm = FALSE; while ($row = PMA_mysql_fetch_array($relations)) { // in case we will not find any foreign table that is also in the - // where clause AND we do not find a master table later, then we - // just use the most popular foreign table (allthough chances are remote) + // where clause AND we do not find a master table later, then we + // just use the most popular foreign table (allthough chances are + // remote) if (!isset($master)) { $master = $row['wer']; } @@ -821,41 +824,42 @@ if (isset($Field) && count($Field) > 0) { } } // end while - // if we didn't find any best possible master at this point, then we will settle - // for the most popular master_table in the whereclause (sbpm = second best possible master ;-) - // or if that fails as well, then rather the most popular master table than the - // most popular foreign_table + // if we didn't find any best possible master at this point, then we + // will settle for the most popular master_table in the where clause + // (sbpm = second best possible master ;-) or if that fails as well, + // then rather the most popular master table than the most popular + // foreign_table if ($bpm == FALSE) { $sbpm = FALSE; - // easier to just save any bad master we had and use it if we do not - // find anything better + // Easier to just save any bad master we had and use it if we do + // not find anything better if (isset($master)) { $badmaster = $master; unset($master); } $rel_query = 'SELECT master_table AS wer, COUNT(foreign_table) AS hits' . ' FROM ' . PMA_backquote($cfgRelation['relation']) - . ' WHERE master_db = \'' . $db . '\'' - . ' AND foreign_db = \'' . $db . '\'' + . ' WHERE master_db = \'' . PMA_sqlAddslashes($db) . '\'' + . ' AND foreign_db = \'' . PMA_sqlAddslashes($db) . '\'' . ' AND master_table IN ' . $incrit . ' AND foreign_table IN ' . $incrit; if (!empty($column)) { - $rel_query .= ' AND master_field = \'' . $column . '\''; + $rel_query .= ' AND master_field = \'' . PMA_sqlAddslashes($column) . '\''; } $rel_query .= ' GROUP BY master_table ORDER BY hits DESC'; - - $relations = PMA_query_as_cu($rel_query); + + $relations = PMA_query_as_cu($rel_query); while ($row = PMA_mysql_fetch_array($relations)) { // we want the first one (highest number of hits) or the first one // that is in the WHERE clause if (!isset($master)) { - $master = $row['wer']; + $master = $row['wer']; } if ($sbpm == FALSE) { while (list($key, $value) = each($wheretabs)) { if ($row['wer'] == $key) { $master = $row['wer']; - $sbpm = TRUE; + $sbpm = TRUE; break; } } // end while @@ -863,15 +867,15 @@ if (isset($Field) && count($Field) > 0) { } } // end while if (!isset($master) && isset($badmaster)) { - $master = $badmaster; + $master = $badmaster; unset($badmaster); } - } // end if bpm==FALSE + } // end if bpm == FALSE // if we still don't have a master at this point we might as well // give up ;-) - if (isset ($master) && $master != '') { + if (isset($master) && $master != '') { $qry_from = PMA_backquote($master); // now we want one Array that has all tablenames but master @@ -883,20 +887,20 @@ if (isset($Field) && count($Field) > 0) { } // end while // everything but the first table - $incrit_s = '(\'' . implode('\', \'', $reltabs) . '\')'; - $rel_query = 'SELECT *' - . ' FROM ' . PMA_backquote($cfgRelation['relation']) - . ' WHERE master_db = \'' . $db . '\'' - . ' AND foreign_db = \'' . $db . '\''; - if($bpm == TRUE){ // which means that my $master is a foreign table - $rel_query .= ' AND master_table IN ' . $incrit_s - . ' AND foreign_table IN ' . $incrit; + $incrit_s = '(\'' . implode('\', \'', $reltabs) . '\')'; + $rel_query = 'SELECT *' + . ' FROM ' . PMA_backquote($cfgRelation['relation']) + . ' WHERE master_db = \'' . PMA_sqlAddslashes($db) . '\'' + . ' AND foreign_db = \'' . PMA_sqlAddslashes($db) . '\''; + if ($bpm == TRUE) { // means that my $master is a foreign table + $rel_query .= ' AND master_table IN ' . $incrit_s + . ' AND foreign_table IN ' . $incrit; if (!empty($column)) { - $rel_query .= ' AND foreign_field = \'' . $column . '\''; + $rel_query .= ' AND foreign_field = \'' . PMA_sqlAddslashes($column) . '\''; } } else { - $rel_query .= ' AND foreign_table IN ' . $incrit_s - . ' AND master_table IN ' . $incrit; + $rel_query .= ' AND foreign_table IN ' . $incrit_s + . ' AND master_table IN ' . $incrit; if (!empty($column)) { $rel_query .= ' AND master_field = \'' . $column . '\''; } @@ -912,7 +916,7 @@ if (isset($Field) && count($Field) > 0) { PMA_mysql_select_db($db); } - if($bpm == TRUE){ // which means that my $master is a foreign table + if ($bpm == TRUE) { // means that my $master is a foreign table while ($row = PMA_mysql_fetch_array($relations)) { $master_table = $row['master_table']; if ($rel[$master_table]['mcon'] == 0) { @@ -942,8 +946,7 @@ if (isset($Field) && count($Field) > 0) { } // end while } // possibly we still don't have all - there might be some that are - // only found in relation to one of those that we - // already have + // only found in relation to one of those that we already have if ($master != '') { $found[] = $master; $qry_from = PMA_backquote($master); @@ -957,8 +960,8 @@ if (isset($Field) && count($Field) > 0) { } } // end while if (count($rest) > 0) { - $incrit_d = '(\'' . implode('\', \'', $found) . '\')'; - $incrit_s = '(\'' . implode('\', \'', $rest) . '\')'; + $incrit_d = '(\'' . implode('\', \'', $found) . '\')'; + $incrit_s = '(\'' . implode('\', \'', $rest) . '\')'; if ($bpm == TRUE) { $from_table = 'foreign_table'; $from_field = 'foreign_field'; @@ -968,17 +971,16 @@ if (isset($Field) && count($Field) > 0) { $from_field = 'master_field'; $to_table = 'foreign_table'; } - $rel_query = 'SELECT *' - . ' FROM ' . PMA_backquote($cfgRelation['relation']) - . ' WHERE master_db = \'' . $db . '\'' - . ' AND foreign_db = \'' . $db . '\'' - . ' AND ' . $from_table . ' IN ' . $incrit_s - . ' AND ' . $to_table . ' IN ' . $incrit_d; + $rel_query = 'SELECT *' + . ' FROM ' . PMA_backquote($cfgRelation['relation']) + . ' WHERE master_db = \'' . PMA_sqlAddslashes($db) . '\'' + . ' AND foreign_db = \'' . PMA_sqlAddslashes($db) . '\'' + . ' AND ' . $from_table . ' IN ' . $incrit_s + . ' AND ' . $to_table . ' IN ' . $incrit_d; if (!empty($column)) { - $rel_query .= ' AND ' . $from_field . ' = \'' . $column . '\''; + $rel_query .= ' AND ' . $from_field . ' = \'' . PMA_sqlAddslashes($column) . '\''; } - if (isset($dbh)) { PMA_mysql_select_db($cfgRelation['db'], $dbh); $relations = @PMA_mysql_query($rel_query, $dbh) or PMA_mysqlDie(PMA_mysql_error($dbh), $rel_query, '', $err_url_0); @@ -1007,7 +1009,7 @@ if (isset($Field) && count($Field) > 0) { // in extreme cases we hadn't found a master yet, so // let's use the one we found now if ($master == '') { - $master = $found_table; + $master = $found_table; } if ($other_table == $master) { $rel[$found_table]['mcon'] = 1; diff --git a/ldi_check.php3 b/ldi_check.php3 index 2b4161a63..1171ff0b6 100755 --- a/ldi_check.php3 +++ b/ldi_check.php3 @@ -36,7 +36,7 @@ if (isset($btnLDI) && ($textfile != 'none')) { if (function_exists('PMA_kanji_file_conv')) { $textfile = PMA_kanji_file_conv($textfile, $knjenc, isset($xkana) ? $xkana : ''); } - + // Convert the file's charset if necessary if ($cfg['AllowAnywhereRecoding'] && $allow_recoding && isset($charset_of_file) && $charset_of_file != $charset) { @@ -102,7 +102,7 @@ if (isset($btnLDI) && ($textfile != 'none')) { $sql_query = $query; } - // Set an empty sub_part to avoid an undefined variable. + // Set an empty sub_part to avoid an undefined variable. // We could also rename the ldi* scripts // to tbl_properties_ldi* to improve consistency with the other sub-pages. // diff --git a/ldi_table.php3 b/ldi_table.php3 index 0d78d47bf..52e5b9303 100755 --- a/ldi_table.php3 +++ b/ldi_table.php3 @@ -26,31 +26,31 @@ require('./tbl_properties_table_info.php3'); - ' . "\n" - . ' '.$strCharsetOfFile . "\n" - . ' '. "\n" - . ' ' . "\n" + . ' ' . "\n"; + while ($temp_charset = next($cfg['AvailableCharsets'])) { + echo ' ' . "\n"; - while ($temp_charset = next($cfg['AvailableCharsets'])) { - echo ' ' . "\n"; - } // end while - echo ' ' . "\n"; - echo ' ' . "\n"; - echo ' ' . "\n"; - } // end if - echo "\n"; - ?> + } // end while + echo ' ' . "\n"; + echo ' ' . "\n"; + echo ' '; +} // end if +echo "\n"; +?> diff --git a/libraries/charset_conversion.lib.php3 b/libraries/charset_conversion.lib.php3 index 34f3a0a41..a68bf2f3b 100644 --- a/libraries/charset_conversion.lib.php3 +++ b/libraries/charset_conversion.lib.php3 @@ -31,32 +31,34 @@ if (!defined('PMA_CHARSET_CONVERSION_LIB_INCLUDED')){ $suffix = '.so'; } - // Initialize configuration for default, if not set: - if (!isset($cfg['RecodingEngine'])) $cfg['RecodingEngine'] = 'auto'; - + // Initializes configuration for default, if not set: + if (!isset($cfg['RecodingEngine'])) { + $cfg['RecodingEngine'] = 'auto'; + } + if ($cfg['RecodingEngine'] == 'recode') { - if (! @extension_loaded('recode')) { + if (!@extension_loaded('recode')) { dl('recode' . $suffix); if (!@extension_loaded('recode')) { echo $strCantLoadRecodeIconv; exit(); } } - $PMA_recoding_engine = 'recode'; - } elseif ($cfg['RecodingEngine'] == 'iconv') { - if (! @extension_loaded('iconv')) { + $PMA_recoding_engine = 'recode'; + } else if ($cfg['RecodingEngine'] == 'iconv') { + if (!@extension_loaded('iconv')) { dl('iconv' . $suffix); if (!@extension_loaded('iconv')) { echo $strCantLoadRecodeIconv; exit(); } } - $PMA_recoding_engine = 'iconv'; + $PMA_recoding_engine = 'iconv'; } else { if (@extension_loaded('iconv')) { $PMA_recoding_engine = 'iconv'; - } elseif (@extension_loaded('recode')) { - $PMA_recoding_engine = 'recode'; + } else if (@extension_loaded('recode')) { + $PMA_recoding_engine = 'recode'; } else { dl('iconv' . $suffix); if (!@extension_loaded('iconv')) { @@ -68,31 +70,33 @@ if (!defined('PMA_CHARSET_CONVERSION_LIB_INCLUDED')){ $PMA_recoding_engine = 'recode'; } } else { - $PMA_recoding_engine = 'iconv'; + $PMA_recoding_engine = 'iconv'; } } } } // end load recode/iconv extension - + define('PMA_CHARSET_NONE', 0); define('PMA_CHARSET_ICONV', 1); define('PMA_CHARSET_LIBICONV', 2); define('PMA_CHARSET_RECODE', 3); - // finally detect which function will we use: + // Finally detects which function will we use: if (isset($cfg['AllowAnywhereRecoding']) && $cfg['AllowAnywhereRecoding'] && $allow_recoding) { - - if (!isset($PMA_recoding_engine)) $PMA_recoding_engine = $cfg['RecodingEngine']; + + if (!isset($PMA_recoding_engine)) { + $PMA_recoding_engine = $cfg['RecodingEngine']; + } if ($PMA_recoding_engine == 'iconv') { if (@function_exists('iconv')) { - $PMA_recoding_engine = PMA_CHARSET_ICONV; + $PMA_recoding_engine = PMA_CHARSET_ICONV; } else if (@function_exists('libiconv')) { $PMA_recoding_engine = PMA_CHARSET_LIBICONV; } else { $PMA_recoding_engine = PMA_CHARSET_NONE; - + if (!isset($GLOBALS['is_header_sent'])) { include('./header.inc.php3'); } @@ -100,12 +104,11 @@ if (!defined('PMA_CHARSET_CONVERSION_LIB_INCLUDED')){ include('./footer.inc.php3'); exit(); } - } elseif ($PMA_recoding_engine == 'recode') { + } else if ($PMA_recoding_engine == 'recode') { if (@function_exists('recode_string')) { - $PMA_recoding_engine = PMA_CHARSET_RECODE; + $PMA_recoding_engine = PMA_CHARSET_RECODE; } else { $PMA_recoding_engine = PMA_CHARSET_NONE; - if (!isset($GLOBALS['is_header_sent'])) { include('./header.inc.php3'); @@ -116,14 +119,13 @@ if (!defined('PMA_CHARSET_CONVERSION_LIB_INCLUDED')){ } } else { if (@function_exists('iconv')) { - $PMA_recoding_engine = PMA_CHARSET_ICONV; + $PMA_recoding_engine = PMA_CHARSET_ICONV; } else if (@function_exists('libiconv')) { $PMA_recoding_engine = PMA_CHARSET_LIBICONV; } elseif (@function_exists('recode_string')) { - $PMA_recoding_engine = PMA_CHARSET_RECODE; + $PMA_recoding_engine = PMA_CHARSET_RECODE; } else { $PMA_recoding_engine = PMA_CHARSET_NONE; - if (!isset($GLOBALS['is_header_sent'])) { include('./header.inc.php3'); @@ -134,9 +136,10 @@ if (!defined('PMA_CHARSET_CONVERSION_LIB_INCLUDED')){ } } } else { - $PMA_recoding_engine = PMA_CHARSET_NONE; + $PMA_recoding_engine = PMA_CHARSET_NONE; } + /** * Converts encoding according to current settings. * @@ -162,7 +165,7 @@ if (!defined('PMA_CHARSET_CONVERSION_LIB_INCLUDED')){ else if (is_array($what)) { $result = array(); reset($what); - while(list($key, $val) = each($what)) { + while (list($key, $val) = each($what)) { if (is_string($val) || is_array($val)) { if (is_string($key)) { $result[PMA_convert_display_charset($key)] = PMA_convert_display_charset($val); @@ -249,7 +252,7 @@ if (!defined('PMA_CHARSET_CONVERSION_LIB_INCLUDED')){ } // end of the "PMA_convert_charset()" function /** - * Converts encoding of text according to pametres with detected + * Converts encoding of text according to parameters with detected * conversion function. * * @param string source charset @@ -278,8 +281,9 @@ if (!defined('PMA_CHARSET_CONVERSION_LIB_INCLUDED')){ } } // end of the "PMA_convert_string()" function + /** - * Converts encoding of file according to pametres with detected + * Converts encoding of file according to parameters with detected * conversion function. The old file will be unlinked and new created and * its file name is returned. * diff --git a/tbl_dump.php3 b/tbl_dump.php3 index 1dd125a93..3b9cc3070 100755 --- a/tbl_dump.php3 +++ b/tbl_dump.php3 @@ -18,14 +18,14 @@ function PMA_myHandler($sql_insert) if (function_exists('PMA_kanji_str_conv')) { $sql_insert = PMA_kanji_str_conv($sql_insert, $GLOBALS['knjenc'], isset($GLOBALS['xkana']) ? $GLOBALS['xkana'] : ''); } - + // Convert the charset if required. if ($GLOBALS['cfg']['AllowAnywhereRecoding'] && $GLOBALS['allow_recoding'] && isset($GLOBALS['charset_of_file']) && $GLOBALS['charset_of_file'] != $GLOBALS['charset'] && (!empty($GLOBALS['asfile']))) { $sql_insert = PMA_convert_string($GLOBALS['charset'], $GLOBALS['charset_of_file'], $sql_insert); } - + // Defines the end of line delimiter to use $eol_dlm = (isset($GLOBALS['extended_ins']) && ($GLOBALS['current_row'] < $GLOBALS['rows_cnt'])) ? ',' @@ -265,8 +265,9 @@ else { . '#' . $crlf .$crlf; if (function_exists('PMA_kanji_str_conv')) { // Y.Kawada $dump_buffer .= PMA_kanji_str_conv($tcmt, $knjenc, isset($xkana) ? $xkana : ''); - } elseif ($GLOBALS['cfg']['AllowAnywhereRecoding'] && $GLOBALS['allow_recoding'] - // Convert the charset if required. + } + // Converts the charset if required. + else if ($GLOBALS['cfg']['AllowAnywhereRecoding'] && $GLOBALS['allow_recoding'] && isset($GLOBALS['charset_of_file']) && $GLOBALS['charset_of_file'] != $GLOBALS['charset'] && (!empty($GLOBALS['asfile']))) { $dump_buffer .= PMA_convert_string($GLOBALS['charset'], $GLOBALS['charset_of_file'], $tcmt); diff --git a/tbl_properties_export.php3 b/tbl_properties_export.php3 index 145f86b84..3fecee6e5 100755 --- a/tbl_properties_export.php3 +++ b/tbl_properties_export.php3 @@ -92,28 +92,28 @@ echo "\n"; - ' . "\n" - . ' ' . "\n"; + while ($temp_charset = next($cfg['AvailableCharsets'])) { + echo ' ' . "\n"; - while ($temp_charset = next($cfg['AvailableCharsets'])) { - echo ' ' . "\n"; - } // end while - echo ' '; - } // end if - echo "\n"; - ?> -'; +} // end if +echo "\n"; + // zip, gzip and bzip2 encode features if (PMA_PHP_INT_VERSION >= 40004) { $is_zip = (isset($cfg['ZipDump']) && $cfg['ZipDump'] && @function_exists('gzcompress')); diff --git a/tbl_query_box.php3 b/tbl_query_box.php3 index 632c7934b..7d1b31ff6 100755 --- a/tbl_query_box.php3 +++ b/tbl_query_box.php3 @@ -52,6 +52,9 @@ $is_upload = (PMA_PHP_INT_VERSION >= 40000 && function_exists('ini_get')) // loic1: php 3.0.15 and lower bug -> always enabled : (PMA_PHP_INT_VERSION < 30016 || intval(@get_cfg_var('upload_max_filesize'))); +$auto_sel = ($cfg['TextareaAutoSelect']) + ? "\n" . ' onfocus="if (typeof(document.layers) == \'undefined\' || typeof(textarea_selected) == \'undefined\') {textarea_selected = 1; this.form.elements[\'sql_query\'].select();}"' + : ''; ?>
  • @@ -81,11 +84,7 @@ for ($i = 0 ; $i < $fields_cnt; $i++) {
    -