[pLog-svn] r739 - plog/trunk/class/action

oscar at devel.plogworld.net oscar at devel.plogworld.net
Thu Jan 13 06:59:46 GMT 2005


Author: oscar
Date: 2005-01-13 06:59:46 +0000 (Thu, 13 Jan 2005)
New Revision: 739

Modified:
   plog/trunk/class/action/rssaction.class.php
Log:
issue 148 fixed (http://bugs.plogworld.net/view.php?id=148) -- rss.php no longer includes future articles unless 'show_future_posts' is enabled

Modified: plog/trunk/class/action/rssaction.class.php
===================================================================
--- plog/trunk/class/action/rssaction.class.php	2005-01-13 06:35:19 UTC (rev 738)
+++ plog/trunk/class/action/rssaction.class.php	2005-01-13 06:59:46 UTC (rev 739)
@@ -67,9 +67,17 @@
             $locale = Locales::getLocale( $localeCode );
 
             // fetch the posts
-            $amount = $blogSettings->getValue( "recent_posts_max", 15 );
-            $blogArticles = $articles->getBlogArticles( $this->_blogInfo->getId(), -1, $amount, 
-                                                        $categoryId, POST_STATUS_PUBLISHED, 0, $today );
+			$t = new Timestamp();
+			if( $blogSettings->getValue( 'show_future_posts_in_calendar' )) {
+				$blogArticles = $articles->getBlogArticles( $this->_blogInfo->getId(), -1, $amount, 
+															$categoryId, POST_STATUS_PUBLISHED, 0 );
+			}
+			else {
+				$today = $t->getTimestamp();
+				$amount = $blogSettings->getValue( "recent_posts_max", 15 );			
+				$blogArticles = $articles->getBlogArticles( $this->_blogInfo->getId(), -1, $amount, 
+															$categoryId, POST_STATUS_PUBLISHED, 0, $today );			
+			}
 														
 			$pm =& PluginManager::getPluginManager();
 			$pm->setBlogInfo( $this->_blogInfo );




More information about the pLog-svn mailing list