[pLog-svn] r1716 - in plog/branches/plog-1.1-ben/class: action controller dao security template

ork at devel.plogworld.net ork at devel.plogworld.net
Mon Apr 4 20:44:46 GMT 2005


Author: ork
Date: 2005-04-04 20:44:46 +0000 (Mon, 04 Apr 2005)
New Revision: 1716

Modified:
   plog/branches/plog-1.1-ben/class/action/action.class.php
   plog/branches/plog-1.1-ben/class/action/blogaction.class.php
   plog/branches/plog-1.1-ben/class/controller/controller.class.php
   plog/branches/plog-1.1-ben/class/dao/articlecomments.class.php
   plog/branches/plog-1.1-ben/class/dao/articles.class.php
   plog/branches/plog-1.1-ben/class/dao/userinfo.class.php
   plog/branches/plog-1.1-ben/class/security/bayesianfilter.class.php
   plog/branches/plog-1.1-ben/class/template/template.class.php
   plog/branches/plog-1.1-ben/class/template/templateservice.class.php
Log:
just includes ..


Modified: plog/branches/plog-1.1-ben/class/action/action.class.php
===================================================================
--- plog/branches/plog-1.1-ben/class/action/action.class.php	2005-04-04 20:09:03 UTC (rev 1715)
+++ plog/branches/plog-1.1-ben/class/action/action.class.php	2005-04-04 20:44:46 UTC (rev 1716)
@@ -22,11 +22,8 @@
 	 */
 
 	include_once( PLOG_CLASS_PATH."class/object/object.class.php" );
-    include_once( PLOG_CLASS_PATH."class/action/actioninfo.class.php" );
-    include_once( PLOG_CLASS_PATH."class/config/properties.class.php" );
-    include_once( PLOG_CLASS_PATH."class/net/request.class.php" );
-    include_once( PLOG_CLASS_PATH."class/object/observable.class.php" );
-	include_once( PLOG_CLASS_PATH."class/data/forms/formvalidator.class.php" );
+//  include_once( PLOG_CLASS_PATH."class/config/properties.class.php" );
+//  include_once( PLOG_CLASS_PATH."class/object/observable.class.php" );
 
 	/**
 	 * \ingroup Action
@@ -73,6 +70,9 @@
          */
     	function Action( $actionInfo, $httpRequest )
         {
+            include_once( PLOG_CLASS_PATH."class/net/request.class.php" );
+	        include_once( PLOG_CLASS_PATH."class/data/forms/formvalidator.class.php" );
+
 			$this->Object();
 
             $this->_request = new Request( $httpRequest );
@@ -322,4 +322,4 @@
 			 $this->_form->setFormIsValid( $success );	 
 		 }
     }
-?>
\ No newline at end of file
+?>

Modified: plog/branches/plog-1.1-ben/class/action/blogaction.class.php
===================================================================
--- plog/branches/plog-1.1-ben/class/action/blogaction.class.php	2005-04-04 20:09:03 UTC (rev 1715)
+++ plog/branches/plog-1.1-ben/class/action/blogaction.class.php	2005-04-04 20:44:46 UTC (rev 1716)
@@ -2,13 +2,6 @@
 
     include_once( PLOG_CLASS_PATH."class/action/action.class.php" );
     include_once( PLOG_CLASS_PATH."class/config/config.class.php" );
-    include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
-    include_once( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );
-    include_once( PLOG_CLASS_PATH."class/net/http/httpvars.class.php" );
-    include_once( PLOG_CLASS_PATH."class/security/pipeline.class.php" );
-    include_once( PLOG_CLASS_PATH."class/net/http/subdomains.class.php" );
-    include_once( PLOG_CLASS_PATH."class/dao/referers.class.php" );
-    include_once( PLOG_CLASS_PATH."class/dao/articles.class.php" );	
 
     /**
      * \ingroup Action
@@ -39,6 +32,11 @@
          */
         function BlogAction( $actionInfo, $request )
         {
+            include_once( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );
+            include_once( PLOG_CLASS_PATH."class/security/pipeline.class.php" );
+            include_once( PLOG_CLASS_PATH."class/dao/articles.class.php" );	
+            include_once( PLOG_CLASS_PATH."class/net/http/httpvars.class.php" );
+
             $this->Action( $actionInfo, $request );
 
             // we use the HttpVars package since then we can access the session object
@@ -126,9 +124,13 @@
          */
         function _getBlogInfo()
         {	
+            include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
+
 			// see if we're using subdomains
 			$config =& Config::getConfig();
 			if( $config->getValue( "subdomains_enabled" )) {
+                include_once( PLOG_CLASS_PATH."class/net/http/subdomains.class.php" );
+
 				$subdomainInfo = Subdomains::getSubdomainInfoFromRequest();
 
 				if( $subdomainInfo["username"] != "" && $this->_request->getValue( 'blogUserName' ) == "" )
@@ -228,10 +230,13 @@
 		 */
 		function _updateReferrer()
 		{
-			if( $this->_request->getValue( "articleId" ) != "" || $this->_request->getValue( "articleName" ) != "" ) 
+			if( $this->_request->getValue( "articleId" ) != "" || 
+                $this->_request->getValue( "articleName" ) != "" ) 
 				return true;
 				
         	// update the referer statistics
+            include_once( PLOG_CLASS_PATH."class/dao/referers.class.php" );
+
             $referers = new Referers();
             if (array_key_exists( 'HTTP_REFERER', $_SERVER ))
                 $referers->addReferer( $_SERVER['HTTP_REFERER'], 0, $this->_blogInfo->getId());

Modified: plog/branches/plog-1.1-ben/class/controller/controller.class.php
===================================================================
--- plog/branches/plog-1.1-ben/class/controller/controller.class.php	2005-04-04 20:09:03 UTC (rev 1715)
+++ plog/branches/plog-1.1-ben/class/controller/controller.class.php	2005-04-04 20:44:46 UTC (rev 1716)
@@ -17,7 +17,6 @@
 
     include_once( PLOG_CLASS_PATH."class/object/object.class.php" );
     include_once( PLOG_CLASS_PATH."class/action/action.class.php" );
-    include_once( PLOG_CLASS_PATH."class/action/actioninfo.class.php" );
 	include_once( PLOG_CLASS_PATH."class/controller/resourceclassloader.class.php" );
 
     //
@@ -258,6 +257,8 @@
          */
         function process( $httpRequest )
         {
+            include_once( PLOG_CLASS_PATH."class/net/request.class.php" );
+
             // get the name of the action
             $request = new Request( $httpRequest );
             $actionName = $request->getValue($this->_actionParam );
@@ -292,6 +293,8 @@
                 }
 
                 if( !$performed ) {
+                    include_once( PLOG_CLASS_PATH."class/action/actioninfo.class.php" );
+
                     // load the class if it hasn't been loaded yet
                     $this->loadActionClass( $actionClass );
 

Modified: plog/branches/plog-1.1-ben/class/dao/articlecomments.class.php
===================================================================
--- plog/branches/plog-1.1-ben/class/dao/articlecomments.class.php	2005-04-04 20:09:03 UTC (rev 1715)
+++ plog/branches/plog-1.1-ben/class/dao/articlecomments.class.php	2005-04-04 20:44:46 UTC (rev 1716)
@@ -1,8 +1,6 @@
 <?php
 
 	include_once( PLOG_CLASS_PATH."class/dao/model.class.php" );
-	include_once( PLOG_CLASS_PATH."class/dao/usercomment.class.php" );
-	include_once( PLOG_CLASS_PATH."class/dao/articles.class.php" );
 
 	define( "COMMENT_ORDER_OLDEST_FIRST", 1 );
 	define( "COMMENT_ORDER_NEWEST_FIRST", 2 );
@@ -75,6 +73,8 @@
 		 */
 		function getPostComments( $artid, $order = COMMENT_ORDER_NEWEST_FIRST, $status = COMMENT_STATUS_ALL, $page = -1, $itemsPerPage = DEFAULT_ITEMS_PER_PAGE )
 		{
+	        include_once( PLOG_CLASS_PATH."class/dao/usercomment.class.php" );
+
 			$query = "SELECT * FROM ".$this->getPrefix()."articles_comments WHERE article_id = ".$artid;
             if( $status != COMMENT_STATUS_ALL )
             	$query .= " AND status = $status";
@@ -451,6 +451,8 @@
 		 */
 		function getBlogComments( $blogId, $maxItems = 0, $articleStatus = POST_STATUS_PUBLISHED )
 		{
+	        include_once( PLOG_CLASS_PATH."class/dao/articles.class.php" );
+
 			$prefix = $this->getPrefix();
 			$query = "SELECT c.id AS id, c.article_id AS article_id, c.topic AS topic, 
 			                 c.text AS text, c.date AS date, c.user_email AS user_email,

Modified: plog/branches/plog-1.1-ben/class/dao/articles.class.php
===================================================================
--- plog/branches/plog-1.1-ben/class/dao/articles.class.php	2005-04-04 20:09:03 UTC (rev 1715)
+++ plog/branches/plog-1.1-ben/class/dao/articles.class.php	2005-04-04 20:44:46 UTC (rev 1716)
@@ -1,21 +1,10 @@
 <?php
 
     include_once( PLOG_CLASS_PATH.'class/dao/model.class.php' );
-    include_once( PLOG_CLASS_PATH.'class/dao/article.class.php' );
-    include_once( PLOG_CLASS_PATH.'class/dao/articlecategories.class.php' );
-    include_once( PLOG_CLASS_PATH.'class/dao/articlenotifications.class.php' );
-    include_once( PLOG_CLASS_PATH.'class/dao/articlecomments.class.php' );
-    include_once( PLOG_CLASS_PATH.'class/dao/articlecommentstatus.class.php' );	
-    include_once( PLOG_CLASS_PATH.'class/dao/users.class.php' );
-    include_once( PLOG_CLASS_PATH.'class/dao/trackbacks.class.php' );
+//  include_once( PLOG_CLASS_PATH.'class/dao/articlecommentstatus.class.php' );	
     include_once( PLOG_CLASS_PATH.'class/config/config.class.php' );
     include_once( PLOG_CLASS_PATH.'class/dao/blogs.class.php' );
-    include_once( PLOG_CLASS_PATH.'class/data/textfilter.class.php' );
-    include_once( PLOG_CLASS_PATH.'class/dao/customfields/customfieldsvalues.class.php' );
-    include_once( PLOG_CLASS_PATH.'class/dao/customfields/customfields.class.php' );
 
-    include_once( PLOG_CLASS_PATH.'class/logger/LogUtil.php' );
-
     /**
 	 * \ingroup DAO
 	 *
@@ -38,6 +27,12 @@
 
         function Articles()
         {
+            include_once( PLOG_CLASS_PATH.'class/dao/articlecomments.class.php' );
+            include_once( PLOG_CLASS_PATH.'class/dao/articlecategories.class.php' );
+            include_once( PLOG_CLASS_PATH.'class/dao/users.class.php' );
+            include_once( PLOG_CLASS_PATH.'class/dao/customfields/customfieldsvalues.class.php' );
+            include_once( PLOG_CLASS_PATH.'class/dao/trackbacks.class.php' );
+
             $this->Model();
             $this->categories = new ArticleCategories();
             $this->comments   = new ArticleComments();
@@ -643,7 +638,9 @@
         function addArticle( &$newArticle )
         {
             // first, we build up the query
+            include_once( PLOG_CLASS_PATH.'class/data/textfilter.class.php' );
             $filter = new Textfilter();
+
             $query = "INSERT INTO ".$this->getPrefix()."articles( user_id,blog_id,status,date,properties, slug )
                       VALUES ( ".$newArticle->getUser().",".
                       $newArticle->getBlog().",'".
@@ -670,6 +667,7 @@
             $this->addPostCategoriesLink( $postId, $newArticle->getCategoryIds());
 
             // and save the custom fields
+            include_once( PLOG_CLASS_PATH.'class/dao/customfields/customfields.class.php' );
             $this->addArticleCustomFields( $postId, $newArticle->getBlog(), $newArticle->getFields());
 
             return $postId;
@@ -1062,6 +1060,7 @@
         function _fillArticleInformation( $query_result, $includeHiddenFields = true )
         {
             include_once( PLOG_CLASS_PATH.'class/data/timestamp.class.php' );
+            include_once( PLOG_CLASS_PATH.'class/dao/article.class.php' );
 
 			$id = $query_result['id'];
 			if( isset($this->cache[$id])) {

Modified: plog/branches/plog-1.1-ben/class/dao/userinfo.class.php
===================================================================
--- plog/branches/plog-1.1-ben/class/dao/userinfo.class.php	2005-04-04 20:09:03 UTC (rev 1715)
+++ plog/branches/plog-1.1-ben/class/dao/userinfo.class.php	2005-04-04 20:44:46 UTC (rev 1716)
@@ -1,8 +1,6 @@
 <?php
 
 	include_once( PLOG_CLASS_PATH."class/database/dbobject.class.php" );
-    include_once( PLOG_CLASS_PATH."class/gallery/dao/galleryresource.class.php" );
-	include_once( PLOG_CLASS_PATH."class/data/textfilter.class.php" );
 
     /**
      * Represents a user in our application. Includes information such as the username,
@@ -84,6 +82,8 @@
 
 		function setUsername( $newUsername )
 		{
+            include_once( PLOG_CLASS_PATH."class/data/textfilter.class.php" );
+
 			$this->_username = Textfilter::filterAllHTML( $newUsername );
 		}
 
@@ -178,6 +178,7 @@
 		function _loadPicture()
 		{
 			include_once( PLOG_CLASS_PATH."class/gallery/dao/galleryresources.class.php" );
+
 			$resources = new GalleryResources();
 			$picture = $resources->getResource( $this->_resourcePictureId );
 			

Modified: plog/branches/plog-1.1-ben/class/security/bayesianfilter.class.php
===================================================================
--- plog/branches/plog-1.1-ben/class/security/bayesianfilter.class.php	2005-04-04 20:09:03 UTC (rev 1715)
+++ plog/branches/plog-1.1-ben/class/security/bayesianfilter.class.php	2005-04-04 20:44:46 UTC (rev 1716)
@@ -1,13 +1,7 @@
 <?php
 
 	include_once( PLOG_CLASS_PATH."class/security/pipelinefilter.class.php" );
-	include_once( PLOG_CLASS_PATH."class/bayesian/bayesiantokenizer.class.php" );
-    include_once( PLOG_CLASS_PATH."class/dao/bayesiantokens.class.php" );
-    include_once( PLOG_CLASS_PATH."class/dao/bayesiantoken.class.php" );
-    include_once( PLOG_CLASS_PATH."class/dao/bayesianfilterinfos.class.php" );
-    include_once( PLOG_CLASS_PATH."class/dao/bayesianfilterinfo.class.php" );
-    include_once( PLOG_CLASS_PATH."class/dao/articlecomments.class.php" );
-    include_once( PLOG_CLASS_PATH."class/net/client.class.php" );
+//  include_once( PLOG_CLASS_PATH."class/net/client.class.php" );
 
     define("HIGH_SPAM_PROBABILITY", 1000);
 
@@ -48,6 +42,8 @@
         */         
         function filter()
         {
+            include_once( PLOG_CLASS_PATH."class/dao/articlecomments.class.php" );
+
         	$config	=& Config::getConfig();
         	
         	if (!$config->getValue("bayesian_filter_enabled"))
@@ -120,6 +116,8 @@
         */        
         function getSpamProbability($blogId, $topic, $text, $userName, $userEmail, $userUrl)
         {
+	        include_once( PLOG_CLASS_PATH."class/bayesian/bayesiantokenizer.class.php" );
+
             $tokenizer = new BayesianTokenizer();
 
             $tokensTopic = $tokenizer->addContextMark($tokenizer->tokenize($topic), TOKEN_TOPIC_MARK);
@@ -140,6 +138,9 @@
         */
 		function _getMostSignificantTokens($blogId, $tokens)
         {       
+            include_once( PLOG_CLASS_PATH."class/dao/bayesiantokens.class.php" );
+            include_once( PLOG_CLASS_PATH."class/dao/bayesianfilterinfos.class.php" );
+
         	$config	=& Config::getConfig(); 
         	
         	$bayesianFilterInfos = new BayesianFilterInfos();

Modified: plog/branches/plog-1.1-ben/class/template/template.class.php
===================================================================
--- plog/branches/plog-1.1-ben/class/template/template.class.php	2005-04-04 20:09:03 UTC (rev 1715)
+++ plog/branches/plog-1.1-ben/class/template/template.class.php	2005-04-04 20:44:46 UTC (rev 1716)
@@ -18,7 +18,6 @@
 
     include_once( PLOG_CLASS_PATH.'class/template/smarty/Smarty.class.php' );
     include_once( PLOG_CLASS_PATH.'class/config/config.class.php' );
-	include_once( PLOG_CLASS_PATH.'class/logger/loggermanager.class.php' );
 
     /**
      * \ingroup Template
@@ -54,6 +53,7 @@
         {
             // initialize logging
             // TBD: we need define a global logging switch like logging_enabled
+	        // include_once( PLOG_CLASS_PATH.'class/logger/loggermanager.class.php' );
             // $this->log =& LoggerManager::getLogger( "default" );
 
             // create the Smarty object and set the security values

Modified: plog/branches/plog-1.1-ben/class/template/templateservice.class.php
===================================================================
--- plog/branches/plog-1.1-ben/class/template/templateservice.class.php	2005-04-04 20:09:03 UTC (rev 1715)
+++ plog/branches/plog-1.1-ben/class/template/templateservice.class.php	2005-04-04 20:44:46 UTC (rev 1716)
@@ -1,14 +1,11 @@
 <?php
 
 	include_once( PLOG_CLASS_PATH.'class/object/object.class.php' );
-    include_once( PLOG_CLASS_PATH.'class/template/template.class.php' );
     include_once( PLOG_CLASS_PATH.'class/config/config.class.php' );
-    include_once( PLOG_CLASS_PATH.'class/dao/blogsettings.class.php' );
-    include_once( PLOG_CLASS_PATH.'class/dao/blogs.class.php' );
+//  include_once( PLOG_CLASS_PATH.'class/dao/blogsettings.class.php' );
+//  include_once( PLOG_CLASS_PATH.'class/dao/blogs.class.php' );
     include_once( PLOG_CLASS_PATH.'class/misc/glob.class.php' );
     include_once( PLOG_CLASS_PATH.'class/file/file.class.php' );
-	include_once( PLOG_CLASS_PATH.'class/template/cachedtemplate.class.php' );
-	include_once( PLOG_CLASS_PATH.'class/template/templatesets/templatesetstorage.class.php' );
 	
 	/**
 	 * default permissions used to create temporary template folders. Seems like
@@ -72,6 +69,8 @@
          */
         function Template( $templateName, $layout, $blogInfo = null )
         {
+            include_once( PLOG_CLASS_PATH.'class/template/template.class.php' );
+
 			// get some information about the folder where the template is and the template file
 			$templateInfo = $this->_getTemplateFileInfo( $templateName, $layout, $blogInfo );
 			$templateFileName = $templateInfo['templateFileName'];
@@ -106,6 +105,8 @@
 		 */
 		function customTemplate( $templateName, $layout, $cached = false )
 		{
+	        include_once( PLOG_CLASS_PATH.'class/template/cachedtemplate.class.php' );
+
 			// get a nice Template object
 			$config =& Config::getConfig();
 			if( $cached )
@@ -141,6 +142,8 @@
 		 */
 		function AdminTemplate( $templateName, $blogInfo = null ) 
 		{
+	        include_once( PLOG_CLASS_PATH.'class/template/templatesets/templatesetstorage.class.php' );
+
 			$t = $this->Template( $templateName, 'admin', $blogInfo );
 			$t->assign( 'admintemplatepath', TemplateSetStorage::getAdminTemplateFolder());
 			
@@ -163,6 +166,8 @@
 		 */
         function CachedTemplate( $templateName, $layout, $blogInfo = null )
         {
+	        include_once( PLOG_CLASS_PATH.'class/template/cachedtemplate.class.php' );
+
 			// get some information about the folder where the template is and the template file		
 			$templateInfo = $this->_getTemplateFileInfo( $templateName, $layout, $blogInfo );
 			$templateFileName = $templateInfo['templateFileName'];
@@ -189,6 +194,8 @@
 		 */
 		function _getTemplateFileInfo( $templateName, $layout, $blogInfo ) 
 		{
+	        include_once( PLOG_CLASS_PATH.'class/template/templatesets/templatesetstorage.class.php' );
+
             // build the file name
             if( $blogInfo == null ) {
             	$templateFileName = $layout.'/'.$templateName.'.template';
@@ -234,6 +241,8 @@
 		 */
 		function PluginTemplate( $pluginId, $templateName, $blogInfo = null )
 		{
+            include_once( PLOG_CLASS_PATH.'class/template/template.class.php' );
+
 			// define the template file name
 			$templateFolder = TemplateSetStorage::getPluginTemplateFolder( $pluginId );
 			$templateFileName = $templateFolder.$templateName.'.template';
@@ -263,6 +272,8 @@
 		 */
 		function PluginCachedTemplate( $pluginId, $templateName, $blogInfo = null )
 		{
+	        include_once( PLOG_CLASS_PATH.'class/template/cachedtemplate.class.php' );
+
 			// define the template file name
 			$templateFolder = TemplateSetStorage::getPluginTemplateFolder( $pluginId );
 			$templateFileName = $templateFolder.$templateName.'.template';
@@ -305,4 +316,4 @@
 			return $t;
 		}
     }
-?>
\ No newline at end of file
+?>




More information about the pLog-svn mailing list