Config updated
[mir.git] / source / mircoders / entity / EntityContent.java
index 14b8971..39b0428 100755 (executable)
@@ -22,7 +22,7 @@ import mircoders.storage.*;
  */
 
 
-public class EntityContent extends AbstractEntity implements Entity
+public class EntityContent extends Entity
 {
 
        private static int      instances;
@@ -129,21 +129,20 @@ public class EntityContent extends AbstractEntity implements Entity
        }
 
        /**
-        * overridden method getValues to include formatted date into every
+        * overridden method getValue to include formatted date into every
         * entityContent
         */
 
-       public HashMap getValues() {
-               HashMap returnHash = super.getValues();
-               String date=null;
-
-               if ((date=(String)returnHash.get("date"))!=null)
-                       returnHash.put("date_formatted", StringUtil.webdbDate2readableDate(date));
-               if ((date=(String)returnHash.get("webdb_create"))!=null)
-                       returnHash.put("webdb_create_formatted", StringUtil.dateToReadableDate(date));
-               if ((date=(String)returnHash.get("webdb_lastchange"))!=null)
-                       returnHash.put("webdb_lastchange_formatted", StringUtil.dateToReadableDate(date));
-               return returnHash;
+       public String getValue(String field)
+  {
+    if (field!=null && field.equals("date_formatted"))
+    {
+               if (hasValueForField("date"))
+       return StringUtil.webdbDate2readableDate(getValue("date"));
+      else return null;
+               }
+    else
+      return super.getValue(field);
        }
 
        /**