make the webdb_create update be called webdb_create_update. it breaks things otherwis...
authormh <mh>
Sat, 29 Jun 2002 15:44:46 +0000 (15:44 +0000)
committermh <mh>
Sat, 29 Jun 2002 15:44:46 +0000 (15:44 +0000)
source/mir/storage/Database.java
templates-dist/admin/content.template

index 2e8f893..79ac9ac 100755 (executable)
@@ -27,10 +27,13 @@ import  mir.misc.*;
  * Treiber, Host, User und Passwort, ueber den der Zugriff auf die
  * Datenbank erfolgt.
  *
- * @version $Revision: 1.18 $ $Date: 2002/06/28 20:42:13 $
+ * @version $Revision: 1.19 $ $Date: 2002/06/29 15:44:46 $
  * @author $Author: mh $
  *
  * $Log: Database.java,v $
+ * Revision 1.19  2002/06/29 15:44:46  mh
+ * make the webdb_create update be called webdb_create_update. it breaks things otherwise. a fixme case I know..
+ *
  * Revision 1.18  2002/06/28 20:42:13  mh
  * added necessary bits in templates and Database.java to make webdb_create modifiable. make the conversion from sql/Timestamp to String more robust
  *
@@ -786,8 +789,14 @@ public class Database implements StorageObject {
                if (metadataFields.contains("webdb_lastchange")) {
                        sql.append(",webdb_lastchange=NOW()");
                }
+    // special case: the webdb_create requires the field in yyyy-mm-dd format
+    // so anything extra will be ignored. which breaks actual updating when a 
+    // a change in date is not desired but the values hash has the correct and
+    // full "webdb_create" field and value in it. solution make it so the update
+    // must be called webdb_create_update. a hack I know.. hopefully
+    // we can replace this whole layer soon. -mh
                if (metadataFields.contains("webdb_create") &&
-        theEntity.hasValueForField("webdb_create")) {
+        theEntity.hasValueForField("webdb_create_update")) {
       // TimeStamp stuff
       try {
         java.util.Date d = _dateFormatterIn.parse(
index 904b69a..52fee59 100755 (executable)
@@ -68,7 +68,7 @@ p {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt}
     <b>${lang("content.create_date")}:</b>
   </td>
   <td>
-               <!--<input type="text" size="10" maxlength="10" name="webdb_create" value="${data.webdb_create_short}">-->
+               <!--<input type="text" size="10" maxlength="10" name="webdb_create_update" value="${data.webdb_create_short}">-->
     <br>
   </td>
        </font>