[pLog-svn] r2945 - plog/branches/lifetype-1.0.4/class/action

mark at devel.lifetype.net mark at devel.lifetype.net
Mon Feb 13 07:42:22 GMT 2006


Author: mark
Date: 2006-02-13 07:42:21 +0000 (Mon, 13 Feb 2006)
New Revision: 2945

Modified:
   plog/branches/lifetype-1.0.4/class/action/rssaction.class.php
Log:
Fix the bug of http://bugs.lifetype.net/view.php?id=831,

But, I think this function should be per blog not per site, and we also need to add a new template $rdfEnabled to default blog view, then we can decide the syndication links show or not.

Modified: plog/branches/lifetype-1.0.4/class/action/rssaction.class.php
===================================================================
--- plog/branches/lifetype-1.0.4/class/action/rssaction.class.php	2006-02-13 06:28:01 UTC (rev 2944)
+++ plog/branches/lifetype-1.0.4/class/action/rssaction.class.php	2006-02-13 07:42:21 UTC (rev 2945)
@@ -3,6 +3,7 @@
 	include_once( PLOG_CLASS_PATH."class/action/blogaction.class.php" );
     include_once( PLOG_CLASS_PATH."class/dao/articles.class.php" );
     include_once( PLOG_CLASS_PATH."class/view/rssview.class.php" );
+    include_once( PLOG_CLASS_PATH."class/view/errorview.class.php" );
     include_once( PLOG_CLASS_PATH."class/locale/locale.class.php" );
     include_once( PLOG_CLASS_PATH."class/locale/locales.class.php" );
 
@@ -29,6 +30,17 @@
          */
         function perform()
         {
+        	//Check the rdf syndication is allowed or not
+        	$rdfEnabled = $this->_config->getValue( "rdf_enabled" );
+        	if ( !$rdfEnabled ) {
+				$message = $this->_locale->tr('error_rdf_syndication_not_allowed').'<br/><br/>';
+            	$this->_view = new ErrorView( $this->_blogInfo, $message );
+                $this->setCommonData();
+                $this->_view->render();
+
+                die();
+            }        		
+        	
         	// fetch the articles for the given blog
         	$articles = new Articles();
             $blogSettings = $this->_blogInfo->getSettings();



More information about the pLog-svn mailing list