* set current version number to 2.2.0rc3 (which should become 2.2.0-final)
* tbl_change.php3: feature #442402: while editing a record, the function of the first timestamp field will be set by default to "NOW()" : same behaviour as the command line mysql client.
This commit is contained in:
@@ -5,6 +5,12 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2001-07-18 Olivier M<>ller <om@omnis.ch>
|
||||
* set current version number to 2.2.0rc3 (which should become 2.2.0-final)
|
||||
* tbl_change.php3: feature #442402: while editing a record, the function
|
||||
of the first timestamp field will be set by default to "NOW()" :
|
||||
same behaviour as the command line mysql client.
|
||||
|
||||
2001-07-17 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
||||
* added credits for Benjamin Gandon <gandon@isia.cma.fr> in this file,
|
||||
credits and documentation.
|
||||
|
@@ -10,7 +10,7 @@
|
||||
// PMA_WINDOWS (bool) - mark if phpMyAdmin running on windows server
|
||||
|
||||
|
||||
define("PHPMYADMIN_VERSION", "2.2.0rc2");
|
||||
define("PHPMYADMIN_VERSION", "2.2.0rc3");
|
||||
|
||||
if (!ereg("([0-9]).([0-9]).([0-9])", phpversion(), $match))
|
||||
$result=ereg("([0-9]).([0-9])",phpversion(),$match);
|
||||
|
@@ -45,6 +45,9 @@ if(isset($primary_key))
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
|
||||
$timestamp_seen = 0; // set if we passed the first timestamp field.
|
||||
|
||||
for($i=0;$i<mysql_num_rows($table_def);$i++)
|
||||
{
|
||||
$row_table_def = mysql_fetch_array($table_def);
|
||||
@@ -53,6 +56,7 @@ for($i=0;$i<mysql_num_rows($table_def);$i++)
|
||||
$row[$field] = date("Y-m-d H:i:s", time());
|
||||
$len = @mysql_field_len($result,$i);
|
||||
|
||||
$first_timestamp = 0;
|
||||
$bgcolor = $cfgBgcolorOne;
|
||||
$i % 2 ? 0: $bgcolor = $cfgBgcolorTwo;
|
||||
echo "<tr bgcolor=".$bgcolor.">\n";
|
||||
@@ -65,6 +69,13 @@ for($i=0;$i<mysql_num_rows($table_def);$i++)
|
||||
case "enum":
|
||||
$type = "enum";
|
||||
break;
|
||||
case "timestamp":
|
||||
if (!$timestamp_seen) { // can only occur once per table
|
||||
$timestamp_seen = 1;
|
||||
$first_timestamp = 1;
|
||||
}
|
||||
$type = $row_table_def['Type'];
|
||||
break;
|
||||
default:
|
||||
$type = $row_table_def['Type'];
|
||||
break;
|
||||
@@ -91,10 +102,21 @@ for($i=0;$i<mysql_num_rows($table_def);$i++)
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
echo "<td><select name=\"funcs[$field]\"><option>\n";
|
||||
for($j=0; $j<count($cfgFunctions); $j++)
|
||||
echo "<option>$cfgFunctions[$j]\n";
|
||||
|
||||
if (!$first_timestamp) {
|
||||
for($j=0; $j<count($cfgFunctions); $j++)
|
||||
echo "<option>$cfgFunctions[$j]\n";
|
||||
} else {
|
||||
// for default function = NOW() on first timestamp field --swix/18jul01
|
||||
for($j=0; $j<count($cfgFunctions); $j++) {
|
||||
if ($cfgFunctions[$j] == "NOW") {
|
||||
echo "<option selected>$cfgFunctions[$j]\n";
|
||||
} else {
|
||||
echo "<option>$cfgFunctions[$j]\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "</select></td>\n";
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user