[pLog-svn] r5262 - in plog/branches/lifetype-1.2/class: action view/admin

mark at devel.lifetype.net mark at devel.lifetype.net
Tue Apr 3 13:08:56 EDT 2007


Author: mark
Date: 2007-04-03 13:08:56 -0400 (Tue, 03 Apr 2007)
New Revision: 5262

Modified:
   plog/branches/lifetype-1.2/class/action/viewarticleaction.class.php
   plog/branches/lifetype-1.2/class/view/admin/adminblogsettingsview.class.php
Log:
1. We can get the show_comments_max from config.So we don't need another defined value in viewarticle action.

2. We need to set the default value for show_comments_max for user who upgrade from 1.1. Or they will keep get annoying message when saving blogsetting.

Modified: plog/branches/lifetype-1.2/class/action/viewarticleaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/viewarticleaction.class.php	2007-04-03 16:38:16 UTC (rev 5261)
+++ plog/branches/lifetype-1.2/class/action/viewarticleaction.class.php	2007-04-03 17:08:56 UTC (rev 5262)
@@ -6,8 +6,6 @@
     lt_include( PLOG_CLASS_PATH."class/view/errorview.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/config/siteconfig.class.php" );
 
-	define( "DEFAULT_SHOW_COMMENTS_MAX", 20 );
-
     /**
      * \ingroup Action
      * @private
@@ -244,7 +242,7 @@
 			// and the comments
 			$blogSettings = $this->_blogInfo->getSettings();			
 			$hardLimit = SiteConfig::getHardShowCommentsMax();
-			$commentsPerPage = $blogSettings->getValue( "show_comments_max", DEFAULT_SHOW_COMMENTS_MAX );	
+			$commentsPerPage = $blogSettings->getValue( "show_comments_max", $_config->getValue( "show_comments_max" ));	
 			if( $commentsPerPage > $hardLimit ) $commentsPerPage = $hardLimit;						
 
 			$comments = new ArticleComments();

Modified: plog/branches/lifetype-1.2/class/view/admin/adminblogsettingsview.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/view/admin/adminblogsettingsview.class.php	2007-04-03 16:38:16 UTC (rev 5261)
+++ plog/branches/lifetype-1.2/class/view/admin/adminblogsettingsview.class.php	2007-04-03 17:08:56 UTC (rev 5262)
@@ -44,7 +44,7 @@
 			$this->setValue( "blogShowInSummary", $this->_blogInfo->getShowInSummary());
 			$this->setValue( "blogSendNotification", $blogSettings->getValue( "default_send_notification" ));
 			$this->setValue( "blogCommentOnlyRegisteredUsers", $blogSettings->getValue( "comment_only_auth_users" ));
-			$this->setValue( "blogNumCommentsPerPage", $blogSettings->getValue( "show_comments_max" ));
+			$this->setValue( "blogNumCommentsPerPage", $blogSettings->getValue( "show_comments_max", $config->getValue( "show_comments_max" )));
 			
             // only do blog_domain stuff if subdomains are enabled
             // Don't waste time here, as well as be less confusing by



More information about the pLog-svn mailing list