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

ork at devel.plogworld.net ork at devel.plogworld.net
Tue Apr 5 18:53:17 GMT 2005


Author: ork
Date: 2005-04-05 18:53:16 +0000 (Tue, 05 Apr 2005)
New Revision: 1749

Modified:
   plog/branches/plog-1.1-ben/class/action/admin/adminaddpostaction.class.php
Log:
changed includes


Modified: plog/branches/plog-1.1-ben/class/action/admin/adminaddpostaction.class.php
===================================================================
--- plog/branches/plog-1.1-ben/class/action/admin/adminaddpostaction.class.php	2005-04-05 18:52:59 UTC (rev 1748)
+++ plog/branches/plog-1.1-ben/class/action/admin/adminaddpostaction.class.php	2005-04-05 18:53:16 UTC (rev 1749)
@@ -2,17 +2,11 @@
 
 	include_once( PLOG_CLASS_PATH."class/action/admin/adminpostmanagementcommonaction.class.php" );
 	include_once( PLOG_CLASS_PATH."class/view/admin/adminpostslistview.class.php" );	
-    include_once( PLOG_CLASS_PATH."class/dao/articles.class.php" );
-    include_once( PLOG_CLASS_PATH."class/locale/locale.class.php" );
-    include_once( PLOG_CLASS_PATH."class/data/stringutils.class.php" );
     include_once( PLOG_CLASS_PATH."class/view/admin/admintemplatedview.class.php" );
     include_once( PLOG_CLASS_PATH."class/view/admin/adminnewpostview.class.php" );    
-	include_once( PLOG_CLASS_PATH."class/bayesian/bayesianfiltercore.class.php" );
     include_once( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );	
     include_once( PLOG_CLASS_PATH."class/data/validator/arrayvalidator.class.php" );	    
     include_once( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
-	include_once( PLOG_CLASS_PATH."class/data/textfilter.class.php" );
-	include_once( PLOG_CLASS_PATH."class/template/cachecontrol.class.php" );
 	
     /**
      * \ingroup Action
@@ -58,6 +52,8 @@
 		 */
 		function _savePostData( $article )
 		{
+            include_once( PLOG_CLASS_PATH."class/dao/articles.class.php" );
+
 			$status = $this->_postStatus;
 			
 			$articles = new Articles();
@@ -89,6 +85,9 @@
          */
         function perform()
         {
+            include_once( PLOG_CLASS_PATH."class/dao/article.class.php" );
+	        include_once( PLOG_CLASS_PATH."class/data/textfilter.class.php" );
+
 			$this->_fetchCommonData();
 
 			$this->_postId = $this->_request->getValue( "postId" );
@@ -118,10 +117,13 @@
                 $message = $this->_locale->tr("post_added_ok");
                 
                 // train the filter
+	            include_once( PLOG_CLASS_PATH."class/bayesian/bayesianfiltercore.class.php" );
                 BayesianFilterCore::trainWithArticle( $article );
                                 
         		// add the article notification if requested to do so
             	if( $this->_sendNotification ) {
+                    require_once( PLOG_CLASS_PATH."class/dao/articlenotifications.class.php" );
+
                 	$artNotifications = new ArticleNotifications();
 	            	$artNotifications->addNotification( $artId, $this->_blogInfo->getId(), $this->_userInfo->getId());
                     $message .= " ".$this->_locale->tr("send_notifications_ok");
@@ -139,6 +141,8 @@
 
                     // and now check what to do with the trackbacks
                     if( $this->_sendTrackbacks ) {
+                        include_once( PLOG_CLASS_PATH."class/data/stringutils.class.php" );
+
                     	// get the links from the text of the post
         				$links = StringUtils::getLinks( stripslashes($article->getText()));
 
@@ -157,6 +161,8 @@
 					$this->notifyEvent( EVENT_POST_POST_ADD, Array( "article" => &$article )); 
 					
 					// empty the cache used by this blog
+	                include_once( PLOG_CLASS_PATH."class/template/cachecontrol.class.php" );
+
 					CacheControl::resetBlogCache( $this->_blogInfo->getId());						
                 }
                 else {




More information about the pLog-svn mailing list