[pLog-svn] r1731 - plog/branches/plog-1.1-ben/class/action

ork at devel.plogworld.net ork at devel.plogworld.net
Tue Apr 5 12:14:12 GMT 2005


Author: ork
Date: 2005-04-05 12:14:11 +0000 (Tue, 05 Apr 2005)
New Revision: 1731

Modified:
   plog/branches/plog-1.1-ben/class/action/viewarticleaction.class.php
Log:
added the incude for articles, needed to know the constant POST_STATUS_PUBLISHED


Modified: plog/branches/plog-1.1-ben/class/action/viewarticleaction.class.php
===================================================================
--- plog/branches/plog-1.1-ben/class/action/viewarticleaction.class.php	2005-04-05 11:12:52 UTC (rev 1730)
+++ plog/branches/plog-1.1-ben/class/action/viewarticleaction.class.php	2005-04-05 12:14:11 UTC (rev 1731)
@@ -84,7 +84,6 @@
 
         function perform()
         {
-
         	$this->_view = new ViewArticleView( $this->_blogInfo, 
                                                    Array( "articleId" => $this->_articleId,
                                                           "articleName" => $this->_articleName,
@@ -136,19 +135,28 @@
             // fetch the article
             // the article identifier can be either its internal id number or its mangled topic
             if( $this->_articleId ) { 
-                $article  = $this->articles->getBlogArticle( $this->_articleId, $this->_blogInfo->getId(), false, 
-				                                       $this->_date, $this->_categoryId, $this->_userId,
-													   POST_STATUS_PUBLISHED );
-			}
-            else {
-                $article  = $this->articles->getBlogArticleByTitle( $this->_articleName, $this->_blogInfo->getId(), false,
-				                                              $this->_date, $this->_categoryId, $this->_userId,
-															  POST_STATUS_PUBLISHED );
-			}
-				
+                include_once( PLOG_CLASS_PATH."class/dao/article.class.php" );
+
+                $article  = $this->articles->getBlogArticle( $this->_articleId, 
+                                                             $this->_blogInfo->getId(), 
+                                                             false, 
+                                                             $this->_date, 
+                                                             $this->_categoryId, 
+                                                             $this->_userId,
+                                                             POST_STATUS_PUBLISHED );
+            } else {
+                $article  = $this->articles->getBlogArticleByTitle( $this->_articleName, 
+                                                                    $this->_blogInfo->getId(), 
+                                                                    false,
+                                                                    $this->_date, 
+                                                                    $this->_categoryId, 
+                                                                    $this->_userId,
+                                                                    POST_STATUS_PUBLISHED );
+            }
+
             // if the article id doesn't exist, cancel the whole thing...
             if( !$article ) {
-				$this->_setErrorView();
+                $this->_setErrorView();
                 return false;
             }
 			
@@ -171,4 +179,4 @@
             return true;
         }
     }
-?>
\ No newline at end of file
+?>




More information about the pLog-svn mailing list