[pLog-svn] r3351 - in plog/trunk: class/action/admin templates/admin

mark at devel.lifetype.net mark at devel.lifetype.net
Sat May 6 17:35:13 GMT 2006


Author: mark
Date: 2006-05-06 17:35:12 +0000 (Sat, 06 May 2006)
New Revision: 3351

Modified:
   plog/trunk/class/action/admin/adminnewpostaction.class.php
   plog/trunk/templates/admin/newpost.template
Log:
I think I should put the default value logic in addpost action, instead of put them in template...

Modified: plog/trunk/class/action/admin/adminnewpostaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminnewpostaction.class.php	2006-05-06 17:05:07 UTC (rev 3350)
+++ plog/trunk/class/action/admin/adminnewpostaction.class.php	2006-05-06 17:35:12 UTC (rev 3351)
@@ -28,6 +28,7 @@
          */
         function perform()
         {
+	        $blogSettings = $this->_blogInfo->getSettings();
 	        $categories = new ArticleCategories();
             $blogCategories = $categories->getBlogCategories( $this->_blogInfo->getId() );
             // but make sure that we have at least one!
@@ -40,6 +41,7 @@
 	        
         	// initialize the view
         	$this->_view = new AdminNewPostView( $this->_blogInfo );
+            $this->_view->setValue( "sendNotification", $blogSettings->getValue( "default_send_notification" ));
             $this->setCommonData();
 
             // better to return true if everything fine

Modified: plog/trunk/templates/admin/newpost.template
===================================================================
--- plog/trunk/templates/admin/newpost.template	2006-05-06 17:05:07 UTC (rev 3350)
+++ plog/trunk/templates/admin/newpost.template	2006-05-06 17:35:12 UTC (rev 3351)
@@ -154,10 +154,6 @@
 	   </div>
    
        <div class="field_checkbox">
-         {assign var=blogSendNotification value=$blogsettings->getValue("default_send_notification")}
-         {if empty($sendNotification)}
-         	{assign var=sendNotification value=$blogSendNotification}
-         {/if}
 	     <input class="checkbox" type="checkbox" name="sendNotification" id="sendNotification" value="1" {if $sendNotification} checked="checked" {/if}/>
 		 <label for="sendNotification">{$locale->tr("send_notification_help")}</label>
 	   </div>



More information about the pLog-svn mailing list