[pLog-svn] r2117 - in plog/branches/plog-1.1-ben/class: action
action/admin config dao dao/customfields security view
ork at devel.plogworld.net
ork at devel.plogworld.net
Mon May 30 21:37:37 GMT 2005
Author: ork
Date: 2005-05-30 21:37:37 +0000 (Mon, 30 May 2005)
New Revision: 2117
Modified:
plog/branches/plog-1.1-ben/class/action/action.class.php
plog/branches/plog-1.1-ben/class/action/admin/adminupdateeditblogaction.class.php
plog/branches/plog-1.1-ben/class/action/defaultaction.class.php
plog/branches/plog-1.1-ben/class/config/properties.class.php
plog/branches/plog-1.1-ben/class/dao/article.class.php
plog/branches/plog-1.1-ben/class/dao/blogs.class.php
plog/branches/plog-1.1-ben/class/dao/customfields/customfield.class.php
plog/branches/plog-1.1-ben/class/dao/referers.class.php
plog/branches/plog-1.1-ben/class/dao/usercomment.class.php
plog/branches/plog-1.1-ben/class/security/bayesianfilter.class.php
plog/branches/plog-1.1-ben/class/security/nullpipelinefilter.class.php
plog/branches/plog-1.1-ben/class/security/pipeline.class.php
plog/branches/plog-1.1-ben/class/security/pipelinefilter.class.php
plog/branches/plog-1.1-ben/class/view/blogview.class.php
plog/branches/plog-1.1-ben/class/view/viewarticleview.class.php
Log:
reorganized some more 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-05-30 12:10:43 UTC (rev 2116)
+++ plog/branches/plog-1.1-ben/class/action/action.class.php 2005-05-30 21:37:37 UTC (rev 2117)
@@ -22,8 +22,6 @@
*/
include_once( PLOG_CLASS_PATH."class/object/object.class.php" );
-// include_once( PLOG_CLASS_PATH."class/config/properties.class.php" );
-// include_once( PLOG_CLASS_PATH."class/object/observable.class.php" );
/**
* \ingroup Action
Modified: plog/branches/plog-1.1-ben/class/action/admin/adminupdateeditblogaction.class.php
===================================================================
--- plog/branches/plog-1.1-ben/class/action/admin/adminupdateeditblogaction.class.php 2005-05-30 12:10:43 UTC (rev 2116)
+++ plog/branches/plog-1.1-ben/class/action/admin/adminupdateeditblogaction.class.php 2005-05-30 21:37:37 UTC (rev 2117)
@@ -66,37 +66,36 @@
*/
function perform()
{
- // fetch the values from the form which have already been validated
- $this->_blogName = $this->_request->getValue( "blogName" );
- $this->_blogLocale = $this->_request->getValue( "blogLocale" );
+ // fetch the values from the form which have already been validated
+ $this->_blogName = $this->_request->getValue( "blogName" );
+ $this->_blogLocale = $this->_request->getValue( "blogLocale" );
$this->_blogTemplate = $this->_request->getValue( "blogTemplate" );
$this->_blogOwner = $this->_request->getValue( "blogOwner" );
$this->_editBlogId = $this->_request->getValue( "blogId" );
- $this->_blogTimeOffset = $this->_request->getValue( "blogTimeOffset" );
- $this->_blogProperties = $this->_request->getValue( "properties" );
- $this->_blogQuota = $this->_request->getValue( "blogResourcesQuota" );
- $this->_blogUsers = $this->_request->getValue( "blogUsers" );
- $this->_blogStatus = $this->_request->getValue( "blogStatus" );
- //print_r($_REQUEST);
-
- // get the blog we're trying to update
+ $this->_blogTimeOffset = $this->_request->getValue( "blogTimeOffset" );
+ $this->_blogProperties = $this->_request->getValue( "properties" );
+ $this->_blogQuota = $this->_request->getValue( "blogResourcesQuota" );
+ $this->_blogUsers = $this->_request->getValue( "blogUsers" );
+ $this->_blogStatus = $this->_request->getValue( "blogStatus" );
+
+ // get the blog we're trying to update
$blogs = new Blogs();
$blogInfo = $blogs->getBlogInfo( $this->_editBlogId );
if( !$blogInfo ) {
- $this->_view = new AdminSiteBlogsListView( $this->_blogInfo );
+ $this->_view = new AdminSiteBlogsListView( $this->_blogInfo );
$this->_view->setErrorMessage( $this->_locale->tr("error_fetching_blog"));
$this->setCommonData();
return false;
}
-
- $this->notifyEvent( EVENT_BLOG_LOADED, Array( "blog" => &$blogInfo ));
+ $this->notifyEvent( EVENT_BLOG_LOADED, Array( "blog" => &$blogInfo ));
+
// make sure that the user we'd like to set as owner exists
$users = new Users();
$userInfo = $users->getUserInfoFromId( $this->_blogOwner );
if( !$userInfo ) {
- $this->_view = new AdminSiteBlogsListView( $this->_blogInfo );
+ $this->_view = new AdminSiteBlogsListView( $this->_blogInfo );
$this->_view->setErrorMessage( $this->_locale->tr("error_incorrect_blog_owner"));
$this->setCommonData();
return false;
@@ -135,7 +134,7 @@
return false;
}
- $this->notifyEvent( EVENT_POST_BLOG_UPDATE, Array( "blog" => &$blogInfo ));
+ $this->notifyEvent( EVENT_POST_BLOG_UPDATE, Array( "blog" => &$blogInfo ));
// do it again, baby :)))
if( $this->_blogInfo->getId() == $blogInfo->getId()) {
@@ -149,10 +148,10 @@
$this->_view = new AdminSiteBlogsListView( $this->_blogInfo );
$this->_view->setSuccessMessage( $this->_locale->pr( "edit_blog_settings_updated_ok", $blogInfo->getBlog()));
$this->setCommonData();
-
- // clear the cache
- CacheControl::resetBlogCache( $blogInfo->getId());
+ // clear the cache
+ CacheControl::resetBlogCache( $blogInfo->getId());
+
// better to return true if everything fine
return true;
}
Modified: plog/branches/plog-1.1-ben/class/action/defaultaction.class.php
===================================================================
--- plog/branches/plog-1.1-ben/class/action/defaultaction.class.php 2005-05-30 12:10:43 UTC (rev 2116)
+++ plog/branches/plog-1.1-ben/class/action/defaultaction.class.php 2005-05-30 21:37:37 UTC (rev 2117)
@@ -1,11 +1,7 @@
<?php
- include_once( PLOG_CLASS_PATH."class/action/blogaction.class.php" );
- include_once( PLOG_CLASS_PATH."class/view/defaultview.class.php" );
- include_once( PLOG_CLASS_PATH."class/net/http/session/sessioninfo.class.php" );
- include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
- include_once( PLOG_CLASS_PATH."class/view/errorview.class.php" );
- include_once( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );
+ require_once( PLOG_CLASS_PATH."class/action/blogaction.class.php" );
+ require_once( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );
/**
* \ingroup Action
@@ -53,6 +49,8 @@
*/
function perform()
{
+ require_once( PLOG_CLASS_PATH."class/view/defaultview.class.php" );
+
// first of all, we have to determine which blog we would like to see
$blogId = $this->_blogInfo->getId();
@@ -75,8 +73,8 @@
return true;
}
- include_once( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
- include_once( PLOG_CLASS_PATH."class/dao/articlecategories.class.php" );
+ require_once( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
+ require_once( PLOG_CLASS_PATH."class/dao/articlecategories.class.php" );
// if we got a category name instead of a category id, then we
// should first look up this category in the database and see if
@@ -85,6 +83,7 @@
if( $this->_categoryName ) {
$category = $categories->getCategoryByName( $this->_categoryName, $this->_blogInfo->getId());
if( !$category ) {
+ require_once( PLOG_CLASS_PATH."class/view/errorview.class.php" );
$this->_view = new ErrorView( $this->_blogInfo );
$this->_view->setValue( 'message', "error_incorrect_category_id" );
$this->setCommonData();
@@ -99,6 +98,7 @@
if( $this->_categoryId > 0 ) {
$category = $categories->getCategory( $this->_categoryId, $this->_blogInfo->getId());
if( !$category ) {
+ require_once( PLOG_CLASS_PATH."class/view/errorview.class.php" );
$this->_view = new ErrorView( $this->_blogInfo );
$this->_view->setValue( 'message', "error_incorrect_category_id" );
$this->setCommonData();
@@ -118,6 +118,7 @@
$users = new Users();
$user = $users->getUserInfoFromUsername( $this->_userName );
if( !$user ) {
+ require_once( PLOG_CLASS_PATH."class/view/errorview.class.php" );
$this->_view = new ErrorView( $this->_blogInfo );
$this->_view->setValue( 'message', 'error_incorrect_user_id' );
$this->setCommonData();
@@ -167,6 +168,7 @@
// if we couldn't fetch the articles, send an error and quit
if( count($blogArticles) == 0 ) {
+ require_once( PLOG_CLASS_PATH."class/view/errorview.class.php" );
$this->_view = new ErrorView( $this->_blogInfo );
$this->_view->setValue( 'message', 'error_fetching_articles' );
}
Modified: plog/branches/plog-1.1-ben/class/config/properties.class.php
===================================================================
--- plog/branches/plog-1.1-ben/class/config/properties.class.php 2005-05-30 12:10:43 UTC (rev 2116)
+++ plog/branches/plog-1.1-ben/class/config/properties.class.php 2005-05-30 21:37:37 UTC (rev 2117)
@@ -53,10 +53,6 @@
return $defaultValue;
} else {
$value = $this->_props[$key];
- if( empty($value) )
- if( $defaultValue != null )
- $value = $defaultValue;
-
return $value;
}
}
Modified: plog/branches/plog-1.1-ben/class/dao/article.class.php
===================================================================
--- plog/branches/plog-1.1-ben/class/dao/article.class.php 2005-05-30 12:10:43 UTC (rev 2116)
+++ plog/branches/plog-1.1-ben/class/dao/article.class.php 2005-05-30 21:37:37 UTC (rev 2117)
@@ -5,7 +5,6 @@
include_once( PLOG_CLASS_PATH.'class/dao/userinfo.class.php' );
include_once( PLOG_CLASS_PATH.'class/dao/articlecomments.class.php' );
include_once( PLOG_CLASS_PATH.'class/dao/articlestatus.class.php' );
- include_once( PLOG_CLASS_PATH.'class/dao/customfields/customfieldsvalues.class.php' );
include_once( PLOG_CLASS_PATH.'class/dao/articlecommentstatus.class.php' );
define( 'POST_EXTENDED_TEXT_MODIFIER', '[@more@]' );
@@ -709,6 +708,7 @@
function getFields()
{
if( $this->_fields == null ) {
+ include_once( PLOG_CLASS_PATH.'class/dao/customfields/customfieldsvalues.class.php' );
// get the custom fields
$customFields = new CustomFieldsValues();
$fields = $customFields->getArticleCustomFieldsValues( $this->getId(), true );
Modified: plog/branches/plog-1.1-ben/class/dao/blogs.class.php
===================================================================
--- plog/branches/plog-1.1-ben/class/dao/blogs.class.php 2005-05-30 12:10:43 UTC (rev 2116)
+++ plog/branches/plog-1.1-ben/class/dao/blogs.class.php 2005-05-30 21:37:37 UTC (rev 2117)
@@ -291,7 +291,6 @@
*/
function updateBlog( $blogId, $blogInfo )
{
- // source classes
include_once( PLOG_CLASS_PATH."class/data/textfilter.class.php" );
$blogName = TextFilter::urlize($blogInfo->getBlog());
Modified: plog/branches/plog-1.1-ben/class/dao/customfields/customfield.class.php
===================================================================
--- plog/branches/plog-1.1-ben/class/dao/customfields/customfield.class.php 2005-05-30 12:10:43 UTC (rev 2116)
+++ plog/branches/plog-1.1-ben/class/dao/customfields/customfield.class.php 2005-05-30 21:37:37 UTC (rev 2117)
@@ -1,7 +1,6 @@
<?php
include_once( PLOG_CLASS_PATH."class/database/dbobject.class.php" );
- include_once( PLOG_CLASS_PATH."class/data/textfilter.class.php" );
/**
* Defines a custom field
@@ -54,6 +53,8 @@
function setName( $name )
{
+ include_once( PLOG_CLASS_PATH."class/data/textfilter.class.php" );
+
$this->_name = Textfilter::filterAllHTML( $name );
}
@@ -110,4 +111,4 @@
return $this->_defaultValue;
}
}
-?>
\ No newline at end of file
+?>
Modified: plog/branches/plog-1.1-ben/class/dao/referers.class.php
===================================================================
--- plog/branches/plog-1.1-ben/class/dao/referers.class.php 2005-05-30 12:10:43 UTC (rev 2116)
+++ plog/branches/plog-1.1-ben/class/dao/referers.class.php 2005-05-30 21:37:37 UTC (rev 2117)
@@ -1,9 +1,7 @@
<?php
- include_once( PLOG_CLASS_PATH."class/dao/model.class.php" );
- include_once( PLOG_CLASS_PATH."class/config/config.class.php" );
- include_once( PLOG_CLASS_PATH."class/dao/referer.class.php" );
- include_once( PLOG_CLASS_PATH."class/net/url.class.php" );
+ require_once( PLOG_CLASS_PATH."class/dao/model.class.php" );
+ require_once( PLOG_CLASS_PATH."class/config/config.class.php" );
define( "REFERRERS_LIST_ITEMS_PER_PAGE", 15 );
@@ -37,6 +35,8 @@
*/
function addReferer( $refererHeader, $articleId, $blogId )
{
+ require_once( PLOG_CLASS_PATH."class/net/url.class.php" );
+
// quit inmediately if this is not enabled...
if( !$this->_enabled )
return;
@@ -151,6 +151,8 @@
*/
function _fillRefererInformation( $row )
{
+ require_once( PLOG_CLASS_PATH."class/dao/referer.class.php" );
+
$referer = new Referer( $row["url"], $row["article_id"], $row["blog_id"], $row["last_date"], $row["hits"], $row["id"] );
return $referer;
@@ -181,7 +183,7 @@
$row = $result->FetchRow();
$referrer = $this->_fillRefererInformation( $row );
-
+
return $referrer;
}
Modified: plog/branches/plog-1.1-ben/class/dao/usercomment.class.php
===================================================================
--- plog/branches/plog-1.1-ben/class/dao/usercomment.class.php 2005-05-30 12:10:43 UTC (rev 2116)
+++ plog/branches/plog-1.1-ben/class/dao/usercomment.class.php 2005-05-30 21:37:37 UTC (rev 2117)
@@ -108,7 +108,6 @@
$this->_status = $status;
if( $date == null ) {
- // source necessary source
include_once( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
$t = new Timestamp();
@@ -267,6 +266,7 @@
*/
function getDate()
{
+
return $this->_date;
}
Modified: plog/branches/plog-1.1-ben/class/security/bayesianfilter.class.php
===================================================================
--- plog/branches/plog-1.1-ben/class/security/bayesianfilter.class.php 2005-05-30 12:10:43 UTC (rev 2116)
+++ plog/branches/plog-1.1-ben/class/security/bayesianfilter.class.php 2005-05-30 21:37:37 UTC (rev 2117)
@@ -1,7 +1,6 @@
<?php
include_once( PLOG_CLASS_PATH."class/security/pipelinefilter.class.php" );
-// include_once( PLOG_CLASS_PATH."class/net/client.class.php" );
define("HIGH_SPAM_PROBABILITY", 1000);
Modified: plog/branches/plog-1.1-ben/class/security/nullpipelinefilter.class.php
===================================================================
--- plog/branches/plog-1.1-ben/class/security/nullpipelinefilter.class.php 2005-05-30 12:10:43 UTC (rev 2116)
+++ plog/branches/plog-1.1-ben/class/security/nullpipelinefilter.class.php 2005-05-30 21:37:37 UTC (rev 2117)
@@ -1,6 +1,6 @@
<?php
- include_once( PLOG_CLASS_PATH."class/security/pipelinefilter.class.php" );
+ require_once( PLOG_CLASS_PATH."class/security/pipelinefilter.class.php" );
/**
* \ingroup Security
@@ -23,9 +23,11 @@
*/
function filter()
{
+ require_once( PLOG_CLASS_PATH . 'class/security/pipelineresult.class.php' );
+
$result = new PipelineResult();
return $result;
}
}
-?>
\ No newline at end of file
+?>
Modified: plog/branches/plog-1.1-ben/class/security/pipeline.class.php
===================================================================
--- plog/branches/plog-1.1-ben/class/security/pipeline.class.php 2005-05-30 12:10:43 UTC (rev 2116)
+++ plog/branches/plog-1.1-ben/class/security/pipeline.class.php 2005-05-30 21:37:37 UTC (rev 2117)
@@ -137,6 +137,7 @@
*/
function process()
{
+ require_once( PLOG_CLASS_PATH . 'class/security/pipelinerequest.class.php' );
global $_pLogPipelineRegisteredFilters;
// check if the pipeline is enabled
Modified: plog/branches/plog-1.1-ben/class/security/pipelinefilter.class.php
===================================================================
--- plog/branches/plog-1.1-ben/class/security/pipelinefilter.class.php 2005-05-30 12:10:43 UTC (rev 2116)
+++ plog/branches/plog-1.1-ben/class/security/pipelinefilter.class.php 2005-05-30 21:37:37 UTC (rev 2117)
@@ -1,8 +1,6 @@
<?php
include_once( PLOG_CLASS_PATH."class/object/object.class.php" );
- include_once( PLOG_CLASS_PATH."class/security/pipelinerequest.class.php" );
- include_once( PLOG_CLASS_PATH."class/security/pipelineresult.class.php" );
/**
* \ingroup Security
@@ -60,4 +58,4 @@
throw( new Exception( "This method must be implemented by child classes!" ));
}
}
-?>
\ No newline at end of file
+?>
Modified: plog/branches/plog-1.1-ben/class/view/blogview.class.php
===================================================================
--- plog/branches/plog-1.1-ben/class/view/blogview.class.php 2005-05-30 12:10:43 UTC (rev 2116)
+++ plog/branches/plog-1.1-ben/class/view/blogview.class.php 2005-05-30 21:37:37 UTC (rev 2117)
@@ -1,8 +1,6 @@
<?php
include_once( PLOG_CLASS_PATH.'class/view/smartyview.class.php' );
-// include_once( PLOG_CLASS_PATH.'class/dao/bloginfo.class.php' );
-// include_once( PLOG_CLASS_PATH.'class/dao/mylinks.class.php' );
include_once( PLOG_CLASS_PATH.'class/plugin/pluginmanager.class.php' );
/**
Modified: plog/branches/plog-1.1-ben/class/view/viewarticleview.class.php
===================================================================
--- plog/branches/plog-1.1-ben/class/view/viewarticleview.class.php 2005-05-30 12:10:43 UTC (rev 2116)
+++ plog/branches/plog-1.1-ben/class/view/viewarticleview.class.php 2005-05-30 21:37:37 UTC (rev 2117)
@@ -73,4 +73,4 @@
parent::render();
}
}
-?>
\ No newline at end of file
+?>
More information about the pLog-svn
mailing list