[pLog-svn] r2634 - in plog/branches/plog-1.0.2/class: action/admin view/admin

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Fri Nov 25 15:33:59 GMT 2005


Author: jondaley
Date: 2005-11-25 15:33:58 +0000 (Fri, 25 Nov 2005)
New Revision: 2634

Modified:
   plog/branches/plog-1.0.2/class/action/admin/adminupdatepostaction.class.php
   plog/branches/plog-1.0.2/class/view/admin/adminnewpostview.class.php
Log:
now save timestamps on post error.  fixes http://bugs.lifetype.net/view.php?id=729 as well as the same case on new post errors as well

Modified: plog/branches/plog-1.0.2/class/action/admin/adminupdatepostaction.class.php
===================================================================
--- plog/branches/plog-1.0.2/class/action/admin/adminupdatepostaction.class.php	2005-11-25 15:31:26 UTC (rev 2633)
+++ plog/branches/plog-1.0.2/class/action/admin/adminupdatepostaction.class.php	2005-11-25 15:33:58 UTC (rev 2634)
@@ -39,6 +39,16 @@
         	$this->registerFieldValidator( "postCategories", new ArrayValidator());
         	$this->registerFieldValidator( "postId", new IntegerValidator());
         	$view = new AdminEditPostView( $this->_blogInfo );
+
+            $dateTimeParts = explode(" ", $this->_request->getValue("postDateTime"));
+            $dateParts = explode("/", $dateTimeParts[0] );
+            $timeParts = explode(":",$dateTimeParts[1] );
+            $view->setValue( "postDay", $dateParts[0]);
+            $view->setValue( "postMonth", $dateParts[1]);
+            $view->setValue( "postYear", $dateParts[2]);
+            $view->setValue( "postHour", $timeParts[0]);
+            $view->setValue( "postMinutes", $timeParts[1]);
+
         	$view->setErrorMessage( $this->_locale->tr("error_updating_post"));
         	$this->setValidationErrorView( $view );
         	

Modified: plog/branches/plog-1.0.2/class/view/admin/adminnewpostview.class.php
===================================================================
--- plog/branches/plog-1.0.2/class/view/admin/adminnewpostview.class.php	2005-11-25 15:31:26 UTC (rev 2633)
+++ plog/branches/plog-1.0.2/class/view/admin/adminnewpostview.class.php	2005-11-25 15:33:58 UTC (rev 2634)
@@ -61,7 +61,8 @@
             $this->setValue( "xmlRpcPingEnabled", $config->getValue( "xmlrpc_ping_enabled", false ));
             $this->setValue( "autoSaveNewDraftsTimeMillis", $config->getValue( "autosave_new_drafts_time_millis" ));
             $this->setValue( "xmlHttpRequestSupportEnabled", $config->getValue( "save_drafts_via_xmlhttprequest_enabled" ));
-            $this->setValue( "postDateTime", $t->getDay()."/".$t->getMonth()."/".$t->getYear()." ".$t->getHour().":".$t->getMinutes());                     
+            if(!$this->getValue("postDateTime"))
+                $this->setValue( "postDateTime", $t->getDay()."/".$t->getMonth()."/".$t->getYear()." ".$t->getHour().":".$t->getMinutes());                     
             
             parent::render();
         }




More information about the pLog-svn mailing list