* ukrainian updates thanks to Markijan Baran.
diff --git a/Documentation.html b/Documentation.html
index 35db0e3fc..d4be439e1 100755
--- a/Documentation.html
+++ b/Documentation.html
@@ -732,7 +732,7 @@
- $cfgProtectBinary boolean
+ $cfgProtectBinary boolean or string
Defines whether BLOB or BINARY fields are protected
from edition when browsing a table's content or not.
@@ -743,6 +743,13 @@
+ $cfgShowFunctionFields boolean
+
+ Defines whether MySQL functions fields should be displayed or not in edit/insert
+ mode.
+
+
+
$cfgZipDump boolean
$cfgGZipDump boolean
diff --git a/config.inc.php3 b/config.inc.php3
index 9d3b4f34d..ceaef6597 100755
--- a/config.inc.php3
+++ b/config.inc.php3
@@ -139,6 +139,7 @@ $cfgProtectBinary = 'blob'; // disallow editing of binary fields
// FALSE allow editing
// 'blob' allow editing except for BLOB fields
// 'all' disallow editing
+$cfgShowFunctionFields = TRUE; // Display the function fields in edit/insert mode
$cfgZipDump = TRUE; // Allow the use of zip/gzip/bzip
$cfgGZipDump = TRUE; // compression for
@@ -234,32 +235,34 @@ $cfgAttributeTypes = array(
);
// Available functions
-$cfgFunctions = array(
- 'ASCII',
- 'CHAR',
- 'SOUNDEX',
- 'LCASE',
- 'UCASE',
- 'NOW',
- 'PASSWORD',
- 'MD5',
- 'ENCRYPT',
- 'RAND',
- 'LAST_INSERT_ID',
- 'COUNT',
- 'AVG',
- 'SUM',
- 'CURDATE',
- 'CURTIME',
- 'FROM_DAYS',
- 'FROM_UNIXTIME',
- 'PERIOD_ADD',
- 'PERIOD_DIFF',
- 'TO_DAYS',
- 'UNIX_TIMESTAMP',
- 'USER',
- 'WEEKDAY'
-);
+if ($cfgShowFunctionFields) {
+ $cfgFunctions = array(
+ 'ASCII',
+ 'CHAR',
+ 'SOUNDEX',
+ 'LCASE',
+ 'UCASE',
+ 'NOW',
+ 'PASSWORD',
+ 'MD5',
+ 'ENCRYPT',
+ 'RAND',
+ 'LAST_INSERT_ID',
+ 'COUNT',
+ 'AVG',
+ 'SUM',
+ 'CURDATE',
+ 'CURTIME',
+ 'FROM_DAYS',
+ 'FROM_UNIXTIME',
+ 'PERIOD_ADD',
+ 'PERIOD_DIFF',
+ 'TO_DAYS',
+ 'UNIX_TIMESTAMP',
+ 'USER',
+ 'WEEKDAY'
+ );
+} // end if
/**
diff --git a/libraries/common.lib.php3 b/libraries/common.lib.php3
index 574783976..2785e25d4 100644
--- a/libraries/common.lib.php3
+++ b/libraries/common.lib.php3
@@ -45,7 +45,7 @@ if (!defined('PMA_COMMON_LIB_INCLUDED')){
* - authentication work
* - second load of the libraries/define.lib.php3 library to get the MySQL
* release number)
- * - other functions, respecting dependencies
+ * - other functions, respecting dependencies
*/
@@ -102,6 +102,9 @@ if (!defined('PMA_COMMON_LIB_INCLUDED')){
$cfgProtectBinary = 'blob';
}
}
+ if (!isset($cfgShowFunctionFields)) {
+ $cfgShowFunctionFields = TRUE;
+ }
if (!isset($cfgZipDump)) {
$cfgZipDump = (isset($cfgGZipDump) ? $cfgGZipDump : TRUE);
}
@@ -200,7 +203,7 @@ if (!defined('PMA_COMMON_LIB_INCLUDED')){
$a_string = str_replace('\\', '\\\\', $a_string);
}
$a_string = str_replace('\'', '\\\'', $a_string);
-
+
return $a_string;
} // end of the 'PMA_sqlAddslashes()' function
@@ -299,7 +302,7 @@ if (!defined('PMA_COMMON_LIB_INCLUDED')){
unset($cfgServers[$key]);
}
}
-
+
if (empty($server) || !isset($cfgServers[$server]) || !is_array($cfgServers[$server])) {
$server = $cfgServerDefault;
}
@@ -602,7 +605,7 @@ if (!defined('PMA_COMMON_LIB_INCLUDED')){
}
} // end for
mysql_free_result($dbs);
- $num_dbs = $real_num_dbs;
+ $num_dbs = $real_num_dbs;
} // end else
return TRUE;
@@ -954,7 +957,7 @@ window.parent.frames['nav'].location.replace('');
/**
* Ensures a database/table/field's name is not a reserved word (for MySQL
- * releases < 3.23.6)
+ * releases < 3.23.6)
*
* @param string the name to check
* @param string the url to go back in case of error
@@ -972,7 +975,7 @@ window.parent.frames['nav'].location.replace('');
if (!ereg('^[a-zA-Z_]+$', $the_name)) {
return true;
}
-
+
// Else do the work
$filename = 'badwords.txt';
if (file_exists($filename)) {
diff --git a/tbl_change.php3 b/tbl_change.php3
index 70f6d70f5..8469e7040 100755
--- a/tbl_change.php3
+++ b/tbl_change.php3
@@ -142,7 +142,11 @@ echo "\n";
|
|
- |
+' . $strFunction . '' . "\n";
+}
+?>
|
|
@@ -224,7 +228,7 @@ for ($i = 0; $i < $fields_cnt; $i++) {
? ''
: '';
} else {
- // loic1: display default values
+ // loic1: display default values
if (!isset($row_table_def['Default'])) {
$row_table_def['Default'] = '';
$data = 'NULL';
@@ -242,40 +246,42 @@ for ($i = 0; $i < $fields_cnt; $i++) {
// Note: from the MySQL manual: "BINARY doesn't affect how the column is
// stored or retrieved" so it does not mean that the contents is
// binary
- if ((($cfgProtectBinary && $is_blob)
- || ($cfgProtectBinary == 'all' && $is_binary))
- && !empty($data)) {
- echo ' ' . $strBinary . ' | ' . "\n";
- } else if (strstr($row_table_def['True_Type'], 'enum') || strstr($row_table_def['True_Type'], 'set')) {
- echo ' -- | ' . "\n";
- } else {
- ?>
+ if ($cfgShowFunctionFields) {
+ if ((($cfgProtectBinary && $is_blob)
+ || ($cfgProtectBinary == 'all' && $is_binary))
+ && !empty($data)) {
+ echo ' ' . $strBinary . ' | ' . "\n";
+ } else if (strstr($row_table_def['True_Type'], 'enum') || strstr($row_table_def['True_Type'], 'set')) {
+ echo ' -- | ' . "\n";
+ } else {
+ ?>
|
- ' . htmlspecialchars($enum_atom) . '' . "\n";
} // end for
-
+
?>