[pLog-svn] r2858 - in plugins/trunk: . contentfilter/class/action
contentfilter/class/security feedreader/class/dao
galleryimages gravatar gravatar/class/view
moblog/class/security nestedcomments print/class/action
recentcomments
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Thu Jan 26 23:46:06 GMT 2006
Author: oscar
Date: 2006-01-26 23:46:06 +0000 (Thu, 26 Jan 2006)
New Revision: 2858
Modified:
plugins/trunk/contentfilter/class/action/admindeleteblogfilteredcontentaction.class.php
plugins/trunk/contentfilter/class/action/admindeletefilteredcontentaction.class.php
plugins/trunk/contentfilter/class/action/adminupdateblogfilteredcontentaction.class.php
plugins/trunk/contentfilter/class/action/adminupdatefilteredcontentaction.class.php
plugins/trunk/contentfilter/class/security/contentfilter.class.php
plugins/trunk/feedreader/class/dao/feedreaderdata.class.php
plugins/trunk/galleryimages/plugingalleryimages.class.php
plugins/trunk/gravatar/class/view/plugingravatarconfigview.class.php
plugins/trunk/gravatar/plugingravatar.class.php
plugins/trunk/moblog.php
plugins/trunk/moblog/class/security/moblogbatchfilter.class.php
plugins/trunk/nestedcomments/pluginnestedcomments.class.php
plugins/trunk/print/class/action/printpostaction.class.php
plugins/trunk/recentcomments/pluginrecentcomments.class.php
Log:
A few more plugins adapted to 1.1. I've also reorganized some of the includes to save some memory.
Modified: plugins/trunk/contentfilter/class/action/admindeleteblogfilteredcontentaction.class.php
===================================================================
--- plugins/trunk/contentfilter/class/action/admindeleteblogfilteredcontentaction.class.php 2006-01-26 19:10:34 UTC (rev 2857)
+++ plugins/trunk/contentfilter/class/action/admindeleteblogfilteredcontentaction.class.php 2006-01-26 23:46:06 UTC (rev 2858)
@@ -1,7 +1,8 @@
<?php
include_once( PLOG_CLASS_PATH."class/action/admin/blogowneradminaction.class.php" );
- include_once( PLOG_CLASS_PATH."class/data/validator/arrayvalidator.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."plugins/contentfilter/class/dao/filteredcontents.class.php" );
include_once( PLOG_CLASS_PATH."plugins/contentfilter/class/view/adminnewblogfilteredcontentview.class.php" );
include_once( PLOG_CLASS_PATH."plugins/contentfilter/class/view/adminblogfilteredcontentview.class.php" );
Modified: plugins/trunk/contentfilter/class/action/admindeletefilteredcontentaction.class.php
===================================================================
--- plugins/trunk/contentfilter/class/action/admindeletefilteredcontentaction.class.php 2006-01-26 19:10:34 UTC (rev 2857)
+++ plugins/trunk/contentfilter/class/action/admindeletefilteredcontentaction.class.php 2006-01-26 23:46:06 UTC (rev 2858)
@@ -1,7 +1,8 @@
<?php
include_once( PLOG_CLASS_PATH."class/action/admin/siteadminaction.class.php" );
- include_once( PLOG_CLASS_PATH."class/data/validator/arrayvalidator.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."plugins/contentfilter/class/dao/filteredcontents.class.php" );
include_once( PLOG_CLASS_PATH."plugins/contentfilter/class/view/adminnewfilteredcontentview.class.php" );
include_once( PLOG_CLASS_PATH."plugins/contentfilter/class/view/adminfilteredcontentview.class.php" );
Modified: plugins/trunk/contentfilter/class/action/adminupdateblogfilteredcontentaction.class.php
===================================================================
--- plugins/trunk/contentfilter/class/action/adminupdateblogfilteredcontentaction.class.php 2006-01-26 19:10:34 UTC (rev 2857)
+++ plugins/trunk/contentfilter/class/action/adminupdateblogfilteredcontentaction.class.php 2006-01-26 23:46:06 UTC (rev 2858)
@@ -2,6 +2,7 @@
include_once( PLOG_CLASS_PATH."class/action/admin/blogowneradminaction.class.php" );
include_once( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
+ include_once( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
include_once( PLOG_CLASS_PATH."plugins/contentfilter/class/dao/filteredcontents.class.php" );
include_once( PLOG_CLASS_PATH."plugins/contentfilter/class/view/admineditblogfilteredcontentview.class.php" );
include_once( PLOG_CLASS_PATH."plugins/contentfilter/class/view/adminblogfilteredcontentview.class.php" );
Modified: plugins/trunk/contentfilter/class/action/adminupdatefilteredcontentaction.class.php
===================================================================
--- plugins/trunk/contentfilter/class/action/adminupdatefilteredcontentaction.class.php 2006-01-26 19:10:34 UTC (rev 2857)
+++ plugins/trunk/contentfilter/class/action/adminupdatefilteredcontentaction.class.php 2006-01-26 23:46:06 UTC (rev 2858)
@@ -2,6 +2,7 @@
include_once( PLOG_CLASS_PATH."class/action/admin/siteadminaction.class.php" );
include_once( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
+ include_once( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
include_once( PLOG_CLASS_PATH."plugins/contentfilter/class/dao/filteredcontents.class.php" );
include_once( PLOG_CLASS_PATH."plugins/contentfilter/class/view/admineditfilteredcontentview.class.php" );
include_once( PLOG_CLASS_PATH."plugins/contentfilter/class/view/adminfilteredcontentview.class.php" );
Modified: plugins/trunk/contentfilter/class/security/contentfilter.class.php
===================================================================
--- plugins/trunk/contentfilter/class/security/contentfilter.class.php 2006-01-26 19:10:34 UTC (rev 2857)
+++ plugins/trunk/contentfilter/class/security/contentfilter.class.php 2006-01-26 23:46:06 UTC (rev 2858)
@@ -1,8 +1,6 @@
<?php
include_once( PLOG_CLASS_PATH."class/security/pipelinefilter.class.php" );
- include_once( PLOG_CLASS_PATH."plugins/contentfilter/class/dao/filteredcontents.class.php" );
- include_once( PLOG_CLASS_PATH."plugins/contentfilter/class/dao/filteredcontent.class.php" );
// custom error code that will be returned to the pipeline whenever an
// error is found... Be careful so as to not to have two different modules
@@ -44,6 +42,9 @@
$result = new PipelineResult();
return $result;
}
+
+ include_once( PLOG_CLASS_PATH."plugins/contentfilter/class/dao/filteredcontents.class.php" );
+ include_once( PLOG_CLASS_PATH."plugins/contentfilter/class/dao/filteredcontent.class.php" );
//
// get the content that has been globally blocked by the admin(s)
Modified: plugins/trunk/feedreader/class/dao/feedreaderdata.class.php
===================================================================
--- plugins/trunk/feedreader/class/dao/feedreaderdata.class.php 2006-01-26 19:10:34 UTC (rev 2857)
+++ plugins/trunk/feedreader/class/dao/feedreaderdata.class.php 2006-01-26 23:46:06 UTC (rev 2858)
@@ -15,6 +15,7 @@
$this->Model();
// checks if our tables are there and available
+ $this->_initializeDb();
$this->_checkTables();
}
Modified: plugins/trunk/galleryimages/plugingalleryimages.class.php
===================================================================
--- plugins/trunk/galleryimages/plugingalleryimages.class.php 2006-01-26 19:10:34 UTC (rev 2857)
+++ plugins/trunk/galleryimages/plugingalleryimages.class.php 2006-01-26 23:46:06 UTC (rev 2858)
@@ -1,7 +1,6 @@
<?php
include_once( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
- include_once( PLOG_CLASS_PATH."class/gallery/dao/galleryresources.class.php" );
/**
* Plugin that offers features such as to return a random image from the
@@ -28,6 +27,7 @@
*/
function latestImages( $maxImages = 1, $album_id = 0 )
{
+ include_once( PLOG_CLASS_PATH."class/gallery/dao/galleryresources.class.php" );
$resources = new GalleryResources();
$prefix = $resources->getPrefix();
$blogId = $this->blogInfo->getId();
@@ -52,14 +52,16 @@
$query .= "ORDER BY r.date DESC LIMIT 0, {$maxImages}";
// just to make things easier, we'll cheat a little here...
- $result = $resources->_db->Execute( $query );
+ include_once( PLOG_CLASS_PATH."class/database/db.class.php" );
+ $db =& Db::getDb();
+ $result = $db->Execute( $query );
if( !$result )
return false;
$latestimages = Array();
while( $row = $result->FetchRow()) {
- array_push( $latestimages, $resources->_fillResourceInformation( $row ));
+ array_push( $latestimages, $resources->mapRow( $row ));
}
return $latestimages;
@@ -96,6 +98,7 @@
*/
function randomImages( $maxImages = 1, $album_id = 0 )
{
+ include_once( PLOG_CLASS_PATH."class/gallery/dao/galleryresources.class.php" );
$resources = new GalleryResources();
$prefix = $resources->getPrefix();
$blogId = $this->blogInfo->getId();
@@ -116,13 +119,16 @@
$query .=" ORDER BY RAND() LIMIT 0, {$maxImages}";
// just to make things easier, we'll cheat a little here...
- $result = $resources->_db->Execute( $query );
+ include_once( PLOG_CLASS_PATH."class/database/db.class.php" );
+ $db =& Db::getDb();
+ $result = $db->Execute( $query );
+
if( !$result )
return false;
$randomimages = Array();
while( $row = $result->FetchRow()) {
- array_push( $randomimages, $resources->_fillResourceInformation( $row ));
+ array_push( $randomimages, $resources->mapRow( $row ));
}
return $randomimages;
Modified: plugins/trunk/gravatar/class/view/plugingravatarconfigview.class.php
===================================================================
--- plugins/trunk/gravatar/class/view/plugingravatarconfigview.class.php 2006-01-26 19:10:34 UTC (rev 2857)
+++ plugins/trunk/gravatar/class/view/plugingravatarconfigview.class.php 2006-01-26 23:46:06 UTC (rev 2858)
@@ -1,6 +1,7 @@
<?php
include_once( PLOG_CLASS_PATH."class/view/admin/adminplugintemplatedview.class.php" );
+ include_once( PLOG_CLASS_PATH."plugins/gravatar/class/avatars/avatars.class.php" );
/**
* implements the main view of the feed reader plugin
Modified: plugins/trunk/gravatar/plugingravatar.class.php
===================================================================
--- plugins/trunk/gravatar/plugingravatar.class.php 2006-01-26 19:10:34 UTC (rev 2857)
+++ plugins/trunk/gravatar/plugingravatar.class.php 2006-01-26 23:46:06 UTC (rev 2858)
@@ -2,9 +2,6 @@
include_once( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
include_once( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );
- include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
- include_once( PLOG_CLASS_PATH."class/net/requestgenerator.class.php" );
- include_once( PLOG_CLASS_PATH."plugins/gravatar/class/avatars/avatars.class.php" );
/**
* Mostra un avatar a cada comentari descarregant-lo de Gravatar.com. Versió 0.2
@@ -76,7 +73,7 @@
}
if ( $default == "" ) {
- $rg =& RequestGenerator::getRequestGenerator( $this->blogInfo );
+ $rg = $this->blogInfo->getBlogRequestGenerator();
$default = $rg->getUrl( "/plugins/gravatar/avatars/".$this->default);
}
Modified: plugins/trunk/moblog/class/security/moblogbatchfilter.class.php
===================================================================
--- plugins/trunk/moblog/class/security/moblogbatchfilter.class.php 2006-01-26 19:10:34 UTC (rev 2857)
+++ plugins/trunk/moblog/class/security/moblogbatchfilter.class.php 2006-01-26 23:46:06 UTC (rev 2858)
@@ -2,9 +2,6 @@
include_once( PLOG_CLASS_PATH."class/security/pipelinefilter.class.php" );
include_once( PLOG_CLASS_PATH."class/config/config.class.php" );
- include_once( PLOG_CLASS_PATH."class/net/baserequestgenerator.class.php" );
- include_once( PLOG_CLASS_PATH."plugins/moblog/class/PEAR/Net/POP3.php" );
- include_once( PLOG_CLASS_PATH."plugins/moblog/class/PEAR/HTTP/Request.php");
// custom error code that will be returned to the pipeline whenever an
// error is found... Be careful so as to not to have two different modules
@@ -36,6 +33,10 @@
$result = new PipelineResult();
return $result;
}
+
+ include_once( PLOG_CLASS_PATH."class/net/baserequestgenerator.class.php" );
+ include_once( PLOG_CLASS_PATH."plugins/moblog/class/PEAR/Net/POP3.php" );
+ include_once( PLOG_CLASS_PATH."plugins/moblog/class/PEAR/HTTP/Request.php");
// check if this moblog plugin has been enabled or disabled by blog owner
$blogSettings = $blogInfo->getSettings();
Modified: plugins/trunk/moblog.php
===================================================================
--- plugins/trunk/moblog.php 2006-01-26 19:10:34 UTC (rev 2857)
+++ plugins/trunk/moblog.php 2006-01-26 23:46:06 UTC (rev 2858)
@@ -27,6 +27,10 @@
include_once( PLOG_CLASS_PATH."plugins/moblog/class/moblog/moblogresponse.class.php" );
include_once( PLOG_CLASS_PATH."plugins/moblog/class/moblog/moblogconstants.properties.php" );
include_once( PLOG_CLASS_PATH."class/template/cachecontrol.class.php" );
+ include_once( PLOG_CLASS_PATH."class/dao/userpermissions.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/file/fileupload.class.php" );
// initialize the logging system
MoblogLogger::log( "-- Initialized");
Modified: plugins/trunk/nestedcomments/pluginnestedcomments.class.php
===================================================================
--- plugins/trunk/nestedcomments/pluginnestedcomments.class.php 2006-01-26 19:10:34 UTC (rev 2857)
+++ plugins/trunk/nestedcomments/pluginnestedcomments.class.php 2006-01-26 23:46:06 UTC (rev 2858)
@@ -1,8 +1,7 @@
<?php
- include_once( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
- include_once( PLOG_CLASS_PATH."class/dao/articlecomments.class.php" );
-
+ include_once( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
+
/**
* change this constant in case you want to redefine the limit for nested
* comments
Modified: plugins/trunk/print/class/action/printpostaction.class.php
===================================================================
--- plugins/trunk/print/class/action/printpostaction.class.php 2006-01-26 19:10:34 UTC (rev 2857)
+++ plugins/trunk/print/class/action/printpostaction.class.php 2006-01-26 23:46:06 UTC (rev 2858)
@@ -1,12 +1,8 @@
<?php
- include_once( PLOG_CLASS_PATH."class/net/http/httpvars.class.php" );
- include_once( PLOG_CLASS_PATH."class/dao/articles.class.php" );
- include_once( PLOG_CLASS_PATH."class/view/plugintemplatedview.class.php" );
- include_once( PLOG_CLASS_PATH."class/view/errorview.class.php" );
- include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
+
include_once( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
+ include_once( PLOG_CLASS_PATH."class/action/blogaction.class.php" );
-
class PrintPostAction extends BlogAction
{
var $_articleId;
@@ -34,6 +30,10 @@
function perform()
{
+ include_once( PLOG_CLASS_PATH."class/dao/articles.class.php" );
+ include_once( PLOG_CLASS_PATH."class/view/errorview.class.php" );
+ include_once( PLOG_CLASS_PATH."class/view/plugintemplatedview.class.php" );
+
// try to fetch the article
$articles = new Articles();
$article = $articles->getBlogArticle( $this->_articleId, $this->_blogInfo->getId());
Modified: plugins/trunk/recentcomments/pluginrecentcomments.class.php
===================================================================
--- plugins/trunk/recentcomments/pluginrecentcomments.class.php 2006-01-26 19:10:34 UTC (rev 2857)
+++ plugins/trunk/recentcomments/pluginrecentcomments.class.php 2006-01-26 23:46:06 UTC (rev 2858)
@@ -2,8 +2,6 @@
include_once( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
include_once( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );
- include_once( PLOG_CLASS_PATH."class/dao/articlecomments.class.php" );
- include_once( PLOG_CLASS_PATH."class/dao/articles.class.php" );
/**
* Plugin that offers features to return a recent article comments from the current blog
@@ -22,6 +20,7 @@
$this->author = "Mark Wu";
$this->desc = "This plugin offers the most recently article comments.";
+ include_once( PLOG_CLASS_PATH."class/database/db.class.php" );
$this->prefix = Db::getPrefix();
$this->locales = Array( "en_UK" , "zh_TW" , "zh_CN", "es_ES" );
@@ -57,6 +56,8 @@
*/
function getRecentComments($maxComments = 0, $based = 'BLOG')
{
+ include_once( PLOG_CLASS_PATH."class/dao/articlecomments.class.php" );
+
$comments = new ArticleComments();
$blogId = $this->blogInfo->getId();
@@ -88,7 +89,7 @@
$recentcomments = Array();
while( $row = $result->FetchRow()) {
- array_push( $recentcomments, $comments->_fillCommentInformation($row));
+ array_push( $recentcomments, $comments->mapRow($row));
}
return $recentcomments;
@@ -96,6 +97,8 @@
function getArticle( $artId )
{
+ include_once( PLOG_CLASS_PATH."class/dao/articles.class.php" );
+
$articles = new Articles();
$blogId = $this->blogInfo->getId();
More information about the pLog-svn
mailing list