UNIX_TIMESTAMP can take optional parameter (bug #1039193).

This commit is contained in:
Michal Čihař
2004-10-19 16:34:30 +00:00
parent 0277d8cdff
commit 0e9ad7053e
2 changed files with 12 additions and 8 deletions

View File

@@ -24,6 +24,8 @@ $Source$
Fix left frame reloading after dropping table (bug #1034531). Fix left frame reloading after dropping table (bug #1034531).
* config.inc.php, libraries/config_import.lib.php: Offer UNIX_TIMESTAMP * config.inc.php, libraries/config_import.lib.php: Offer UNIX_TIMESTAMP
also for numeric fields. also for numeric fields.
* tbl_replace.php: UNIX_TIMESTAMP can take optional parameter (bug
#1039193).
2004-10-17 Marc Delisle <lem9@users.sourceforge.net> 2004-10-17 Marc Delisle <lem9@users.sourceforge.net>
* lang/turkish update, thanks to boralioglu. * lang/turkish update, thanks to boralioglu.

View File

@@ -137,6 +137,8 @@ foreach ($loop_array AS $primary_key_index => $enc_primary_key) {
if (empty($me_funcs[$encoded_key])) { if (empty($me_funcs[$encoded_key])) {
$cur_value = $val . ', '; $cur_value = $val . ', ';
} else if (preg_match('@^(UNIX_TIMESTAMP)$@', $me_funcs[$encoded_key]) && $val != '\'\'') {
$cur_value = $me_funcs[$encoded_key] . '(' . $val . '), ';
} else if (preg_match('@^(NOW|CURDATE|CURTIME|UNIX_TIMESTAMP|RAND|USER|LAST_INSERT_ID)$@', $me_funcs[$encoded_key])) { } else if (preg_match('@^(NOW|CURDATE|CURTIME|UNIX_TIMESTAMP|RAND|USER|LAST_INSERT_ID)$@', $me_funcs[$encoded_key])) {
$cur_value = $me_funcs[$encoded_key] . '(), '; $cur_value = $me_funcs[$encoded_key] . '(), ';
} else { } else {