[pLog-svn] r5969 - in plog/branches/lifetype-2.0-autoload: class/action class/action/admin class/dao class/dao/misc class/dao/userdata class/data class/gallery class/gallery/dao class/gallery/resizers class/net class/net/xmlrpc class/security class/summary/action class/summary/dao class/summary/data class/summary/view class/test/helpers class/test/tests/dao class/test/tests/net/xmlrpc class/test/tests/summary/dao class/test/tests/summary/data class/view/admin class/view/admin/chooser tools
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Sun Oct 7 08:04:59 EDT 2007
Author: oscar
Date: 2007-10-07 08:04:57 -0400 (Sun, 07 Oct 2007)
New Revision: 5969
Added:
plog/branches/lifetype-2.0-autoload/class/gallery/galleryconstants.class.php
Removed:
plog/branches/lifetype-2.0-autoload/class/gallery/galleryconstants.php
Modified:
plog/branches/lifetype-2.0-autoload/class/action/addtrackbackaction.class.php
plog/branches/lifetype-2.0-autoload/class/action/admin/adminaddpostaction.class.php
plog/branches/lifetype-2.0-autoload/class/action/admin/adminaddresourceaction.class.php
plog/branches/lifetype-2.0-autoload/class/action/admin/adminaddresourcealbumaction.class.php
plog/branches/lifetype-2.0-autoload/class/action/admin/adminchangecommentsstatusaction.class.php
plog/branches/lifetype-2.0-autoload/class/action/admin/admincleanupaction.class.php
plog/branches/lifetype-2.0-autoload/class/action/admin/admindeletearticlecategoryaction.class.php
plog/branches/lifetype-2.0-autoload/class/action/admin/admindeleteblogaction.class.php
plog/branches/lifetype-2.0-autoload/class/action/admin/admindeleteblogcategoryaction.class.php
plog/branches/lifetype-2.0-autoload/class/action/admin/admindeleteglobalarticlecategoryaction.class.php
plog/branches/lifetype-2.0-autoload/class/action/admin/admindeleteusersaction.class.php
plog/branches/lifetype-2.0-autoload/class/action/admin/admindoregisterblogaction.class.php
plog/branches/lifetype-2.0-autoload/class/action/admin/admineditcommentsaction.class.php
plog/branches/lifetype-2.0-autoload/class/action/admin/adminmainaction.class.php
plog/branches/lifetype-2.0-autoload/class/action/admin/adminmarkcommentaction.class.php
plog/branches/lifetype-2.0-autoload/class/action/admin/adminpreviewpostaction.class.php
plog/branches/lifetype-2.0-autoload/class/action/admin/adminsavedraftarticleajaxaction.class.php
plog/branches/lifetype-2.0-autoload/class/action/admin/adminupdatecommentaction.class.php
plog/branches/lifetype-2.0-autoload/class/action/admin/adminupdatepostaction.class.php
plog/branches/lifetype-2.0-autoload/class/action/blogaction.class.php
plog/branches/lifetype-2.0-autoload/class/action/resourceserveraction.class.php
plog/branches/lifetype-2.0-autoload/class/action/rssaction.class.php
plog/branches/lifetype-2.0-autoload/class/action/searchaction.class.php
plog/branches/lifetype-2.0-autoload/class/action/viewalbumaction.class.php
plog/branches/lifetype-2.0-autoload/class/action/viewarticleaction.class.php
plog/branches/lifetype-2.0-autoload/class/action/viewarticletrackbacksaction.class.php
plog/branches/lifetype-2.0-autoload/class/action/viewresourceaction.class.php
plog/branches/lifetype-2.0-autoload/class/dao/article.class.php
plog/branches/lifetype-2.0-autoload/class/dao/articlecategories.class.php
plog/branches/lifetype-2.0-autoload/class/dao/articlecategory.class.php
plog/branches/lifetype-2.0-autoload/class/dao/articlecomments.class.php
plog/branches/lifetype-2.0-autoload/class/dao/articlecommentstatus.class.php
plog/branches/lifetype-2.0-autoload/class/dao/articles.class.php
plog/branches/lifetype-2.0-autoload/class/dao/blogcategories.class.php
plog/branches/lifetype-2.0-autoload/class/dao/blogcategory.class.php
plog/branches/lifetype-2.0-autoload/class/dao/bloginfo.class.php
plog/branches/lifetype-2.0-autoload/class/dao/commentscommon.class.php
plog/branches/lifetype-2.0-autoload/class/dao/globalarticlecategories.class.php
plog/branches/lifetype-2.0-autoload/class/dao/globalarticlecategory.class.php
plog/branches/lifetype-2.0-autoload/class/dao/misc/init.class.php
plog/branches/lifetype-2.0-autoload/class/dao/purgedata.class.php
plog/branches/lifetype-2.0-autoload/class/dao/searchengine.class.php
plog/branches/lifetype-2.0-autoload/class/dao/trackback.class.php
plog/branches/lifetype-2.0-autoload/class/dao/trackbacks.class.php
plog/branches/lifetype-2.0-autoload/class/dao/usercomment.class.php
plog/branches/lifetype-2.0-autoload/class/dao/userdata/baseuserdataprovider.class.php
plog/branches/lifetype-2.0-autoload/class/dao/userdata/joomlauserdataprovider.class.php
plog/branches/lifetype-2.0-autoload/class/dao/userdata/lifetypeuserdataprovider.class.php
plog/branches/lifetype-2.0-autoload/class/dao/userdata/phpbb2userdataprovider.class.php
plog/branches/lifetype-2.0-autoload/class/dao/userdata/simplepostnukeuserdataprovider.class.php
plog/branches/lifetype-2.0-autoload/class/dao/userdata/vbb3userdataprovider.class.php
plog/branches/lifetype-2.0-autoload/class/dao/userdata/wbbuserdataprovider.class.php
plog/branches/lifetype-2.0-autoload/class/dao/userinfo.class.php
plog/branches/lifetype-2.0-autoload/class/dao/users.class.php
plog/branches/lifetype-2.0-autoload/class/data/textfilter.class.php
plog/branches/lifetype-2.0-autoload/class/gallery/dao/galleryalbum.class.php
plog/branches/lifetype-2.0-autoload/class/gallery/dao/galleryitemslist.class.php
plog/branches/lifetype-2.0-autoload/class/gallery/dao/galleryresource.class.php
plog/branches/lifetype-2.0-autoload/class/gallery/dao/galleryresources.class.php
plog/branches/lifetype-2.0-autoload/class/gallery/dao/galleryresourcestorage.class.php
plog/branches/lifetype-2.0-autoload/class/gallery/resizers/gallerygdresizer.class.php
plog/branches/lifetype-2.0-autoload/class/gallery/resizers/galleryresizer.class.php
plog/branches/lifetype-2.0-autoload/class/gallery/resizers/gallerythumbnailgenerator.class.php
plog/branches/lifetype-2.0-autoload/class/net/baserequestgenerator.class.php
plog/branches/lifetype-2.0-autoload/class/net/xmlrpc/xmlrpcserver.class.php
plog/branches/lifetype-2.0-autoload/class/security/bayesianfilter.class.php
plog/branches/lifetype-2.0-autoload/class/summary/action/activeaccountaction.class.php
plog/branches/lifetype-2.0-autoload/class/summary/action/blogprofileaction.class.php
plog/branches/lifetype-2.0-autoload/class/summary/action/dofinishregister.class.php
plog/branches/lifetype-2.0-autoload/class/summary/action/summaryrssaction.class.php
plog/branches/lifetype-2.0-autoload/class/summary/dao/summarystats.class.php
plog/branches/lifetype-2.0-autoload/class/summary/data/summarytools.class.php
plog/branches/lifetype-2.0-autoload/class/summary/view/summarybloglistview.class.php
plog/branches/lifetype-2.0-autoload/class/summary/view/summaryuserlistview.class.php
plog/branches/lifetype-2.0-autoload/class/test/helpers/testtools.class.php
plog/branches/lifetype-2.0-autoload/class/test/tests/dao/article_test.class.php
plog/branches/lifetype-2.0-autoload/class/test/tests/dao/articlecategories_test.class.php
plog/branches/lifetype-2.0-autoload/class/test/tests/dao/commentscommon_test.class.php
plog/branches/lifetype-2.0-autoload/class/test/tests/dao/searchengine_test.class.php
plog/branches/lifetype-2.0-autoload/class/test/tests/net/xmlrpc/xmlrpcserver_test.class.php
plog/branches/lifetype-2.0-autoload/class/test/tests/summary/dao/summarystats_test.class.php
plog/branches/lifetype-2.0-autoload/class/test/tests/summary/data/summarytools_test.class.php
plog/branches/lifetype-2.0-autoload/class/view/admin/adminarticlecommentslistview.class.php
plog/branches/lifetype-2.0-autoload/class/view/admin/admindashboardview.class.php
plog/branches/lifetype-2.0-autoload/class/view/admin/adminpostslistview.class.php
plog/branches/lifetype-2.0-autoload/class/view/admin/adminresourceslistview.class.php
plog/branches/lifetype-2.0-autoload/class/view/admin/chooser/adminuserpictureselectview.class.php
plog/branches/lifetype-2.0-autoload/tools/generateData.php
Log:
I turned some global constants in to class constants, but unfortunately the xxx_STATUS_yyy constants cannot be modified like that because they are dynamically created, so I have readded some lt_includes() at the top of the files that need them.
Modified: plog/branches/lifetype-2.0-autoload/class/action/addtrackbackaction.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/action/addtrackbackaction.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/action/addtrackbackaction.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,21 +1,7 @@
<?php
-
-
-
-
-
-
-
-
-
-
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/blogstatus.class.php" );
-
-
-
/**
* Class that takes care of adding trackbacks
*
Modified: plog/branches/lifetype-2.0-autoload/class/action/admin/adminaddpostaction.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/action/admin/adminaddpostaction.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/action/admin/adminaddpostaction.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,13 +1,7 @@
<?php
-
-
-
-
-
-
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
+
/**
* \ingroup Action
* @private
Modified: plog/branches/lifetype-2.0-autoload/class/action/admin/adminaddresourceaction.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/action/admin/adminaddresourceaction.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/action/admin/adminaddresourceaction.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,19 +1,5 @@
<?php
-
-
-
-
-
-
-
-
-
-
-
-
-
-
/**
* \ingroup Action
* @private
@@ -128,15 +114,15 @@
$this->notifyEvent( EVENT_POST_RESOURCE_ADD, Array( "resource" => &$resource ));
}
else {
- if( $res == GALLERY_ERROR_RESOURCE_FORBIDDEN_EXTENSION )
+ if( $res == GalleryConstants::GALLERY_ERROR_RESOURCE_FORBIDDEN_EXTENSION )
$errorMessage .= $this->_locale->pr("error_resource_forbidden_extension", $file["name"])."<br/>";
- elseif( $res == GALLERY_ERROR_RESOURCE_NOT_WHITELISTED_EXTENSION )
+ elseif( $res == GalleryConstants::GALLERY_ERROR_RESOURCE_NOT_WHITELISTED_EXTENSION )
$errorMessage .= $this->_locale->pr("error_resource_not_whitelisted_extension", $file["name"])."<br/>";
- elseif( $res == GALLERY_ERROR_RESOURCE_TOO_BIG )
+ elseif( $res == GalleryConstants::GALLERY_ERROR_RESOURCE_TOO_BIG )
$errorMessage .= $this->_locale->pr("error_resource_too_big", $file["name"])."<br/>";
- elseif( $res == GALLERY_ERROR_UPLOADS_NOT_ENABLED )
+ elseif( $res == GalleryConstants::GALLERY_ERROR_UPLOADS_NOT_ENABLED )
$errorMessage .= $this->_locale->tr("error_uploads_disabled" )."<br/>";
- elseif( $res == GALLERY_ERROR_QUOTA_EXCEEDED )
+ elseif( $res == GalleryConstants::GALLERY_ERROR_QUOTA_EXCEEDED )
$errorMessage .= $this->_locale->tr( "error_quota_exceeded" )."<br/>";
else
$errorMessage .= $this->_locale->pr("error_adding_resource", $file["name"])."<br/>";
Modified: plog/branches/lifetype-2.0-autoload/class/action/admin/adminaddresourcealbumaction.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/action/admin/adminaddresourcealbumaction.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/action/admin/adminaddresourcealbumaction.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -55,7 +55,7 @@
$t = new Timestamp();
$album = new GalleryAlbum( $this->_blogInfo->getId(), $this->_albumName,
$this->_albumDescription,
- GALLERY_RESOURCE_PREVIEW_AVAILABLE,
+ GalleryConstants::GALLERY_RESOURCE_PREVIEW_AVAILABLE,
$this->_parentId,
$t->getTimestamp(),
Array(),
Modified: plog/branches/lifetype-2.0-autoload/class/action/admin/adminchangecommentsstatusaction.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/action/admin/adminchangecommentsstatusaction.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/action/admin/adminchangecommentsstatusaction.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,13 +1,7 @@
<?php
+ lt_include( PLOG_CLASS_PATH."class/dao/articlecommentstatus.class.php" );
-
-
-
-
-
-
-
/**
* \ingroup Action
* @private
Modified: plog/branches/lifetype-2.0-autoload/class/action/admin/admincleanupaction.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/action/admin/admincleanupaction.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/action/admin/admincleanupaction.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,10 +1,6 @@
<?php
-
-
-
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/blogstatus.class.php" );
/**
* \ingroup Action
Modified: plog/branches/lifetype-2.0-autoload/class/action/admin/admindeletearticlecategoryaction.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/action/admin/admindeletearticlecategoryaction.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/action/admin/admindeletearticlecategoryaction.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,11 +1,6 @@
<?php
-
-
-
-
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
/**
* \ingroup Action
Modified: plog/branches/lifetype-2.0-autoload/class/action/admin/admindeleteblogaction.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/action/admin/admindeleteblogaction.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/action/admin/admindeleteblogaction.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,10 +1,6 @@
<?php
-
-
-
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/blogstatus.class.php" );
/**
* \ingroup Action
Modified: plog/branches/lifetype-2.0-autoload/class/action/admin/admindeleteblogcategoryaction.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/action/admin/admindeleteblogcategoryaction.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/action/admin/admindeleteblogcategoryaction.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,11 +1,6 @@
<?php
-
-
-
-
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/blogstatus.class.php" );
/**
* \ingroup Action
Modified: plog/branches/lifetype-2.0-autoload/class/action/admin/admindeleteglobalarticlecategoryaction.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/action/admin/admindeleteglobalarticlecategoryaction.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/action/admin/admindeleteglobalarticlecategoryaction.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,16 +1,7 @@
<?php
- /**
- * GLobal artical Category files added by Ameng(Ameng.vVlogger.com) 2005-06-20
- * version 1.0
- * Changed from original article category.
- */
-
-
-
-
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
+
/**
* \ingroup Action
* @private
Modified: plog/branches/lifetype-2.0-autoload/class/action/admin/admindeleteusersaction.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/action/admin/admindeleteusersaction.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/action/admin/admindeleteusersaction.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,10 +1,6 @@
<?php
-
-
-
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/userstatus.class.php" );
/**
* \ingroup Action
Modified: plog/branches/lifetype-2.0-autoload/class/action/admin/admindoregisterblogaction.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/action/admin/admindoregisterblogaction.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/action/admin/admindoregisterblogaction.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,21 +1,7 @@
<?php
+ lt_include( PLOG_CLASS_PATH."class/dao/blogstatus.class.php" );
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class AdminDoRegisterBlogAction extends AdminAction
{
@@ -140,7 +126,7 @@
$album = new GalleryAlbum( $newBlogId, // blog id
$locale->tr( "register_default_album_name" ), // album name
$locale->tr( "register_default_album_description" ), // album description
- GALLERY_RESOURCE_PREVIEW_AVAILABLE, // flags
+ GalleryConstants::GALLERY_RESOURCE_PREVIEW_AVAILABLE, // flags
0, // no parent id
$t->getTimestamp(), // current date
Array(), // no properties
Modified: plog/branches/lifetype-2.0-autoload/class/action/admin/admineditcommentsaction.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/action/admin/admineditcommentsaction.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/action/admin/admineditcommentsaction.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,11 +1,5 @@
<?php
-
-
-
-
-
-
/**
* \ingroup Action
* @private
@@ -40,7 +34,7 @@
$results = Array();
$results["articleId"] = $this->_request->getValue( "articleId", null );
$results["showStatus"] = $this->_request->getValue( "showStatus" );
- $results["showType"] = $this->_request->getValue( "showType", COMMENT_TYPE_ANY );
+ $results["showType"] = $this->_request->getValue( "showType", CommentsCommon::COMMENT_TYPE_ANY );
$results["searchTerms"] = $this->_request->getFilteredvalue( "searchTerms", new HtmlSpecialCharsFilter());
return( $results );
Modified: plog/branches/lifetype-2.0-autoload/class/action/admin/adminmainaction.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/action/admin/adminmainaction.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/action/admin/adminmainaction.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,8 +1,6 @@
<?php
-
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/blogstatus.class.php" );
/**
* \ingroup Action
Modified: plog/branches/lifetype-2.0-autoload/class/action/admin/adminmarkcommentaction.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/action/admin/adminmarkcommentaction.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/action/admin/adminmarkcommentaction.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,13 +1,7 @@
<?php
+ lt_include( PLOG_CLASS_PATH."class/dao/articlecommentstatus.class.php" );
-
-
-
-
-
-
-
/**
* \ingroup Action
* @private
Modified: plog/branches/lifetype-2.0-autoload/class/action/admin/adminpreviewpostaction.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/action/admin/adminpreviewpostaction.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/action/admin/adminpreviewpostaction.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,8 +1,6 @@
<?php
-
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
/**
* \ingroup Action
Modified: plog/branches/lifetype-2.0-autoload/class/action/admin/adminsavedraftarticleajaxaction.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/action/admin/adminsavedraftarticleajaxaction.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/action/admin/adminsavedraftarticleajaxaction.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,9 +1,6 @@
<?php
-
-
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
/**
* \ingroup Action
Modified: plog/branches/lifetype-2.0-autoload/class/action/admin/adminupdatecommentaction.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/action/admin/adminupdatecommentaction.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/action/admin/adminupdatecommentaction.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,18 +1,6 @@
<?php
-
-
-
-
-
-
-
-
-
-
-
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/articlecommentstatus.class.php" );
class AdminUpdateCommentAction extends AdminAction
{
Modified: plog/branches/lifetype-2.0-autoload/class/action/admin/adminupdatepostaction.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/action/admin/adminupdatepostaction.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/action/admin/adminupdatepostaction.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,19 +1,7 @@
<?php
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
-
-
-
-
-
-
-
-
-
-
-
-
-
/**
* \ingroup Action
* @private
Modified: plog/branches/lifetype-2.0-autoload/class/action/blogaction.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/action/blogaction.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/action/blogaction.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,8 +1,6 @@
<?php
-
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/blogstatus.class.php" );
/**
* \ingroup Action
Modified: plog/branches/lifetype-2.0-autoload/class/action/resourceserveraction.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/action/resourceserveraction.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/action/resourceserveraction.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -5,15 +5,7 @@
define( 'RESOURCE_VIEW_MODE_PREVIEW', 'preview' );
define( 'RESOURCE_VIEW_MODE_MEDIUM', 'medium' );
-
-
-
-
-
-
-
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/blogstatus.class.php" );
/**
* \ingroup Action
Modified: plog/branches/lifetype-2.0-autoload/class/action/rssaction.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/action/rssaction.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/action/rssaction.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,11 +1,7 @@
<?php
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
-
-
-
-
-
/**
* \ingroup Action
* @private
Modified: plog/branches/lifetype-2.0-autoload/class/action/searchaction.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/action/searchaction.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/action/searchaction.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -3,15 +3,9 @@
/**
* @package action
*/
-
-
-
-
-
-
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
+
define( "VIEW_SEARCH_TEMPLATE", "searchresults" );
class SearchAction extends BlogAction
Modified: plog/branches/lifetype-2.0-autoload/class/action/viewalbumaction.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/action/viewalbumaction.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/action/viewalbumaction.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -115,7 +115,7 @@
// load the resources and build the pager
$resources = $galleryResources->getUserResources( $this->_blogInfo->getId(),
$album->getId(),
- GALLERY_RESOURCE_ANY,
+ GalleryConstants::GALLERY_RESOURCE_ANY,
"",
-1,
$this->_page,
@@ -124,7 +124,7 @@
// total number of resources, used by the pager
$numResources = $galleryResources->getNumUserResources( $this->_blogInfo->getId(),
$album->getId(),
- GALLERY_RESOURCE_ANY );
+ GalleryConstants::GALLERY_RESOURCE_ANY );
// build the pager
$url = $this->_blogInfo->getBlogRequestGenerator();
$pager = new Pager( $url->albumLink( $album ).$url->getPageSuffix(),
Modified: plog/branches/lifetype-2.0-autoload/class/action/viewarticleaction.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/action/viewarticleaction.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/action/viewarticleaction.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -240,7 +240,7 @@
if( $commentsPerPage > $hardLimit ) $commentsPerPage = $hardLimit;
$comments = new ArticleComments();
- $order = $blogSettings->getValue( "comments_order", COMMENT_ORDER_NEWEST_FIRST );
+ $order = $blogSettings->getValue( "comments_order", CommentsCommon::COMMENT_ORDER_NEWEST_FIRST );
$postComments = $comments->getPostComments( $article->getId(),
$order,
COMMENT_STATUS_NONSPAM,
Modified: plog/branches/lifetype-2.0-autoload/class/action/viewarticletrackbacksaction.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/action/viewarticletrackbacksaction.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/action/viewarticletrackbacksaction.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,9 +1,7 @@
<?php
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
-
-
-
define( "VIEW_TRACKBACKS_TEMPLATE", "posttrackbacks" );
/**
Modified: plog/branches/lifetype-2.0-autoload/class/action/viewresourceaction.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/action/viewresourceaction.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/action/viewresourceaction.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,11 +1,5 @@
<?php
-
-
-
-
-
-
define( "VIEW_RESOURCE_TEMPLATE", "resource" );
/**
@@ -136,4 +130,4 @@
return true;
}
}
-?>
+?>
\ No newline at end of file
Modified: plog/branches/lifetype-2.0-autoload/class/dao/article.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/dao/article.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/dao/article.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -3,14 +3,14 @@
lt_include( PLOG_CLASS_PATH.'class/dao/articlestatus.class.php' );
lt_include( PLOG_CLASS_PATH.'class/dao/articlecommentstatus.class.php' );
- define( 'POST_EXTENDED_TEXT_MODIFIER', '[@more@]' );
-
/**
* \ingroup DAO
* This class represents an article from the database, and provides methods to access all its objects.
*/
class Article extends LocationAwareDbObject
{
+
+ const POST_EXTENDED_TEXT_MODIFIER = '[@more@]';
/**
* Private members. Use the getXXX classes to access them
Modified: plog/branches/lifetype-2.0-autoload/class/dao/articlecategories.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/dao/articlecategories.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/dao/articlecategories.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,10 +1,7 @@
<?php
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
-
-
-
-
/*
* different modes in which the listing of categories can be obtained
*/
@@ -48,7 +45,7 @@
{
$category = $this->get( "id",
$categoryId,
- DaoCacheConstants::CACHE_ARTICLE_CATEGORIES );
+ DaoCacheConstants::CACHE_ARTICLE_CATEGORIES );
if( !$category )
return false;
if( $blogId > -1 && $category->getBlogId() != $blogId )
@@ -68,8 +65,8 @@
{
$categories = $this->getMany( "mangled_name",
$categoryName,
- DaoCacheConstants::CACHE_ARTICLE_CATEGORIES_BYNAME,
- Array( DaoCacheConstants::CACHE_ARTICLE_CATEGORIES => "getId" ));
+ DaoCacheConstants::CACHE_ARTICLE_CATEGORIES_BYNAME,
+ Array( DaoCacheConstants::CACHE_ARTICLE_CATEGORIES => "getId" ));
// no categories
if( !$categories )
@@ -164,8 +161,8 @@
$categories = $this->getMany( "blog_id",
$blogId,
- DaoCacheConstants::CACHE_ARTICLE_CATEGORIES_BLOG,
- Array( DaoCacheConstants::CACHE_ARTICLE_CATEGORIES => "getId" ),
+ DaoCacheConstants::CACHE_ARTICLE_CATEGORIES_BLOG,
+ Array( DaoCacheConstants::CACHE_ARTICLE_CATEGORIES => "getId" ),
$sorting,
$searchTerms );
@@ -228,9 +225,9 @@
*/
function addArticleCategory( &$articleCategory )
{
- if(( $result = $this->add( $articleCategory, Array( DaoCacheConstants::CACHE_ARTICLE_CATEGORIES => "getId" )))) {
- $this->_cache->removeData( $articleCategory->getBlogId(), DaoCacheConstants::CACHE_ARTICLE_CATEGORIES_BLOG );
- $this->_cache->removeData( $articleCategory->getMangledName(), DaoCacheConstants::CACHE_ARTICLE_CATEGORIES_BYNAME );
+ if(( $result = $this->add( $articleCategory, Array( DaoCacheConstants::CACHE_ARTICLE_CATEGORIES => "getId" )))) {
+ $this->_cache->removeData( $articleCategory->getBlogId(), DaoCacheConstants::CACHE_ARTICLE_CATEGORIES_BLOG );
+ $this->_cache->removeData( $articleCategory->getMangledName(), DaoCacheConstants::CACHE_ARTICLE_CATEGORIES_BYNAME );
}
return( $result );
@@ -252,12 +249,12 @@
{
if ( $this->delete( "id", $categoryId ) )
{
- $this->_cache->removeData( $categoryId, DaoCacheConstants::CACHE_ARTICLE_CATEGORIES );
- $this->_cache->removeData( $blogId, DaoCacheConstants::CACHE_ARTICLE_CATEGORIES_BLOG );
- $this->_cache->removeData( $category->getMangledName(), DaoCacheConstants::CACHE_ARTICLE_CATEGORIES_BYNAME );
+ $this->_cache->removeData( $categoryId, DaoCacheConstants::CACHE_ARTICLE_CATEGORIES );
+ $this->_cache->removeData( $blogId, DaoCacheConstants::CACHE_ARTICLE_CATEGORIES_BLOG );
+ $this->_cache->removeData( $category->getMangledName(), DaoCacheConstants::CACHE_ARTICLE_CATEGORIES_BYNAME );
foreach( $category->getArticles() as $article)
{
- $this->_cache->removeData( $article->getId(), DaoCacheConstants::CACHE_ARTICLE_CATEGORIES_LINK );
+ $this->_cache->removeData( $article->getId(), DaoCacheConstants::CACHE_ARTICLE_CATEGORIES_LINK );
}
}
return( true );
@@ -274,7 +271,7 @@
function deleteBlogCategories( $blogId )
{
if(($result = $this->delete( "blog_id", $blogId ))) {
- $this->_cache->removeData( "all", DaoCacheConstants::CACHE_ARTICLE_CATEGORIES_BLOG );
+ $this->_cache->removeData( "all", DaoCacheConstants::CACHE_ARTICLE_CATEGORIES_BLOG );
/**
* :TODO:
* remove each single cached category!
@@ -307,7 +304,7 @@
));
if( $result = $this->update( $category )) {
$this->_cache->removeData( $category->getBlogId(), DaoCacheConstants::CACHE_ARTICLE_CATEGORIES_BLOG );
- $this->_cache->setData( $category->getId(), DaoCacheConstants::CACHE_ARTICLE_CATEGORIES, $category );
+ $this->_cache->setData( $category->getId(), DaoCacheConstants::CACHE_ARTICLE_CATEGORIES, $category );
}
return( $result );
@@ -324,7 +321,7 @@
*/
function getArticleCategories( $articleId, $blogId = -1 )
{
- $categoryLinks = $this->_cache->getData( $articleId, DaoCacheConstants::CACHE_ARTICLE_CATEGORIES_LINK );
+ $categoryLinks = $this->_cache->getData( $articleId, DaoCacheConstants::CACHE_ARTICLE_CATEGORIES_LINK );
if( !$categoryLinks ) {
$query = "SELECT category_id FROM ".$this->getPrefix()."article_categories_link
@@ -335,7 +332,7 @@
$categoryLinks[] = $row["category_id"];
}
$result->Close();
- $this->_cache->setData( $articleId, DaoCacheConstants::CACHE_ARTICLE_CATEGORIES_LINK, $categoryLinks );
+ $this->_cache->setData( $articleId, DaoCacheConstants::CACHE_ARTICLE_CATEGORIES_LINK, $categoryLinks );
}
else
return( Array());
Modified: plog/branches/lifetype-2.0-autoload/class/dao/articlecategory.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/dao/articlecategory.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/dao/articlecategory.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,7 +1,7 @@
<?php
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
-
/**
* \ingroup DAO
Modified: plog/branches/lifetype-2.0-autoload/class/dao/articlecomments.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/dao/articlecomments.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/dao/articlecomments.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,7 +1,7 @@
<?php
+ lt_include( PLOG_CLASS_PATH."class/dao/articlecommentstatus.class.php" );
-
/**
* \ingroup DAO
@@ -27,9 +27,9 @@
* @param itemsPerPage
* @return False if error or an array of ArticleComments objects
*/
- function getPostComments( $artid, $order = COMMENT_ORDER_NEWEST_FIRST, $status = COMMENT_STATUS_ALL, $page = -1, $itemsPerPage = DEFAULT_ITEMS_PER_PAGE )
+ function getPostComments( $artid, $order = CommentsCommon::COMMENT_ORDER_NEWEST_FIRST, $status = COMMENT_STATUS_ALL, $page = -1, $itemsPerPage = DEFAULT_ITEMS_PER_PAGE )
{
- return( CommentsCommon::getPostComments( $artid, $order, $status, COMMENT_TYPE_COMMENT, $page, $itemsPerPage ));
+ return( CommentsCommon::getPostComments( $artid, $order, $status, CommentsCommon::COMMENT_TYPE_COMMENT, $page, $itemsPerPage ));
}
/**
@@ -41,7 +41,7 @@
*/
function getNumPostComments( $artId, $status = COMMENT_STATUS_ALL )
{
- return( CommentsCommon::getNumPostComments( $artId, $status, COMMENT_TYPE_COMMENT ));
+ return( CommentsCommon::getNumPostComments( $artId, $status, CommentsCommon::COMMENT_TYPE_COMMENT ));
}
@@ -57,7 +57,7 @@
{
return( CommentsCommon::getIdenticalComment( $topic, $text, $articleId,
$parentId, $userName, $userEmail,
- $userUrl, $clientIp, COMMENT_TYPE_COMMENT ));
+ $userUrl, $clientIp, CommentsCommon::COMMENT_TYPE_COMMENT ));
}
/**
@@ -67,7 +67,7 @@
// maybe copy it from purgedata.class.php?
function purgeSpamComments()
{
- return( CommentsCommon::purgeSpamComments( COMMENT_TYPE_COMMENT ));
+ return( CommentsCommon::purgeSpamComments( CommentsCommon::COMMENT_TYPE_COMMENT ));
}
@@ -76,7 +76,7 @@
*/
function getComment( $id )
{
- return( CommentsCommon::getComment( $id, COMMENT_TYPE_COMMENT ));
+ return( CommentsCommon::getComment( $id, CommentsCommon::COMMENT_TYPE_COMMENT ));
}
/**
@@ -90,9 +90,9 @@
* @param itemsPerPage
* @return An array of ArticleComment objects
*/
- function getBlogComments( $blogId, $order = COMMENT_ORDER_NEWEST_FIRST, $status = COMMENT_STATUS_ALL, $searchTerms = "", $page = -1, $itemsPerPage = DEFAULT_ITEMS_PER_PAGE )
+ function getBlogComments( $blogId, $order = CommentsCommon::COMMENT_ORDER_NEWEST_FIRST, $status = COMMENT_STATUS_ALL, $searchTerms = "", $page = -1, $itemsPerPage = DEFAULT_ITEMS_PER_PAGE )
{
- return( CommentsCommon::getBlogComments( $blogId, $order, $status, COMMENT_TYPE_COMMENT, $searchTerms, $page, $itemsPerPage ));
+ return( CommentsCommon::getBlogComments( $blogId, $order, $status, CommentsCommon::COMMENT_TYPE_COMMENT, $searchTerms, $page, $itemsPerPage ));
}
/**
@@ -104,7 +104,7 @@
* @param searchTerms
* @return The number of comments
*/
- function getNumBlogComments( $blogId, $status = COMMENT_STATUS_ALL, $type = COMMENT_TYPE_ANY, $searchTerms = "" )
+ function getNumBlogComments( $blogId, $status = COMMENT_STATUS_ALL, $type = CommentsCommon::COMMENT_TYPE_ANY, $searchTerms = "" )
{
return( CommentsCommon::getNumBlogComments( $blogId, $status, $type, $searchTerms ));
}
Modified: plog/branches/lifetype-2.0-autoload/class/dao/articlecommentstatus.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/dao/articlecommentstatus.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/dao/articlecommentstatus.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,6 +1,6 @@
<?php
-
+ lt_include( PLOG_CLASS_PATH."class/dao/articlecommentstatus.class.php" );
define( "COMMENT_STATUS_ALL", -1, true );
define( "COMMENT_STATUS_NONSPAM", 0, true );
Modified: plog/branches/lifetype-2.0-autoload/class/dao/articles.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/dao/articles.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/dao/articles.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,10 +1,7 @@
<?php
-
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
-
/**
* Constants used as the $order parameter in method getBlogArticles
*/
Modified: plog/branches/lifetype-2.0-autoload/class/dao/blogcategories.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/dao/blogcategories.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/dao/blogcategories.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,8 +1,6 @@
<?php
-
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/blogstatus.class.php" );
/**
* \ingroup DAO
Modified: plog/branches/lifetype-2.0-autoload/class/dao/blogcategory.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/dao/blogcategory.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/dao/blogcategory.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,7 +1,7 @@
<?php
+ lt_include( PLOG_CLASS_PATH."class/dao/blogstatus.class.php" );
-
/**
* \ingroup DAO
Modified: plog/branches/lifetype-2.0-autoload/class/dao/bloginfo.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/dao/bloginfo.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/dao/bloginfo.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,7 +1,6 @@
<?php
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/blogstatus.class.php" );
/**
* \ingroup DAO
Modified: plog/branches/lifetype-2.0-autoload/class/dao/commentscommon.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/dao/commentscommon.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/dao/commentscommon.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,25 +1,8 @@
<?php
+ lt_include( PLOG_CLASS_PATH."class/dao/articlecommentstatus.class.php" );
-
-
-
-
-
- /**
- * different orders that comments can have
- */
- define( "COMMENT_ORDER_OLDEST_FIRST", 1 );
- define( "COMMENT_ORDER_NEWEST_FIRST", 2 );
-
/**
- * whether we'd like to fetch a comment, trackback or anything
- */
- define( "COMMENT_TYPE_COMMENT", 1 );
- define( "COMMENT_TYPE_TRACKBACK", 2 );
- define( "COMMENT_TYPE_ANY", -1 );
-
- /**
* \ingroup DAO
*
* Since comments and trackbacks are now in the same table, this class contains all the
@@ -35,6 +18,19 @@
*/
class CommentsCommon extends Model
{
+
+ /**
+ * whether we'd like to fetch a comment, trackback or anything
+ */
+ const COMMENT_TYPE_COMMENT = 1;
+ const COMMENT_TYPE_TRACKBACK = 2;
+ const COMMENT_TYPE_ANY = -1;
+
+ /**
+ * different orders that comments can have
+ */
+ const COMMENT_ORDER_OLDEST_FIRST = 1;
+ const COMMENT_ORDER_NEWEST_FIRST = 2;
var $_blogSettings;
var $blogSettings;
@@ -62,7 +58,7 @@
// update the article comments
$article = $comment->getArticle();
$blog = $article->getBlogInfo();
- if( $comment->getType() == COMMENT_TYPE_COMMENT ) {
+ if( $comment->getType() == CommentsCommon::COMMENT_TYPE_COMMENT ) {
$article->setNumComments( $this->getNumItems( $this->getPrefix().'articles_comments',
'article_id = '.$article->getId().
' AND status = '.COMMENT_STATUS_NONSPAM.
@@ -104,9 +100,9 @@
* @return False if error or an array of ArticleComments objects
*/
function getPostComments( $artid,
- $order = COMMENT_ORDER_NEWEST_FIRST,
+ $order = CommentsCommon::COMMENT_ORDER_NEWEST_FIRST,
$status = COMMENT_STATUS_ALL,
- $type = COMMENT_TYPE_ANY,
+ $type = CommentsCommon::COMMENT_TYPE_ANY,
$page = -1,
$itemsPerPage = DEFAULT_ITEMS_PER_PAGE )
{
@@ -116,10 +112,10 @@
if( $status != COMMENT_STATUS_ALL )
$query .= "AND status = '".LtDb::qstr( $status )."'";
- if( $type != COMMENT_TYPE_ANY )
+ if( $type != CommentsCommon::COMMENT_TYPE_ANY )
$query .= " AND type = '".LtDb::qstr( $type )."'";
- if( $order == COMMENT_ORDER_NEWEST_FIRST )
+ if( $order == CommentsCommon::COMMENT_ORDER_NEWEST_FIRST )
$query .= " ORDER BY date DESC";
else
$query .=" ORDER BY date ASC";
@@ -146,7 +142,7 @@
* @param status
* @return The number of comments
*/
- function getNumPostComments( $artId, $status = COMMENT_STATUS_ALL, $type = COMMENT_TYPE_ANY )
+ function getNumPostComments( $artId, $status = COMMENT_STATUS_ALL, $type = CommentsCommon::COMMENT_TYPE_ANY )
{
$numComments = 0;
@@ -156,7 +152,7 @@
if(!$article)
return 0;
- if( $type == COMMENT_TYPE_COMMENT ) {
+ if( $type == CommentsCommon::COMMENT_TYPE_COMMENT ) {
if( $status == COMMENT_STATUS_ALL ) {
$numComments = $article->getTotalComments();
}
@@ -170,7 +166,7 @@
$numComments = 0;
}
}
- else if($type == COMMENT_TYPE_TRACKBACK) {
+ else if($type == CommentsCommon::COMMENT_TYPE_TRACKBACK) {
if( $status == COMMENT_STATUS_ALL ) {
$numComments = $article->getTotalTrackBacks();
}
@@ -185,8 +181,8 @@
}
}
else{
- $numComments = $this->getNumPostComments($artId, $status, COMMENT_TYPE_COMMENT) +
- $this->getNumPostComments($artId, $status, COMMENT_TYPE_TRACKBACK);
+ $numComments = $this->getNumPostComments($artId, $status, CommentsCommon::COMMENT_TYPE_COMMENT) +
+ $this->getNumPostComments($artId, $status, CommentsCommon::COMMENT_TYPE_TRACKBACK);
}
return( $numComments );
@@ -201,9 +197,9 @@
* @param searchTerms
* @return The number of comments, or 0 if error or no comments
*/
- function getNumBlogComments( $blogId, $status = COMMENT_STATUS_ALL, $type = COMMENT_TYPE_ANY, $searchTerms = "" )
+ function getNumBlogComments( $blogId, $status = COMMENT_STATUS_ALL, $type = CommentsCommon::COMMENT_TYPE_ANY, $searchTerms = "" )
{
- if( $status == COMMENT_STATUS_ALL && $type != COMMENT_TYPE_ANY && $searchTerms == "" ) {
+ if( $status == COMMENT_STATUS_ALL && $type != CommentsCommon::COMMENT_TYPE_ANY && $searchTerms == "" ) {
// fast case, we can load the blog and query one of its intrinsic fields
$blogs = new Blogs();
@@ -211,7 +207,7 @@
if( !$blogInfo )
$numComments = 0;
else {
- if( $type == COMMENT_TYPE_COMMENT )
+ if( $type == CommentsCommon::COMMENT_TYPE_COMMENT )
$numComments = $blogInfo->getTotalComments();
else
$numComments = $blogInfo->getTotalTrackbacks();
@@ -225,7 +221,7 @@
$cond = "c.blog_id = '".LtDb::qstr($blogId)."'";
if( $status != COMMENT_STATUS_ALL )
$cond .= " AND c.status = '".LtDb::qstr($status)."'";
- if( $type != COMMENT_TYPE_ANY )
+ if( $type != CommentsCommon::COMMENT_TYPE_ANY )
$cond .= " AND c.type = '".LtDb::qstr($type)."'";
if( $searchTerms != "" )
$cond .= " AND ".$this->getSearchConditions( $searchTerms );
@@ -265,7 +261,7 @@
$article = $comment->getArticle();
$blog = $article->getBlogInfo();
$type = $comment->getType();
- if( $type == COMMENT_TYPE_COMMENT ) {
+ if( $type == CommentsCommon::COMMENT_TYPE_COMMENT ) {
$article->setNumComments( $this->getNumItems( $this->getPrefix().'articles_comments',
'article_id = '.$article->getId().' AND status = '.COMMENT_STATUS_NONSPAM.
' AND type = '.$comment->getType()));
@@ -324,14 +320,14 @@
$articles = new Articles();
// load the article
$article = $comment->getArticle();
- if( $comment->getType() == COMMENT_TYPE_COMMENT ) {
+ if( $comment->getType() == CommentsCommon::COMMENT_TYPE_COMMENT ) {
$article->setNumComments( $this->getNumItems( $this->getPrefix().'articles_comments',
'article_id = '.$article->getId().' AND status = '.COMMENT_STATUS_NONSPAM.
' AND type = '.$comment->getType()));
$article->setTotalComments( $this->getNumItems( $this->getPrefix().'articles_comments',
'article_id = '.$article->getId().' AND type = '.$comment->getType()));
}
- elseif( $comment->getType() == COMMENT_TYPE_TRACKBACK ) {
+ elseif( $comment->getType() == CommentsCommon::COMMENT_TYPE_TRACKBACK ) {
$article->setNumTrackbacks( $this->getNumItems( $this->getPrefix().'articles_comments',
'article_id = '.$article->getId().' AND status = '.COMMENT_STATUS_NONSPAM.
' AND type = '.$comment->getType()));
@@ -355,12 +351,12 @@
*
* @param type
*/
- function getComment( $id, $type = COMMENT_TYPE_ANY )
+ function getComment( $id, $type = CommentsCommon::COMMENT_TYPE_ANY )
{
$comment = $this->get( "id" , $id, DaoCacheConstants::CACHE_ARTICLE_COMMENTS );
if( !$comment )
return false;
- if( $type != COMMENT_TYPE_ANY ) {
+ if( $type != CommentsCommon::COMMENT_TYPE_ANY ) {
if( $comment->getType() != $type ) {
return false;
}
@@ -382,9 +378,9 @@
* @return An array of ArticleComment objects
*/
function getBlogComments( $blogId,
- $order = COMMENT_ORDER_NEWEST_FIRST,
+ $order = CommentsCommon::COMMENT_ORDER_NEWEST_FIRST,
$status = COMMENT_STATUS_ALL,
- $type = COMMENT_TYPE_ANY,
+ $type = CommentsCommon::COMMENT_TYPE_ANY,
$searchTerms = "",
$page = -1,
$itemsPerPage = DEFAULT_ITEMS_PER_PAGE )
@@ -399,14 +395,14 @@
WHERE c.blog_id = '".LtDb::qstr( $blogId )."'";
if( $status != COMMENT_STATUS_ALL )
$query .= " AND status = $status";
- if( $type != COMMENT_TYPE_ANY )
+ if( $type != CommentsCommon::COMMENT_TYPE_ANY )
$query .= " AND type = '".LtDb::qstr($type)."'";
if( $searchTerms != "" ) {
$query .= " AND ".$this->getSearchConditions( $searchTerms );
}
// check in which order we should display those comments
- if( $order == COMMENT_ORDER_NEWEST_FIRST )
+ if( $order == CommentsCommon::COMMENT_ORDER_NEWEST_FIRST )
$query .= " ORDER BY date DESC";
else
$query .= " ORDER BY date ASC";
@@ -547,11 +543,11 @@
// update the counter to reflect the number of comments
$blog->setTotalComments( $this->getNumItems( $this->getPrefix()."articles_comments",
"blog_id = '".LtDb::qstr($blog->getId())."'".
- " AND type = ".COMMENT_TYPE_COMMENT ));
+ " AND type = ".CommentsCommon::COMMENT_TYPE_COMMENT ));
// and the one to reflect the number of trackbacks
$blog->setTotalTrackbacks( $this->getNumItems( $this->getPrefix()."articles_comments",
"blog_id = '".LtDb::qstr($blog->getId())."'".
- " AND type = ".COMMENT_TYPE_TRACKBACK ));
+ " AND type = ".CommentsCommon::COMMENT_TYPE_TRACKBACK ));
$blogs = new Blogs();
$blogs->updateBlog( $blog );
Modified: plog/branches/lifetype-2.0-autoload/class/dao/globalarticlecategories.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/dao/globalarticlecategories.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/dao/globalarticlecategories.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,9 +1,7 @@
<?php
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
-
/**
* \ingroup DAO
*
Modified: plog/branches/lifetype-2.0-autoload/class/dao/globalarticlecategory.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/dao/globalarticlecategory.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/dao/globalarticlecategory.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,7 +1,6 @@
<?php
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
/**
* \ingroup DAO
Modified: plog/branches/lifetype-2.0-autoload/class/dao/misc/init.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/dao/misc/init.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/dao/misc/init.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,5 +1,7 @@
<?php
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
+
class Init
{
/**
@@ -13,12 +15,6 @@
*/
static function initBlog( $blog )
{
-
-
-
-
-
-
$config =& Config::getConfig();
// get the default global article category id
@@ -63,7 +59,7 @@
$album = new GalleryAlbum( $blog->getId(), // blog id
$locale->tr( "register_default_album_name" ), // album name
$locale->tr( "register_default_album_description" ), // album description
- GALLERY_RESOURCE_PREVIEW_AVAILABLE, // flags
+ GalleryConstants::GALLERY_RESOURCE_PREVIEW_AVAILABLE, // flags
0, // no parent id
$t->getTimestamp(), // current date
Array(), // no properties
Modified: plog/branches/lifetype-2.0-autoload/class/dao/purgedata.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/dao/purgedata.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/dao/purgedata.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,7 +1,10 @@
<?php
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/dao/blogstatus.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/dao/articlecommentstatus.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/dao/userstatus.class.php" );
-
define( "DEFAULT_PURGE_AMOUNT", 15 );
/**
Modified: plog/branches/lifetype-2.0-autoload/class/dao/searchengine.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/dao/searchengine.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/dao/searchengine.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,10 +1,9 @@
<?php
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/dao/blogstatus.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/dao/articlecommentstatus.class.php" );
-
-
-
-
define( "SEARCH_ARTICLE", 1 );
define( "SEARCH_BLOG", 2 );
define( "SEARCH_GALLERYRESOURCE", 3 );
@@ -315,8 +314,8 @@
$resources = new GalleryResources();
$result = $resources->getNumUserResources( -1, // owner id
- GALLERY_NO_ALBUM, // any album
- GALLERY_RESOURCE_ANY, // of any kind
+ GalleryConstants::GALLERY_NO_ALBUM, // any album
+ GalleryConstants::GALLERY_RESOURCE_ANY, // of any kind
$searchTerms // search terms
);
}
@@ -369,8 +368,8 @@
$galleryResources = new GalleryResources();
$galleryResourcesResult = $galleryResources->getUserResources( $ownerId,
- GALLERY_NO_ALBUM,
- GALLERY_RESOURCE_ANY,
+ GalleryConstants::GALLERY_NO_ALBUM,
+ GalleryConstants::GALLERY_RESOURCE_ANY,
$searchTerms,
-1,
$page,
Modified: plog/branches/lifetype-2.0-autoload/class/dao/trackback.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/dao/trackback.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/dao/trackback.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,8 +1,7 @@
<?php
+ lt_include( PLOG_CLASS_PATH."class/dao/articlecommentstatus.class.php" );
-
-
/**
* Represents a trackback item, even though in pLog 1.1 trackbacks are
* nothing else than remote comments and in fact they are even stored in the
@@ -43,7 +42,7 @@
$properties,
$id );
// and mark it as a trackback
- $this->setType( COMMENT_TYPE_TRACKBACK );
+ $this->setType( CommentsCommon::COMMENT_TYPE_TRACKBACK );
}
}
?>
Modified: plog/branches/lifetype-2.0-autoload/class/dao/trackbacks.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/dao/trackbacks.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/dao/trackbacks.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,7 +1,6 @@
<?php
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
define( 'NO_TRACKBACKS', 'no trackbacks available' );
@@ -52,9 +51,9 @@
function getArticleTrackBacks( $artId, $status = COMMENT_STATUS_ALL, $page = DEFAULT_PAGING_ENABLED, $itemsPerPage = DEFAULT_ITEMS_PER_PAGE )
{
$tbs = CommentsCommon::getPostComments( $artId, // article id
- COMMENT_ORDER_NEWEST_FIRST, // no choice of order for trackbacks
+ CommentsCommon::COMMENT_ORDER_NEWEST_FIRST, // no choice of order for trackbacks
$status, // spam or not
- COMMENT_TYPE_TRACKBACK, // we're loading trackbacks
+ CommentsCommon::COMMENT_TYPE_TRACKBACK, // we're loading trackbacks
$page,
$itemsPerPage );
return( $tbs );
@@ -70,9 +69,9 @@
function getBlogTrackbacks( $blogId, $status = COMMENT_STATUS_ALL, $searchTerms = "", $page = DEFAULT_PAGING_ENABLED, $itemsPerPage = DEFAULT_ITEMS_PER_PAGE )
{
return( CommentsCommon::getBlogComments( $blogId,
- COMMENT_ORDER_NEWEST_FIRST,
+ CommentsCommon::COMMENT_ORDER_NEWEST_FIRST,
$status,
- COMMENT_TYPE_TRACKBACK,
+ CommentsCommon::COMMENT_TYPE_TRACKBACK,
$searchTerms,
$page,
$itemsPerPage ));
@@ -87,7 +86,7 @@
*/
function getArticleTrackBacksByIds( $artIds )
{
- return( CommentsCommon::getArticleTrackBacksByIds( $artIds, COMMENT_TYPE_TRACKBACK ));
+ return( CommentsCommon::getArticleTrackBacksByIds( $artIds, CommentsCommon::COMMENT_TYPE_TRACKBACK ));
}
/**
@@ -95,7 +94,7 @@
*/
function getTrackBack( $id )
{
- return( CommentsCommon::getComment( $id, COMMENT_TYPE_TRACKBACK ));
+ return( CommentsCommon::getComment( $id, CommentsCommon::COMMENT_TYPE_TRACKBACK ));
}
/**
@@ -145,7 +144,7 @@
*/
function getNumTrackbacksArticle( $artId, $status = COMMENT_STATUS_ALL )
{
- return( CommentsCommon::getNumPostComments( $artId, $status, COMMENT_TYPE_TRACKBACK ));
+ return( CommentsCommon::getNumPostComments( $artId, $status, CommentsCommon::COMMENT_TYPE_TRACKBACK ));
}
/**
@@ -157,7 +156,7 @@
*/
function deleteTrackback( $trackbackId )
{
- return( CommentsCommon::deleteComment( $trackbackId, COMMENT_TYPE_TRACKBACK ));
+ return( CommentsCommon::deleteComment( $trackbackId, CommentsCommon::COMMENT_TYPE_TRACKBACK ));
}
/**
@@ -177,7 +176,7 @@
$trackback->getUserEmail(),
$trackback->getUserUrl(),
$trackback->getClientIp(),
- COMMENT_TYPE_TRACKBACK ));*/
+ CommentsCommon::COMMENT_TYPE_TRACKBACK ));*/
}
}
?>
\ No newline at end of file
Modified: plog/branches/lifetype-2.0-autoload/class/dao/usercomment.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/dao/usercomment.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/dao/usercomment.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,9 +1,6 @@
<?php
-
-
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/articlecommentstatus.class.php" );
/**
* This class represents a comment made by a casual user to an article. Please use the getter methods
@@ -71,7 +68,7 @@
$this->_article = null;
// by default, we've got a user comment instead of a trackback
- $this->_type = COMMENT_TYPE_COMMENT;
+ $this->_type = CommentsCommon::COMMENT_TYPE_COMMENT;
$this->_blogId = $blogId;
$this->_sendNotification = 0;
@@ -397,8 +394,8 @@
}
/**
- * @return Returns the type of this comment, either COMMENT_TYPE_COMMENT or
- * COMMENT_TYPE_TRACKBACK depending on whether the comment is a "normal" user comment
+ * @return Returns the type of this comment, either CommentsCommon::COMMENT_TYPE_COMMENT or
+ * CommentsCommon::COMMENT_TYPE_TRACKBACK depending on whether the comment is a "normal" user comment
* or a trackback
*/
function getType()
@@ -411,8 +408,8 @@
*
* @private
* @param type The new type:
- * - COMMENT_TYPE_COMMENT
- * - COMMENT_TYPE_TRACKBACK
+ * - CommentsCommon::COMMENT_TYPE_COMMENT
+ * - CommentsCommon::COMMENT_TYPE_TRACKBACK
*/
function setType( $type )
{
Modified: plog/branches/lifetype-2.0-autoload/class/dao/userdata/baseuserdataprovider.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/dao/userdata/baseuserdataprovider.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/dao/userdata/baseuserdataprovider.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,10 +1,8 @@
<?php
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/blogstatus.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/dao/userstatus.class.php" );
-
-
/**
* This is the base class that defines the methods that all user-data providers must implement.
* It also provides some common methods that will be shared by all user-data providers and that therefore
Modified: plog/branches/lifetype-2.0-autoload/class/dao/userdata/joomlauserdataprovider.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/dao/userdata/joomlauserdataprovider.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/dao/userdata/joomlauserdataprovider.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,8 +1,8 @@
<?php
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/dao/userstatus.class.php" );
-
-
define( "JOOMLA_USER_IS_BLOCKED", 1);
define( "JOOMLA_USER_IS_ACTIVE", 0);
define( "JOOMLA_SITE_ADMIN", "Super Administrator");
Modified: plog/branches/lifetype-2.0-autoload/class/dao/userdata/lifetypeuserdataprovider.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/dao/userdata/lifetypeuserdataprovider.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/dao/userdata/lifetypeuserdataprovider.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,5 +1,7 @@
<?php
+ lt_include( PLOG_CLASS_PATH."class/dao/userstatus.class.php" );
+
/**
* Model representing the users in our application. Provides the methods such as
* authentication and querying for users.
Modified: plog/branches/lifetype-2.0-autoload/class/dao/userdata/phpbb2userdataprovider.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/dao/userdata/phpbb2userdataprovider.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/dao/userdata/phpbb2userdataprovider.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,8 +1,8 @@
<?php
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/dao/userstatus.class.php" );
-
-
/**
* Model representing the users in our application. Provides the methods such as
* authentication and querying for users.
Modified: plog/branches/lifetype-2.0-autoload/class/dao/userdata/simplepostnukeuserdataprovider.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/dao/userdata/simplepostnukeuserdataprovider.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/dao/userdata/simplepostnukeuserdataprovider.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,10 +1,8 @@
<?php
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/dao/userstatus.class.php" );
-
-
-
-
/**
* Model representing the users in our application. Provides the methods such as
* authentication and querying for users.
Modified: plog/branches/lifetype-2.0-autoload/class/dao/userdata/vbb3userdataprovider.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/dao/userdata/vbb3userdataprovider.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/dao/userdata/vbb3userdataprovider.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -19,9 +19,9 @@
*/
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/dao/userstatus.class.php" );
-
-
/**
* Model representing the users in our application. Provides the methods such as
* authentication and querying for users.
Modified: plog/branches/lifetype-2.0-autoload/class/dao/userdata/wbbuserdataprovider.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/dao/userdata/wbbuserdataprovider.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/dao/userdata/wbbuserdataprovider.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,8 +1,8 @@
<?php
-
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/dao/userstatus.class.php" );
-
/**
* Model representing the users in our application. Provides the methods such as
* authentication and querying for users.
Modified: plog/branches/lifetype-2.0-autoload/class/dao/userinfo.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/dao/userinfo.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/dao/userinfo.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,9 +1,7 @@
<?php
+ lt_include( PLOG_CLASS_PATH."class/dao/userstatus.class.php" );
-
-
-
/**
* Represents a user in our application. Includes information such as the username,
* password, email, etc.
Modified: plog/branches/lifetype-2.0-autoload/class/dao/users.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/dao/users.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/dao/users.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,4 +1,7 @@
<?php
+
+ lt_include( PLOG_CLASS_PATH."class/dao/userstatus.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/dao/blogstatus.class.php" );
/**
* Model representing the users in our application. Provides the methods such as
Modified: plog/branches/lifetype-2.0-autoload/class/data/textfilter.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/data/textfilter.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/data/textfilter.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -278,11 +278,11 @@
*/
function normalizeText( $text )
{
- // because of the POST_EXTENDED_TEXT_MODIFIER constant
+ // because of the Article::POST_EXTENDED_TEXT_MODIFIER constant
// remove all html code
$result = TextFilter::filterAllHtml( $text );
// remove the "extended post modifier"
- $result = str_replace( POST_EXTENDED_TEXT_MODIFIER, "", $result );
+ $result = str_replace( Article::POST_EXTENDED_TEXT_MODIFIER, "", $result );
// put all the html entities back to what they should be
$result = TextFilter::htmlDecode( $result );
// and remove everything which is not letters or numbers
Modified: plog/branches/lifetype-2.0-autoload/class/gallery/dao/galleryalbum.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/gallery/dao/galleryalbum.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/gallery/dao/galleryalbum.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -39,7 +39,7 @@
* @param name A string representing a valid name for the album. Maximum 255 characters
* @param description A string representing a valid description for the album. Maximum 65k characters.
* @param flags An integer value resulting or binary OR'ing the following constants:
- * - GALLERY_RESOURCE_PREVIEW_AVAILABLE
+ * - GalleryConstants::GALLERY_RESOURCE_PREVIEW_AVAILABLE
* (no more as of plog 0.3)
* @param parentId A valid and existing album identifier. If none, then set this to '0'
* @param date A valid date in TIMESTAMP(14) format
Modified: plog/branches/lifetype-2.0-autoload/class/gallery/dao/galleryitemslist.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/gallery/dao/galleryitemslist.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/gallery/dao/galleryitemslist.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -15,7 +15,7 @@
}
- function getGalleryItems( $ownerId, $albumId = GALLERY_NO_ALBUM, $resourceType = GALLEY_RESOURCE_ANY, $page = DEFAULT_PAGING_ENABLED, $itemsPerPage = DEFAULT_ITEMS_PER_PAGE )
+ function getGalleryItems( $ownerId, $albumId = GalleryConstants::GALLERY_NO_ALBUM, $resourceType = GALLEY_RESOURCE_ANY, $page = DEFAULT_PAGING_ENABLED, $itemsPerPage = DEFAULT_ITEMS_PER_PAGE )
{
// initialize the objects that we're going to use to get our data
$albums = new GalleryAlbums();
@@ -23,7 +23,7 @@
}
- function getNumGalleryItems( $ownerId, $albumId = GALLERY_NO_ALBUM, $resourceType = GALLEY_RESOURCE_ANY, $page = DEFAULT_PAGING_ENABLED, $itemsPerPage = DEFAULT_ITEMS_PER_PAGE )
+ function getNumGalleryItems( $ownerId, $albumId = GalleryConstants::GALLERY_NO_ALBUM, $resourceType = GALLEY_RESOURCE_ANY, $page = DEFAULT_PAGING_ENABLED, $itemsPerPage = DEFAULT_ITEMS_PER_PAGE )
{
}
Modified: plog/branches/lifetype-2.0-autoload/class/gallery/dao/galleryresource.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/gallery/dao/galleryresource.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/gallery/dao/galleryresource.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,8 +1,5 @@
<?php
-
-
-
// Add this to avoid long file name error in windows server
define('GETID3_HELPERAPPSDIR', 'no_helper_apps_needed');
@@ -43,14 +40,14 @@
* @param ownerId Id of the user to whom this resource belongs
* @param albumId The id of the GalleryAlbum object to which this resource belongs
* @param description Description of this file
- * @param flags As of pLog 1.0, there is only one flag available: GALLERY_RESOURCE_PREVIEW_AVAILABLE.
+ * @param flags As of pLog 1.0, there is only one flag available: GalleryConstants::GALLERY_RESOURCE_PREVIEW_AVAILABLE.
* @param resourceType The type of the resource. One of the following constants:
- * - GALLERY_RESOURCE_IMAGE
- * - GALLERY_RESOURCE_VIDEO
- * - GALLERY_RESOURCE_SOUND
- * - GALLERY_RESOURCE_UNKNOWN
- * - GALLERY_RESOURCE_DOCUMENT
- * - GALLERY_RESOURCE_ZIP
+ * - GalleryConstants::GALLERY_RESOURCE_IMAGE
+ * - GalleryConstants::GALLERY_RESOURCE_VIDEO
+ * - GalleryConstants::GALLERY_RESOURCE_SOUND
+ * - GalleryConstants::GALLERY_RESOURCE_UNKNOWN
+ * - GalleryConstants::GALLERY_RESOURCE_DOCUMENT
+ * - GalleryConstants::GALLERY_RESOURCE_ZIP
* @param filePath path in disk to the real file. Not used.
* @param fileName name of the file, which is not exactly the same name that the file has in disk, since the
* GalleryResourceStorage class is taking care of managing things in disk. Nevertheless, this is the file that will
@@ -341,22 +338,17 @@
*/
function getMetadataReader()
{
-
-
-
-
-
switch( $this->getResourceType()) {
- case GALLERY_RESOURCE_IMAGE:
+ case GalleryConstants::GALLERY_RESOURCE_IMAGE:
$reader = new GalleryResourceImageMetadataReader( $this );
break;
- case GALLERY_RESOURCE_SOUND:
+ case GalleryConstants::GALLERY_RESOURCE_SOUND:
$reader = new GalleryResourceSoundMetadataReader( $this );
break;
- case GALLERY_RESOURCE_VIDEO:
+ case GalleryConstants::GALLERY_RESOURCE_VIDEO:
$reader = new GalleryResourceVideoMetadataReader( $this );
break;
- case GALLERY_RESOURCE_ZIP:
+ case GalleryConstants::GALLERY_RESOURCE_ZIP:
$reader = new GalleryResourceZipMetadataReader( $this );
break;
default:
@@ -374,7 +366,7 @@
*/
function hasPreview()
{
- return( $this->_flags & GALLERY_RESOURCE_PREVIEW_AVAILABLE );
+ return( $this->_flags & GalleryConstants::GALLERY_RESOURCE_PREVIEW_AVAILABLE );
}
/**
@@ -396,7 +388,7 @@
$fileName = $this->getFileName();
// change the file extension, if the thumbnail output format is different from the original file
- if( $this->getThumbnailFormat() == THUMBNAIL_OUTPUT_FORMAT_SAME_AS_IMAGE )
+ if( $this->getThumbnailFormat() == GalleryConstants::THUMBNAIL_OUTPUT_FORMAT_SAME_AS_IMAGE )
$previewFile = $fileName;
else {
$previewFile = str_replace( ".".strtolower($this->getFileExtension()), ".".strtolower($this->getThumbnailFormat()), $fileName );
@@ -442,7 +434,7 @@
$fileName = $this->getFileName();
// change the file extension, if the thumbnail output format is different from the original file
- if( $this->getThumbnailFormat() == THUMBNAIL_OUTPUT_FORMAT_SAME_AS_IMAGE )
+ if( $this->getThumbnailFormat() == GalleryConstants::THUMBNAIL_OUTPUT_FORMAT_SAME_AS_IMAGE )
$previewFile = $fileName;
else
$previewFile = str_replace( ".".strtolower($this->getFileExtension()), ".".strtolower($this->getThumbnailFormat()), $fileName );
@@ -482,7 +474,7 @@
*/
function isImage()
{
- return( $this->_resourceType == GALLERY_RESOURCE_IMAGE );
+ return( $this->_resourceType == GalleryConstants::GALLERY_RESOURCE_IMAGE );
}
/**
@@ -490,7 +482,7 @@
*/
function isSound()
{
- return( $this->_resourceType == GALLERY_RESOURCE_SOUND );
+ return( $this->_resourceType == GalleryConstants::GALLERY_RESOURCE_SOUND );
}
/**
@@ -498,7 +490,7 @@
*/
function isVideo()
{
- return( $this->_resourceType == GALLERY_RESOURCE_VIDEO );
+ return( $this->_resourceType == GalleryConstants::GALLERY_RESOURCE_VIDEO );
}
/**
@@ -506,7 +498,7 @@
*/
function isZip()
{
- return( $this->_resourceType == GALLERY_RESOURCE_ZIP );
+ return( $this->_resourceType == GalleryConstants::GALLERY_RESOURCE_ZIP );
}
/**
Modified: plog/branches/lifetype-2.0-autoload/class/gallery/dao/galleryresources.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/gallery/dao/galleryresources.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/gallery/dao/galleryresources.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -34,38 +34,38 @@
* maps extensions to resource types
*/
var $_extensionToType = Array(
- "jpg" => GALLERY_RESOURCE_IMAGE,
- "jpeg" => GALLERY_RESOURCE_IMAGE,
- "png" => GALLERY_RESOURCE_IMAGE,
- "gif" => GALLERY_RESOURCE_IMAGE,
- "bmp" => GALLERY_RESOURCE_IMAGE,
- "mp3" => GALLERY_RESOURCE_SOUND,
- "mp2" => GALLERY_RESOURCE_SOUND,
- "wav" => GALLERY_RESOURCE_SOUND,
- "au" => GALLERY_RESOURCE_SOUND,
- "aac" => GALLERY_RESOURCE_SOUND,
- "mp4" => GALLERY_RESOURCE_SOUND,
- "m4a" => GALLERY_RESOURCE_SOUND,
- "aac" => GALLERY_RESOURCE_SOUND,
- "m4p" => GALLERY_RESOURCE_SOUND,
- "wma" => GALLERY_RESOURCE_SOUND,
- "ogg" => GALLERY_RESOURCE_SOUND,
- "mod" => GALLERY_RESOURCE_SOUND,
- "mid" => GALLERY_RESOURCE_SOUND,
- "midi" => GALLERY_RESOURCE_SOUND,
- "avi" => GALLERY_RESOURCE_VIDEO,
- "mpg" => GALLERY_RESOURCE_VIDEO,
- "mpeg" => GALLERY_RESOURCE_VIDEO,
- "wmv" => GALLERY_RESOURCE_VIDEO,
- //"asf" => GALLERY_RESOURCE_VIDEO,
- "mov" => GALLERY_RESOURCE_VIDEO,
- "divx" => GALLERY_RESOURCE_VIDEO,
- "rm" => GALLERY_RESOURCE_VIDEO,
- "swf" => GALLERY_RESOURCE_VIDEO,
- "flv" => GALLERY_RESOURCE_VIDEO,
- "qt" => GALLERY_RESOURCE_VIDEO,
- "pdf" => GALLERY_RESOURCE_DOCUMENT,
- "zip" => GALLERY_RESOURCE_ZIP
+ "jpg" => GalleryConstants::GALLERY_RESOURCE_IMAGE,
+ "jpeg" => GalleryConstants::GALLERY_RESOURCE_IMAGE,
+ "png" => GalleryConstants::GALLERY_RESOURCE_IMAGE,
+ "gif" => GalleryConstants::GALLERY_RESOURCE_IMAGE,
+ "bmp" => GalleryConstants::GALLERY_RESOURCE_IMAGE,
+ "mp3" => GalleryConstants::GALLERY_RESOURCE_SOUND,
+ "mp2" => GalleryConstants::GALLERY_RESOURCE_SOUND,
+ "wav" => GalleryConstants::GALLERY_RESOURCE_SOUND,
+ "au" => GalleryConstants::GALLERY_RESOURCE_SOUND,
+ "aac" => GalleryConstants::GALLERY_RESOURCE_SOUND,
+ "mp4" => GalleryConstants::GALLERY_RESOURCE_SOUND,
+ "m4a" => GalleryConstants::GALLERY_RESOURCE_SOUND,
+ "aac" => GalleryConstants::GALLERY_RESOURCE_SOUND,
+ "m4p" => GalleryConstants::GALLERY_RESOURCE_SOUND,
+ "wma" => GalleryConstants::GALLERY_RESOURCE_SOUND,
+ "ogg" => GalleryConstants::GALLERY_RESOURCE_SOUND,
+ "mod" => GalleryConstants::GALLERY_RESOURCE_SOUND,
+ "mid" => GalleryConstants::GALLERY_RESOURCE_SOUND,
+ "midi" => GalleryConstants::GALLERY_RESOURCE_SOUND,
+ "avi" => GalleryConstants::GALLERY_RESOURCE_VIDEO,
+ "mpg" => GalleryConstants::GALLERY_RESOURCE_VIDEO,
+ "mpeg" => GalleryConstants::GALLERY_RESOURCE_VIDEO,
+ "wmv" => GalleryConstants::GALLERY_RESOURCE_VIDEO,
+ //"asf" => GalleryConstants::GALLERY_RESOURCE_VIDEO,
+ "mov" => GalleryConstants::GALLERY_RESOURCE_VIDEO,
+ "divx" => GalleryConstants::GALLERY_RESOURCE_VIDEO,
+ "rm" => GalleryConstants::GALLERY_RESOURCE_VIDEO,
+ "swf" => GalleryConstants::GALLERY_RESOURCE_VIDEO,
+ "flv" => GalleryConstants::GALLERY_RESOURCE_VIDEO,
+ "qt" => GalleryConstants::GALLERY_RESOURCE_VIDEO,
+ "pdf" => GalleryConstants::GALLERY_RESOURCE_DOCUMENT,
+ "zip" => GalleryConstants::GALLERY_RESOURCE_ZIP
);
function GalleryResources()
@@ -189,8 +189,8 @@
* if none could be found.
*/
function getUserResources( $ownerId,
- $albumId = GALLERY_NO_ALBUM,
- $resourceType = GALLERY_RESOURCE_ANY,
+ $albumId = GalleryConstants::GALLERY_NO_ALBUM,
+ $resourceType = GalleryConstants::GALLERY_RESOURCE_ANY,
$searchTerms = "",
$locationId = -1,
$page = DEFAULT_PAGING_ENABLED,
@@ -201,9 +201,9 @@
$query = "SELECT id FROM ".$this->getPrefix()."gallery_resources WHERE ";
if( $ownerId != -1 )
$query .= " owner_id = '".LtDb::qstr($ownerId)."' AND";
- if( $albumId != GALLERY_NO_ALBUM )
+ if( $albumId != GalleryConstants::GALLERY_NO_ALBUM )
$query .= " album_id = '".LtDb::qstr($albumId)."' AND";
- if( $resourceType != GALLERY_RESOURCE_ANY )
+ if( $resourceType != GalleryConstants::GALLERY_RESOURCE_ANY )
$query .= " resource_type = '".LtDb::qstr($resourceType)."' AND";
if( $searchTerms != "" )
$query .= " (".$this->getSearchConditions( $searchTerms ).") AND";
@@ -232,20 +232,20 @@
*/
function check( $resource,
$ownerId = -1,
- $albumId = GALLERY_NO_ALBUM,
- $resourceType = GALLERY_RESOURCE_ANY )
+ $albumId = GalleryConstants::GALLERY_NO_ALBUM,
+ $resourceType = GalleryConstants::GALLERY_RESOURCE_ANY )
{
if( $ownerId != -1 && $ownerId != '_all_' ) {
if( $resource->getOwnerId() != $ownerId ) {
return false;
}
}
- if( $albumId != GALLERY_NO_ALBUM ) {
+ if( $albumId != GalleryConstants::GALLERY_NO_ALBUM ) {
if( $resource->getAlbumId() != $albumId ) {
return false;
}
}
- if( $resourceType != GALLERY_RESOURCE_ANY ) {
+ if( $resourceType != GalleryConstants::GALLERY_RESOURCE_ANY ) {
if( $resource->getResourceType() != $resourceType )
return false;
}
@@ -258,14 +258,14 @@
*
* @param ownerId The id of the user whose amount of albums we'd like to check
* @param albumId Optional, the id of the album, in case we'd only like to know the number of resources in a certain album.
- * use the constant GALLERY_NO_ALBUM to disable this parameter
+ * use the constant GalleryConstants::GALLERY_NO_ALBUM to disable this parameter
* @param resourceType An additional filter parameter, so that we can only count a certain type of resources.
- * Defaults to the constant GALLERY_RESOURCE_ANY
+ * Defaults to the constant GalleryConstants::GALLERY_RESOURCE_ANY
* @param searchTerms
* @see getUserResources
* @return the total number of items
*/
- function getNumUserResources( $ownerId, $albumId = GALLERY_NO_ALBUM, $resourceType = GALLERY_RESOURCE_ANY, $searchTerms = "", $locationId = -1 )
+ function getNumUserResources( $ownerId, $albumId = GalleryConstants::GALLERY_NO_ALBUM, $resourceType = GalleryConstants::GALLERY_RESOURCE_ANY, $searchTerms = "", $locationId = -1 )
{
$prefix = $this->getPrefix();
$table = "{$prefix}gallery_resources";
@@ -276,9 +276,9 @@
else
$cond = "owner_id = owner_id ";
- if( $albumId > GALLERY_NO_ALBUM )
+ if( $albumId > GalleryConstants::GALLERY_NO_ALBUM )
$cond .= "AND album_id = '".LtDb::qstr($albumId)."'";
- if( $resourceType > GALLERY_RESOURCE_ANY )
+ if( $resourceType > GalleryConstants::GALLERY_RESOURCE_ANY )
$cond .= " AND resource_type = '".LtDb::qstr($resourceType)."'";
if( $searchTerms != "" ) {
$searchParams = $this->getSearchConditions( $searchTerms );
@@ -339,7 +339,7 @@
// check the return result
if( !$result )
- return GALLERY_ERROR_ADDING_RESOURCE;
+ return GalleryConstants::GALLERY_ERROR_ADDING_RESOURCE;
// get the id that was given to the record
$resourceId = $this->_db->Insert_ID();
@@ -381,15 +381,15 @@
//asf need special working
if ("asf" == $fileExt ){
if (!($metadata["audio"]["codec"]))
- $resourceType = GALLERY_RESOURCE_SOUND;
+ $resourceType = GalleryConstants::GALLERY_RESOURCE_SOUND;
else
- $resourceType = GALLERY_RESOURCE_VIDEO;
+ $resourceType = GalleryConstants::GALLERY_RESOURCE_VIDEO;
}
else {
if( array_key_exists( $fileExt, $this->_extensionToType ))
$resourceType = $this->_extensionToType[ $fileExt ];
else
- $resourceType = GALLERY_RESOURCE_UNKNOWN;
+ $resourceType = GalleryConstants::GALLERY_RESOURCE_UNKNOWN;
}
return( $resourceType );
@@ -409,11 +409,11 @@
* @see FileUpload
* @see GalleryResources::addResourceFromDisk()
* @return It will return one of the following constants:
- * - GALLERY_ERROR_RESOURCE_TOO_BIG
- * - GALLERY_ERROR_RESOURCE_FORBIDDEN_EXTENSION
- * - GALLERY_ERROR_QUOTA_EXCEEDED
- * - GALLERY_ERROR_ADDING_RESOURCE
- * - GALLERY_ERROR_UPLOADS_NOT_ENABLED
+ * - GalleryConstants::GALLERY_ERROR_RESOURCE_TOO_BIG
+ * - GalleryConstants::GALLERY_ERROR_RESOURCE_FORBIDDEN_EXTENSION
+ * - GalleryConstants::GALLERY_ERROR_QUOTA_EXCEEDED
+ * - GalleryConstants::GALLERY_ERROR_ADDING_RESOURCE
+ * - GalleryConstants::GALLERY_ERROR_UPLOADS_NOT_ENABLED
* or the identifier of the resource that was just added if the operation succeeded.
*/
function addResource( $ownerId, $albumId, $description, $upload )
@@ -422,7 +422,7 @@
// over the quota
if( GalleryResourceQuotas::isBlogOverResourceQuota( $ownerId, $upload->getSize())) {
- return GALLERY_ERROR_QUOTA_EXCEEDED;
+ return GalleryConstants::GALLERY_ERROR_QUOTA_EXCEEDED;
}
// first of all, validate the file using the
@@ -449,8 +449,8 @@
// set the flags
$flags = 0;
- if( $resourceType == GALLERY_RESOURCE_IMAGE )
- $flags = $flags|GALLERY_RESOURCE_PREVIEW_AVAILABLE;
+ if( $resourceType == GalleryConstants::GALLERY_RESOURCE_IMAGE )
+ $flags = $flags|GalleryConstants::GALLERY_RESOURCE_PREVIEW_AVAILABLE;
$info = $this->_filterMetadata( $metadata, $resourceType );
@@ -490,7 +490,7 @@
$albums->updateAlbum( $album );
// and finally, we can generate the thumbnail only if the file is an image, of course :)
- if( $resourceType == GALLERY_RESOURCE_IMAGE ) {
+ if( $resourceType == GalleryConstants::GALLERY_RESOURCE_IMAGE ) {
@@ -499,14 +499,14 @@
$imgWidth = $info["video"]["resolution_x"];
$imgHeight = $info["video"]["resolution_y"];
- $previewHeight = $config->getValue( "thumbnail_height", GALLERY_DEFAULT_THUMBNAIL_HEIGHT );
- $previewWidth = $config->getValue( "thumbnail_width", GALLERY_DEFAULT_THUMBNAIL_WIDTH );
+ $previewHeight = $config->getValue( "thumbnail_height", GalleryConstants::GALLERY_DEFAULT_THUMBNAIL_HEIGHT );
+ $previewWidth = $config->getValue( "thumbnail_width", GalleryConstants::GALLERY_DEFAULT_THUMBNAIL_WIDTH );
$thumbHeight = ( $imgHeight > $previewHeight ? $previewHeight : $imgHeight );
$thumbWidth = ( $imgWidth > $previewWidth ? $previewWidth : $imgWidth );
GalleryThumbnailGenerator::generateResourceThumbnail( $resFile, $resourceId, $ownerId, $thumbHeight, $thumbWidth );
- $medPreviewHeight = $config->getValue( "medium_size_thumbnail_height", GALLERY_DEFAULT_MEDIUM_SIZE_THUMBNAIL_HEIGHT );
- $medPreviewWidth = $config->getValue( "medium_size_thumbnail_width", GALLERY_DEFAULT_MEDIUM_SIZE_THUMBNAIL_WIDTH );
+ $medPreviewHeight = $config->getValue( "medium_size_thumbnail_height", GalleryConstants::GALLERY_DEFAULT_MEDIUM_SIZE_THUMBNAIL_HEIGHT );
+ $medPreviewWidth = $config->getValue( "medium_size_thumbnail_width", GalleryConstants::GALLERY_DEFAULT_MEDIUM_SIZE_THUMBNAIL_WIDTH );
$thumbHeight = ( $imgHeight > $medPreviewHeight ? $medPreviewHeight : $imgHeight );
$thumbWidth = ( $imgWidth > $medPreviewWidth ? $medPreviewWidth : $imgWidth );
GalleryThumbnailGenerator::generateResourceMediumSizeThumbnail( $resFile, $resourceId, $ownerId, $thumbHeight, $thumbWidth );
@@ -578,7 +578,7 @@
else
$info["comments"] = 0;
- if($resourceType == GALLERY_RESOURCE_IMAGE){
+ if($resourceType == GalleryConstants::GALLERY_RESOURCE_IMAGE){
if( isset( $metadata["video"] )) $info["video"] = $metadata["video"];
if( isset( $metadata["jpg"] )) {
$info["jpg"]["exif"]["FILE"] = $metadata["jpg"]["exif"]["FILE"];
@@ -588,18 +588,18 @@
$info["jpg"]["exif"]["EXIF"] = $metadata["jpg"]["exif"]["EXIF"];
}
}
- else if($resourceType == GALLERY_RESOURCE_SOUND){
+ else if($resourceType == GalleryConstants::GALLERY_RESOURCE_SOUND){
$info["audio"] = $metadata["audio"];
$info["playtime_string"] = $metadata["playtime_string"];
$info["playtime_seconds"] = $metadata["playtime_seconds"];
}
- else if($resourceType == GALLERY_RESOURCE_VIDEO){
+ else if($resourceType == GalleryConstants::GALLERY_RESOURCE_VIDEO){
$info["video"] = $metadata["video"];
$info["audio"] = $metadata["audio"];
$info["playtime_seconds"] = $metadata["playtime_seconds"];
$info["playtime_string"] = $metadata["playtime_string"];
}
- else if( $resourceType == GALLERY_RESOURCE_ZIP ) {
+ else if( $resourceType == GalleryConstants::GALLERY_RESOURCE_ZIP ) {
$info["zip"]["compressed_size"] = $metadata["zip"]["compressed_size"];
$info["zip"]["uncompressed_size"] = $metadata["zip"]["uncompressed_size"];
$info["zip"]["entries_count"] = $metadata["zip"]["entries_count"];
@@ -622,11 +622,11 @@
* @param fullFilePath The real path where the file is stored. This is expected to be
* its final and permanent destination
* @return It will return one of the following constants:
- * - GALLERY_ERROR_RESOURCE_TOO_BIG
- * - GALLERY_ERROR_RESOURCE_FORBIDDEN_EXTENSION
- * - GALLERY_ERROR_QUOTA_EXCEEDED
- * - GALLERY_ERROR_ADDING_RESOURCE
- * - GALLERY_ERROR_UPLOADS_NOT_ENABLED
+ * - GalleryConstants::GALLERY_ERROR_RESOURCE_TOO_BIG
+ * - GalleryConstants::GALLERY_ERROR_RESOURCE_FORBIDDEN_EXTENSION
+ * - GalleryConstants::GALLERY_ERROR_QUOTA_EXCEEDED
+ * - GalleryConstants::GALLERY_ERROR_ADDING_RESOURCE
+ * - GalleryConstants::GALLERY_ERROR_UPLOADS_NOT_ENABLED
* or the identifier of the resource that was just added if the operation succeeded.
*/
function addResourceFromDisk( $ownerId, $albumId, $description, $fullFilePath )
@@ -635,7 +635,7 @@
// over the quota
if( GalleryResourceQuotas::isBlogOverResourceQuota( $ownerId, File::getSize( $fullFilePath ))) {
- return GALLERY_ERROR_QUOTA_EXCEEDED;
+ return GalleryConstants::GALLERY_ERROR_QUOTA_EXCEEDED;
}
// get the metadata
@@ -650,8 +650,8 @@
// set the flags
$flags = 0;
- if( $resourceType == GALLERY_RESOURCE_IMAGE )
- $flags = $flags|GALLERY_RESOURCE_PREVIEW_AVAILABLE;
+ if( $resourceType == GalleryConstants::GALLERY_RESOURCE_IMAGE )
+ $flags = $flags|GalleryConstants::GALLERY_RESOURCE_PREVIEW_AVAILABLE;
// add the record to the database
$fileName = basename( $fullFilePath );
@@ -695,7 +695,7 @@
}
// and finally, we can generate the thumbnail only if the file is an image, of course :)
- if( $resourceType == GALLERY_RESOURCE_IMAGE ) {
+ if( $resourceType == GalleryConstants::GALLERY_RESOURCE_IMAGE ) {
GalleryThumbnailGenerator::generateResourceThumbnail( $resFile, $resourceId, $ownerId );
GalleryThumbnailGenerator::generateResourceMediumSizeThumbnail( $resFile, $resourceId, $ownerId );
@@ -822,8 +822,8 @@
function deleteUserResources( $ownerId )
{
$userResources = $this->getUserResources( $ownerId,
- GALLERY_NO_ALBUM,
- GALLERY_RESOURCE_ANY,
+ GalleryConstants::GALLERY_NO_ALBUM,
+ GalleryConstants::GALLERY_RESOURCE_ANY,
"",
-1);
@@ -901,4 +901,4 @@
return $res;
}
}
-?>
+?>
\ No newline at end of file
Modified: plog/branches/lifetype-2.0-autoload/class/gallery/dao/galleryresourcestorage.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/gallery/dao/galleryresourcestorage.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/gallery/dao/galleryresourcestorage.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,12 +1,5 @@
<?php
-
-
-
-
-
-
-
define( "RESOURCE_STORAGE_STORE_COPY", 1 );
define( "RESOURCE_STORAGE_STORE_MOVE", 2 );
@@ -38,7 +31,7 @@
// just in case...
if( $resourcesStorageFolder == "" )
- $resourcesStorageFolder = DEFAULT_RESOURCES_STORAGE_FOLDER;
+ $resourcesStorageFolder = PLOG_CLASS_PATH.GalleryConstants::DEFAULT_RESOURCES_STORAGE_FOLDER;
// append a forward slash to the folder if we forgot about it...
if( $resourcesStorageFolder[strlen($resourcesStorageFolder)-1] != '/')
Copied: plog/branches/lifetype-2.0-autoload/class/gallery/galleryconstants.class.php (from rev 5967, plog/branches/lifetype-2.0-autoload/class/gallery/galleryconstants.php)
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/gallery/galleryconstants.class.php (rev 0)
+++ plog/branches/lifetype-2.0-autoload/class/gallery/galleryconstants.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -0,0 +1,67 @@
+<?php
+
+ class GalleryConstants
+ {
+ /**
+ * flags used to calculate what we can do with the image
+ */
+ const GALLERY_RESOURCE_PREVIEW_AVAILABLE = 1;
+
+ /**
+ * These are the different resource types that we can recognize.
+ * They are very broad groups, tho.
+ */
+ const GALLERY_RESOURCE_ANY = 0;
+ const GALLERY_RESOURCE_IMAGE = 1;
+ const GALLERY_RESOURCE_VIDEO = 2;
+ const GALLERY_RESOURCE_SOUND = 3;
+ const GALLERY_RESOURCE_UNKNOWN = 4;
+ const GALLERY_RESOURCE_DOCUMENT = 5;
+ const GALLERY_RESOURCE_ZIP = 6;
+
+ /**
+ * when we are not referring to any album
+ */
+ const GALLERY_NO_ALBUM = -1;
+
+ /**
+ * default folder where resources will be stored. Every blog
+ * will have its own folder under
+ * $RESOURCES_STORAGE_FOLDER/X, where X is the blog identifier.
+ */
+ const DEFAULT_RESOURCES_STORAGE_FOLDER = "./gallery/";
+
+ /**
+ * different error codes that the GalleryResources::addResource() method
+ * can return
+ */
+ const GALLERY_ERROR_RESOURCE_TOO_BIG = -1;
+ const GALLERY_ERROR_RESOURCE_FORBIDDEN_EXTENSION = -2;
+ const GALLERY_ERROR_QUOTA_EXCEEDED = -3;
+ const GALLERY_ERROR_ADDING_RESOURCE = -4;
+ const GALLERY_ERROR_RESOURCE_NOT_WHITELISTED_EXTENSION = -10;
+ const GALLERY_ERROR_UPLOADS_NOT_ENABLED = -200;
+ const GALLERY_NO_ERROR = true;
+
+ /**
+ * default thumbnail sizes
+ */
+ const GALLERY_DEFAULT_THUMBNAIL_WIDTH = 120;
+ const GALLERY_DEFAULT_THUMBNAIL_HEIGHT = 120;
+ const GALLERY_DEFAULT_MEDIUM_SIZE_THUMBNAIL_WIDTH = 640;
+ const GALLERY_DEFAULT_MEDIUM_SIZE_THUMBNAIL_HEIGHT = 480;
+
+ /**
+ * other basic constants for the resizer
+ */
+ const THUMBNAIL_OUTPUT_FORMAT_SAME_AS_IMAGE = "same";
+ const THUMBNAIL_OUTPUT_FORMAT_JPG = "jpg";
+ const THUMBNAIL_OUTPUT_FORMAT_PNG = "png";
+ const THUMBNAIL_OUTPUT_FORMAT_GIF = "gif";
+
+ /**
+ * default generator
+ */
+ const DEFAULT_GENERATOR_METHOD = "gd";
+ }
+?>
\ No newline at end of file
Deleted: plog/branches/lifetype-2.0-autoload/class/gallery/galleryconstants.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/gallery/galleryconstants.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/gallery/galleryconstants.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,64 +0,0 @@
-<?php
-
- /**
- * flags used to calculate what we can do with the image
- */
- define( "GALLERY_RESOURCE_PREVIEW_AVAILABLE", 1 );
-
- /**
- * These are the different resource types that we can recognize.
- * They are very broad groups, tho.
- */
- define( "GALLERY_RESOURCE_ANY", 0 );
- define( "GALLERY_RESOURCE_IMAGE", 1 );
- define( "GALLERY_RESOURCE_VIDEO", 2 );
- define( "GALLERY_RESOURCE_SOUND", 3 );
- define( "GALLERY_RESOURCE_UNKNOWN", 4 );
- define( "GALLERY_RESOURCE_DOCUMENT", 5 );
- define( "GALLERY_RESOURCE_ZIP", 6 );
-
- /**
- * when we are not referring to any album
- */
- define( "GALLERY_NO_ALBUM", -1 );
-
- /**
- * default folder where resources will be stored. Every blog
- * will have its own folder under
- * $RESOURCES_STORAGE_FOLDER/X, where X is the blog identifier.
- */
- define( "DEFAULT_RESOURCES_STORAGE_FOLDER", PLOG_CLASS_PATH."./gallery/" );
-
- /**
- * different error codes that the GalleryResources::addResource() method
- * can return
- */
- define( "GALLERY_ERROR_RESOURCE_TOO_BIG", -1 );
- define( "GALLERY_ERROR_RESOURCE_FORBIDDEN_EXTENSION", -2 );
- define( "GALLERY_ERROR_QUOTA_EXCEEDED", -3 );
- define( "GALLERY_ERROR_ADDING_RESOURCE", -4 );
- define( "GALLERY_ERROR_RESOURCE_NOT_WHITELISTED_EXTENSION", -10 );
- define( "GALLERY_ERROR_UPLOADS_NOT_ENABLED", -200 );
- define( "GALLERY_NO_ERROR", true );
-
- /**
- * default thumbnail sizes
- */
- define( "GALLERY_DEFAULT_THUMBNAIL_WIDTH", 120 );
- define( "GALLERY_DEFAULT_THUMBNAIL_HEIGHT", 120 );
- define( "GALLERY_DEFAULT_MEDIUM_SIZE_THUMBNAIL_WIDTH", 640 );
- define( "GALLERY_DEFAULT_MEDIUM_SIZE_THUMBNAIL_HEIGHT", 480 );
-
- /**
- * other basic constants for the resizer
- */
- define( "THUMBNAIL_OUTPUT_FORMAT_SAME_AS_IMAGE", "same" );
- define( "THUMBNAIL_OUTPUT_FORMAT_JPG", "jpg" );
- define( "THUMBNAIL_OUTPUT_FORMAT_PNG", "png" );
- define( "THUMBNAIL_OUTPUT_FORMAT_GIF", "gif" );
-
- /**
- * default generator
- */
- define( "DEFAULT_GENERATOR_METHOD", "gd" );
-?>
\ No newline at end of file
Modified: plog/branches/lifetype-2.0-autoload/class/gallery/resizers/gallerygdresizer.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/gallery/resizers/gallerygdresizer.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/gallery/resizers/gallerygdresizer.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -313,7 +313,7 @@
$this->ImageResize($this->img["des"], $this->img["src"], 0, 0, 0, 0, $this->img["lebar_thumb"], $this->img["tinggi_thumb"], $this->img["lebar"], $this->img["tinggi"], $resizeMode );
// format for thumbnails is the same as the image
- //if( $this->_outputMethod == THUMBNAIL_OUTPUT_FORMAT_SAME_AS_IMAGE || $this->_outputMethod == "" ) {
+ //if( $this->_outputMethod == GalleryConstants::THUMBNAIL_OUTPUT_FORMAT_SAME_AS_IMAGE || $this->_outputMethod == "" ) {
if ($fileExt=="jpg" || $fileExt=="jpeg") {
$result = @imageJPEG($this->img["des"],"$save",$this->img["quality"]);
}
Modified: plog/branches/lifetype-2.0-autoload/class/gallery/resizers/galleryresizer.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/gallery/resizers/galleryresizer.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/gallery/resizers/galleryresizer.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -19,11 +19,6 @@
* </pre>
*/
-
-
-
-
-
/**
* \ingroup Gallery_resizer
*
@@ -71,9 +66,7 @@
* @param generatorMethod Optional parameter specifying which
*/
function GalleryResizer( $image )
- {
-
-
+ {
// keep these things for later
$this->_image = $image;
@@ -85,21 +78,21 @@
// the backend generator
$this->_generatorMethod = $config->getValue( "thumbnail_method" );
if( $this->_generatorMethod == "" )
- $this->_generatorMethod = DEFAULT_GENERATOR_METHOD;
+ $this->_generatorMethod = GalleryConstants::DEFAULT_GENERATOR_METHOD;
// the preferred output format
$this->_defaultOutputFormat = $config->getValue( "thumbnail_format" );
if( $this->_defaultOutputFormat == "" )
- $this->_defaultOutputFormat = THUMBNAIL_OUTPUT_FORMAT_PNG;
+ $this->_defaultOutputFormat = GalleryConstants::THUMBNAIL_OUTPUT_FORMAT_PNG;
}
/**
* returns the format that will be used/has been used to generate a thumbnail.
*
* @return Returns one of:
- * - THUMBNAIL_OUTPUT_FORMAT_SAME_AS_IMAGE
- * - THUMBNAIL_OUTPUT_FORMAT_JPG
- * - THUMBNAIL_OUTPUT_FORMAT_PNG
- * - THUMBNAIL_OUTPUT_FORMAT_GIF
+ * - GalleryConstants::THUMBNAIL_OUTPUT_FORMAT_SAME_AS_IMAGE
+ * - GalleryConstants::THUMBNAIL_OUTPUT_FORMAT_JPG
+ * - GalleryConstants::THUMBNAIL_OUTPUT_FORMAT_PNG
+ * - GalleryConstants::THUMBNAIL_OUTPUT_FORMAT_GIF
*/
function getThumbnailFormat()
{
@@ -117,13 +110,13 @@
* might be somehow bigger than the value of the $height or $width parameter)
* @return the path to the thumbnail that was generated or empty if error
*/
- function generate( $outFile, $width = GALLERY_DEFAULT_THUMBNAIL_WIDTH, $height = GALLERY_DEFAULT_THUMBNAIL_HEIGHT, $keepAspectRatio = true )
+ function generate( $outFile, $width = GalleryConstants::GALLERY_DEFAULT_THUMBNAIL_WIDTH, $height = GalleryConstants::GALLERY_DEFAULT_THUMBNAIL_HEIGHT, $keepAspectRatio = true )
{
if( $width == "" || $width < 0 )
- $width = GALLERY_DEFAULT_THUMBNAIL_WIDTH;
+ $width = GalleryConstants::GALLERY_DEFAULT_THUMBNAIL_WIDTH;
if( $height == "" || $height < 0 )
- $height = GALLERY_DEFAULT_THUMBNAIL_HEIGHT;
+ $height = GalleryConstants::GALLERY_DEFAULT_THUMBNAIL_HEIGHT;
// we can get into this 'else' if the image was not stored *or* we do not
// wish to use the cached version
@@ -133,7 +126,7 @@
$generatorClassName = $this->_methods[$this->_generatorMethod];
$generatorClassObject = new $generatorClassName( $this->_image, $this->_defaultOutputFormat );
- if( $this->_defaultOutputFormat != THUMBNAIL_OUTPUT_FORMAT_SAME_AS_IMAGE ) {
+ if( $this->_defaultOutputFormat != GalleryConstants::THUMBNAIL_OUTPUT_FORMAT_SAME_AS_IMAGE ) {
$fileParts = explode( ".", $outFile );
array_pop( $fileParts );
$fileNoExt = implode( ".", $fileParts );
Modified: plog/branches/lifetype-2.0-autoload/class/gallery/resizers/gallerythumbnailgenerator.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/gallery/resizers/gallerythumbnailgenerator.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/gallery/resizers/gallerythumbnailgenerator.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -14,8 +14,8 @@
* @static
*/
function generateResourceThumbnail( $resFile, $resourceId, $ownerId,
- $previewHeight = GALLERY_DEFAULT_THUMBNAIL_HEIGHT,
- $previewWidth = GALLERY_DEFAULT_THUMBNAIL_WIDTH )
+ $previewHeight = GalleryConstants::GALLERY_DEFAULT_THUMBNAIL_HEIGHT,
+ $previewWidth = GalleryConstants::GALLERY_DEFAULT_THUMBNAIL_WIDTH )
{
// get some configuration settings regarding the size of the
// thumbnails, and also the default format for thumbnails
@@ -48,8 +48,8 @@
* @static
*/
function generateResourceMediumSizeThumbnail( $resFile, $resourceId, $ownerId,
- $previewHeight = GALLERY_DEFAULT_MEDIUM_SIZE_THUMBNAIL_HEIGHT,
- $previewWidth = GALLERY_DEFAULT_MEDIUM_SIZE_THUMBNAIL_WIDTH )
+ $previewHeight = GalleryConstants::GALLERY_DEFAULT_MEDIUM_SIZE_THUMBNAIL_HEIGHT,
+ $previewWidth = GalleryConstants::GALLERY_DEFAULT_MEDIUM_SIZE_THUMBNAIL_WIDTH )
{
// get some configuration settings regarding the size of the
// thumbnails, and also the default format for thumbnails
Modified: plog/branches/lifetype-2.0-autoload/class/net/baserequestgenerator.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/net/baserequestgenerator.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/net/baserequestgenerator.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -14,7 +14,7 @@
/**
* Default folder where resources are installed
*/
- define( "DEFAULT_GALLERY_RESOURCES_FOLDER", "./gallery/" );
+ define( "DEFAULT_GalleryConstants::GALLERY_RESOURCES_FOLDER", "./gallery/" );
/**
@@ -214,12 +214,11 @@
* Returns the base URL to resources
*/
function getResourcesBaseUrl()
- {
-
+ {
$config =& Config::getConfig();
// the default value for this setting is to use a relative path that starts with './' so we have to make sure that
// that bit is not included in the URL (it wouldn't have any harmful effect, but it'd look ugly)
- $galleryFolder = str_replace( "./", "/", $config->getValue( "resources_folder", DEFAULT_GALLERY_RESOURCES_FOLDER ));
+ $galleryFolder = str_replace( "./", "/", $config->getValue( "resources_folder", PLOG_CLASS_PATH.GalleryConstants::DEFAULT_RESOURCES_STORAGE_FOLDER ));
// make sure that the base URL ends with a forward slash
if( $galleryFolder[strlen($galleryFolder)-1] != "/" )
$galleryFolder .= "/";
Modified: plog/branches/lifetype-2.0-autoload/class/net/xmlrpc/xmlrpcserver.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/net/xmlrpc/xmlrpcserver.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/net/xmlrpc/xmlrpcserver.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,19 +1,8 @@
<?php
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/dao/blogstatus.class.php" );
+
if( !defined( "ADMIN_PERMISSION" ))
define( "ADMIN_PERMISSION", 1 );
if( !defined( "BLOG_PERMISSION" ))
@@ -231,7 +220,7 @@
if ( $mt_text_more != NULL && trim($mt_text_more != ""))
{
- $body = $content["description"] . POST_EXTENDED_TEXT_MODIFIER . $mt_text_more;
+ $body = $content["description"] . Article::POST_EXTENDED_TEXT_MODIFIER . $mt_text_more;
}
else
{
@@ -697,7 +686,7 @@
$mt_allow_comments = $content["mt_allow_comments"];
if ( $mt_text_more != NULL && trim($mt_text_more) != "") {
- $body = $content["description"] . POST_EXTENDED_TEXT_MODIFIER . $mt_text_more;
+ $body = $content["description"] . Article::POST_EXTENDED_TEXT_MODIFIER . $mt_text_more;
}
else {
$body = $content["description"];
Modified: plog/branches/lifetype-2.0-autoload/class/security/bayesianfilter.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/security/bayesianfilter.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/security/bayesianfilter.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,9 +1,7 @@
<?php
-
+ lt_include( PLOG_CLASS_PATH."class/dao/articleecommentstatus.class.php" );
-
-
define("HIGH_SPAM_PROBABILITY", 1000);
//
@@ -116,7 +114,7 @@
// mark it as a trackback instead of a user comment...
if( $isTrackback ) {
- $comment->setType( COMMENT_TYPE_TRACKBACK );
+ $comment->setType( CommentsCommon::COMMENT_TYPE_TRACKBACK );
}
// add the comment to the db
Modified: plog/branches/lifetype-2.0-autoload/class/summary/action/activeaccountaction.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/summary/action/activeaccountaction.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/summary/action/activeaccountaction.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,77 +1,74 @@
<?php
+ lt_include( PLOG_CLASS_PATH."class/dao/userstatus.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/dao/blogstatus.class.php" );
+ class ActiveAccountAction extends SummaryAction
+ {
+ var $username;
+ var $activeCode;
+ function ActiveAccountAction($actionInfo,$httpRequest)
+ {
+ $this->SummaryAction($actionInfo,$httpRequest);
+ $this->registerFieldValidator("username",new StringValidator());
+ $this->registerFieldValidator("activeCode",new StringValidator());
+ }
+ function perform(){
+ $this->username = $this->_request->getValue("username");
+ $this->activeCode = $this->_request->getValue("activeCode");
-class ActiveAccountAction extends SummaryAction
-{
-
- var $username;
- var $activeCode;
-
- function ActiveAccountAction($actionInfo,$httpRequest)
- {
- $this->SummaryAction($actionInfo,$httpRequest);
-
- $this->registerFieldValidator("username",new StringValidator());
- $this->registerFieldValidator("activeCode",new StringValidator());
- }
-
- function perform(){
- $this->username = $this->_request->getValue("username");
- $this->activeCode = $this->_request->getValue("activeCode");
-
- $users = new Users();
- $userInfo = $users->getUserInfoFromUsername($this->username);
+ $users = new Users();
+ $userInfo = $users->getUserInfoFromUsername($this->username);
- if(!$userInfo){
- $this->_view = new SummaryView( "summaryerror" );
- $this->_view->setErrorMessage( $this->_locale->tr("error_invalid_user"));
- return false;
- }
+ if(!$userInfo){
+ $this->_view = new SummaryView( "summaryerror" );
+ $this->_view->setErrorMessage( $this->_locale->tr("error_invalid_user"));
+ return false;
+ }
- $activeCode = $userInfo->getValue("activeCode");
- if($activeCode != $this->activeCode){
- $this->_view = new SummaryView( "summaryerror");
- $this->_view->setErrorMessage( $this->_locale->tr("error_invalid_activation_code"));
- return false;
- }
+ $activeCode = $userInfo->getValue("activeCode");
+ if($activeCode != $this->activeCode){
+ $this->_view = new SummaryView( "summaryerror");
+ $this->_view->setErrorMessage( $this->_locale->tr("error_invalid_activation_code"));
+ return false;
+ }
- // active user
- $userInfo->setStatus(USER_STATUS_ACTIVE);
- $users->updateUser($userInfo);
- // also active the blog that user owned
- // FIXME: how about other blogs that this user take part in?
- $userBlogs = $userInfo->getBlogs();
- foreach( $userBlogs as $blog ) {
- if( $blog->getOwnerId() == $userInfo->getId()) {
- break;
- }
- }
+ // active user
+ $userInfo->setStatus(USER_STATUS_ACTIVE);
+ $users->updateUser($userInfo);
+ // also active the blog that user owned
+ // FIXME: how about other blogs that this user take part in?
+ $userBlogs = $userInfo->getBlogs();
+ foreach( $userBlogs as $blog ) {
+ if( $blog->getOwnerId() == $userInfo->getId()) {
+ break;
+ }
+ }
- if( $blog->getStatus() != BLOG_STATUS_UNCONFIRMED ) {
- // we should only activate blogs whose status is 'unconfirmed'
- $this->_view = new SummaryView( "summaryerror");
- $this->_view->setErrorMessage( $this->_locale->tr("error_invalid_activation_code"));
- return false;
- }
+ if( $blog->getStatus() != BLOG_STATUS_UNCONFIRMED ) {
+ // we should only activate blogs whose status is 'unconfirmed'
+ $this->_view = new SummaryView( "summaryerror");
+ $this->_view->setErrorMessage( $this->_locale->tr("error_invalid_activation_code"));
+ return false;
+ }
- $blogs = new Blogs();
- $blog->setStatus(BLOG_STATUS_ACTIVE);
- $blogs->updateBlog($blog);
- $blogUrl = $blog->getBlogRequestGenerator();
+ $blogs = new Blogs();
+ $blog->setStatus(BLOG_STATUS_ACTIVE);
+ $blogs->updateBlog($blog);
+ $blogUrl = $blog->getBlogRequestGenerator();
- // create the message that we're going to show
- $message = "<p>".$this->_locale->tr("blog_activated_ok")."</p><p>".
- $this->_locale->pr("register_blog_link", $blog->getBlog(), $blogUrl->blogLink())."</p><p>".
- $this->_locale->tr("register_blog_admin_link")."</p>";
+ // create the message that we're going to show
+ $message = "<p>".$this->_locale->tr("blog_activated_ok")."</p><p>".
+ $this->_locale->pr("register_blog_link", $blog->getBlog(), $blogUrl->blogLink())."</p><p>".
+ $this->_locale->tr("register_blog_admin_link")."</p>";
- $this->_view = new SummaryMessageView($message);
- $this->setCommonData();
- return true;
- }
-}
+ $this->_view = new SummaryMessageView($message);
+ $this->setCommonData();
+ return true;
+ }
+ }
?>
Modified: plog/branches/lifetype-2.0-autoload/class/summary/action/blogprofileaction.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/summary/action/blogprofileaction.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/summary/action/blogprofileaction.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,8 +1,8 @@
<?php
-
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/dao/userstatus.class.php" );
+
/**
* by default, how many posts show as recent from this blog
*/
Modified: plog/branches/lifetype-2.0-autoload/class/summary/action/dofinishregister.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/summary/action/dofinishregister.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/summary/action/dofinishregister.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,23 +1,9 @@
<?php
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/dao/userstatus.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/dao/blogstatus.class.php" );
+
/**
* Finish the user and blog registration process.
*
@@ -231,7 +217,7 @@
$album = new GalleryAlbum( $this->_blogInfo->getId(), // blog id
$locale->tr( "register_default_album_name" ), // album name
$locale->tr( "register_default_album_description" ), // album description
- GALLERY_RESOURCE_PREVIEW_AVAILABLE, // flags
+ GalleryConstants::GALLERY_RESOURCE_PREVIEW_AVAILABLE, // flags
0, // no parent id
$t->getTimestamp(), // current date
Array(), // no properties
Modified: plog/branches/lifetype-2.0-autoload/class/summary/action/summaryrssaction.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/summary/action/summaryrssaction.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/summary/action/summaryrssaction.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,13 +1,7 @@
<?php
-
-
-
-
-
-
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/blogstatus.class.php" );
+
define( "SUMMARY_RSS_TYPE_DEFAULT", "default" );
define( "SUMMARY_RSS_TYPE_MOST_COMMENTED", "mostcommented" );
define( "SUMMARY_RSS_TYPE_MOST_READ", "mostread" );
Modified: plog/branches/lifetype-2.0-autoload/class/summary/dao/summarystats.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/summary/dao/summarystats.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/summary/dao/summarystats.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,11 +1,7 @@
<?php
-
-
-
-
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/blogstatus.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
/**
* This class implements a few methods that can be used to obtain the list of most recent blogs, posts, commets,
Modified: plog/branches/lifetype-2.0-autoload/class/summary/data/summarytools.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/summary/data/summarytools.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/summary/data/summarytools.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,10 +1,7 @@
<?php
+ lt_include( PLOG_CLASS_PATH."class/dao/userstatus.class.php" );
-
-
-
-
class SummaryTools
{
Modified: plog/branches/lifetype-2.0-autoload/class/summary/view/summarybloglistview.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/summary/view/summarybloglistview.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/summary/view/summarybloglistview.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,12 +1,7 @@
<?php
-
-
-
-
-
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/blogstatus.class.php" );
+
/**
* shows a paged list of blogs
*/
Modified: plog/branches/lifetype-2.0-autoload/class/summary/view/summaryuserlistview.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/summary/view/summaryuserlistview.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/summary/view/summaryuserlistview.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,7 +1,7 @@
<?php
+ lt_include( PLOG_CLASS_PATH."class/dao/userstatus.class.php" );
-
/**
* shows a paged list of users
*/
Modified: plog/branches/lifetype-2.0-autoload/class/test/helpers/testtools.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/test/helpers/testtools.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/test/helpers/testtools.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,14 +1,7 @@
<?php
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
-
-
-
-
-
-
-
-
/**
* \ingroup Test
*
Modified: plog/branches/lifetype-2.0-autoload/class/test/tests/dao/article_test.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/test/tests/dao/article_test.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/test/tests/dao/article_test.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,9 +1,7 @@
<?php
-
-
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/dao/articlecommentstatus.class.php" );
/**
* \ingroup Test
Modified: plog/branches/lifetype-2.0-autoload/class/test/tests/dao/articlecategories_test.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/test/tests/dao/articlecategories_test.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/test/tests/dao/articlecategories_test.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,9 +1,6 @@
<?php
-
-
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
/**
* \ingroup Test
Modified: plog/branches/lifetype-2.0-autoload/class/test/tests/dao/commentscommon_test.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/test/tests/dao/commentscommon_test.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/test/tests/dao/commentscommon_test.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,19 +1,7 @@
<?php
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/dao/articlecommentstatus.class.php" );
/**
* \ingroup Test
@@ -137,25 +125,25 @@
$this->assertTrue($comments->addComment($trackback3), "Couldn't add test trackback 3");
$this->assertTrue($comments->addComment($trackback4), "Couldn't add test trackback 4");
- $num = $comments->getNumPostComments($article->getId(), COMMENT_STATUS_ALL, COMMENT_TYPE_ANY);
+ $num = $comments->getNumPostComments($article->getId(), COMMENT_STATUS_ALL, CommentsCommon::COMMENT_TYPE_ANY);
$this->assertTrue($num == 7, "Wrong number of comments/trackbacks (all) ". $num);
- $num = $comments->getNumPostComments($article->getId(), COMMENT_STATUS_NONSPAM, COMMENT_TYPE_ANY);
+ $num = $comments->getNumPostComments($article->getId(), COMMENT_STATUS_NONSPAM, CommentsCommon::COMMENT_TYPE_ANY);
$this->assertTrue($num == 3, "Wrong number of comments/trackbacks (nonspam) ". $num);
- $num = $comments->getNumPostComments($article->getId(), COMMENT_STATUS_SPAM, COMMENT_TYPE_ANY);
+ $num = $comments->getNumPostComments($article->getId(), COMMENT_STATUS_SPAM, CommentsCommon::COMMENT_TYPE_ANY);
$this->assertTrue($num == 4, "Wrong number of comments/trackbacks (spam) ". $num);
- $num = $comments->getNumPostComments($article->getId(), COMMENT_STATUS_ALL, COMMENT_TYPE_COMMENT);
+ $num = $comments->getNumPostComments($article->getId(), COMMENT_STATUS_ALL, CommentsCommon::COMMENT_TYPE_COMMENT);
$this->assertTrue($num == 3, "Wrong number of comments (all) ". $num);
- $num = $comments->getNumPostComments($article->getId(), COMMENT_STATUS_NONSPAM, COMMENT_TYPE_COMMENT);
+ $num = $comments->getNumPostComments($article->getId(), COMMENT_STATUS_NONSPAM, CommentsCommon::COMMENT_TYPE_COMMENT);
$this->assertTrue($num == 2, "Wrong number of comments (nonspam) ". $num);
- $num = $comments->getNumPostComments($article->getId(), COMMENT_STATUS_SPAM, COMMENT_TYPE_COMMENT);
+ $num = $comments->getNumPostComments($article->getId(), COMMENT_STATUS_SPAM, CommentsCommon::COMMENT_TYPE_COMMENT);
$this->assertTrue($num == 1, "Wrong number of comments (spam) ". $num);
- $num = $comments->getNumPostComments($article->getId(), COMMENT_STATUS_ALL, COMMENT_TYPE_TRACKBACK);
+ $num = $comments->getNumPostComments($article->getId(), COMMENT_STATUS_ALL, CommentsCommon::COMMENT_TYPE_TRACKBACK);
$this->assertTrue($num == 4, "Wrong number of trackbacks (all) ". $num);
- $num = $comments->getNumPostComments($article->getId(), COMMENT_STATUS_NONSPAM, COMMENT_TYPE_TRACKBACK);
+ $num = $comments->getNumPostComments($article->getId(), COMMENT_STATUS_NONSPAM, CommentsCommon::COMMENT_TYPE_TRACKBACK);
$this->assertTrue($num == 1, "Wrong number of trackbacks (nonspam) ". $num);
- $num = $comments->getNumPostComments($article->getId(), COMMENT_STATUS_SPAM, COMMENT_TYPE_TRACKBACK);
+ $num = $comments->getNumPostComments($article->getId(), COMMENT_STATUS_SPAM, CommentsCommon::COMMENT_TYPE_TRACKBACK);
$this->assertTrue($num == 3, "Wrong number of trackbacks (spam) ". $num);
Modified: plog/branches/lifetype-2.0-autoload/class/test/tests/dao/searchengine_test.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/test/tests/dao/searchengine_test.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/test/tests/dao/searchengine_test.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,8 +1,6 @@
<?php
-
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
/**
* \ingroup Test
Modified: plog/branches/lifetype-2.0-autoload/class/test/tests/net/xmlrpc/xmlrpcserver_test.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/test/tests/net/xmlrpc/xmlrpcserver_test.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/test/tests/net/xmlrpc/xmlrpcserver_test.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,20 +1,7 @@
<?php
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
-
-
-
-
-
-
-
-
-
-
-
-
-
-
/**
* Unit test cases for xmlrpc.php
*/
@@ -169,7 +156,7 @@
$this->blog->getId(),
$this->owner->getUsername(),
"password",
- "topic\n" . "Intro text" . POST_EXTENDED_TEXT_MODIFIER . "Extended text",
+ "topic\n" . "Intro text" . Article::POST_EXTENDED_TEXT_MODIFIER . "Extended text",
true );
// see that the call was successful
@@ -185,7 +172,7 @@
// check that the post has the expected values
$this->assertEquals( "topic", $article->getTopic());
$this->assertEquals( "Intro textExtended text", $article->getText());
- $this->assertEquals( "Intro text" . POST_EXTENDED_TEXT_MODIFIER . "Extended text", $article->getText(false));
+ $this->assertEquals( "Intro text" . Article::POST_EXTENDED_TEXT_MODIFIER . "Extended text", $article->getText(false));
$this->assertEquals( "Intro text", $article->getIntroText());
$this->assertEquals( "Extended text", $article->getExtendedText());
@@ -506,7 +493,7 @@
// create a new post first
$article = new Article(
"topic",
- "Intro text" . POST_EXTENDED_TEXT_MODIFIER . "Extended text",
+ "Intro text" . Article::POST_EXTENDED_TEXT_MODIFIER . "Extended text",
Array( $this->cat->getId()),
$this->owner->getId(),
$this->blog->getId(),
@@ -599,7 +586,7 @@
/** test the extended text feature **/
$content = array();
$content["title"] = "topic";
- $content["description"] = "Intro text" . POST_EXTENDED_TEXT_MODIFIER . "Extended text";
+ $content["description"] = "Intro text" . Article::POST_EXTENDED_TEXT_MODIFIER . "Extended text";
$content["categories"] = Array( $cat1->getName(), $cat2->getName(), $cat3->getName());
$res = $c->query( "metaWeblog.newPost",
$this->blog->getId(),
@@ -621,7 +608,7 @@
// check that the post has the expected values
$this->assertEquals( "topic", $article->getTopic());
$this->assertEquals( "Intro textExtended text", $article->getText());
- $this->assertEquals( "Intro text" . POST_EXTENDED_TEXT_MODIFIER . "Extended text", $article->getText(false));
+ $this->assertEquals( "Intro text" . Article::POST_EXTENDED_TEXT_MODIFIER . "Extended text", $article->getText(false));
$this->assertEquals( "Intro text", $article->getIntroText());
$this->assertEquals( "Extended text", $article->getExtendedText());
@@ -657,7 +644,7 @@
// check that the post has the expected values
$this->assertEquals( "topic", $article->getTopic());
$this->assertEquals( "Intro textExtended text", $article->getText());
- $this->assertEquals( "Intro text" . POST_EXTENDED_TEXT_MODIFIER . "Extended text", $article->getText(false));
+ $this->assertEquals( "Intro text" . Article::POST_EXTENDED_TEXT_MODIFIER . "Extended text", $article->getText(false));
$this->assertEquals( "Intro text", $article->getIntroText());
$this->assertEquals( "Extended text", $article->getExtendedText());
@@ -726,7 +713,7 @@
// create a new post first
$article = new Article(
"topic",
- "Intro text" . POST_EXTENDED_TEXT_MODIFIER . "Extended text",
+ "Intro text" . Article::POST_EXTENDED_TEXT_MODIFIER . "Extended text",
Array( $this->cat->getId()),
$this->owner->getId(),
$this->blog->getId(),
@@ -773,7 +760,7 @@
// create a new post first
$article = new Article(
"topic",
- "Intro text" . POST_EXTENDED_TEXT_MODIFIER . "Extended text",
+ "Intro text" . Article::POST_EXTENDED_TEXT_MODIFIER . "Extended text",
Array( $this->cat->getId()),
$this->owner->getId(),
$this->blog->getId(),
Modified: plog/branches/lifetype-2.0-autoload/class/test/tests/summary/dao/summarystats_test.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/test/tests/summary/dao/summarystats_test.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/test/tests/summary/dao/summarystats_test.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,17 +1,7 @@
<?php
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
-
-
-
-
-
-
-
-
-
-
-
/**
* Unit test cases for the SummaryStats class
*/
Modified: plog/branches/lifetype-2.0-autoload/class/test/tests/summary/data/summarytools_test.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/test/tests/summary/data/summarytools_test.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/test/tests/summary/data/summarytools_test.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,10 +1,6 @@
<?php
-
-
-
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/userstatus.class.php" );
/**
* \ingroup Test
Modified: plog/branches/lifetype-2.0-autoload/class/view/admin/adminarticlecommentslistview.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/view/admin/adminarticlecommentslistview.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/view/admin/adminarticlecommentslistview.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,10 +1,6 @@
<?php
-
-
-
-
-
+ lt_include( PLOG_CLASS_PATH."class/dao/articlecommentstatus.class.php" );
/**
* \ingroup View
@@ -50,7 +46,7 @@
if( isset( $params["showType"] ))
$this->_commentType = $params["showType"];
else
- $this->_commentType = COMMENT_TYPE_ANY;
+ $this->_commentType = CommentsCommon::COMMENT_TYPE_ANY;
if( !ArticleCommentStatus::isValidStatus( $this->_commentStatus ))
$this->_commentStatus = COMMENT_STATUS_ALL;
@@ -85,7 +81,7 @@
// load only the comments of the given post
$postComments = $comments->getPostComments( $this->_article->getId(),
- COMMENT_ORDER_NEWEST_FIRST,
+ CommentsCommon::COMMENT_ORDER_NEWEST_FIRST,
$this->_commentStatus,
$this->_commentType,
$pager->getCurrentPage(),
@@ -109,7 +105,7 @@
// load all comments given the current status
$postComments = $comments->getBlogComments( $this->_blogInfo->getId(),
- COMMENT_ORDER_NEWEST_FIRST,
+ CommentsCommon::COMMENT_ORDER_NEWEST_FIRST,
$this->_commentStatus,
$this->_commentType,
$this->_searchTerms,
Modified: plog/branches/lifetype-2.0-autoload/class/view/admin/admindashboardview.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/view/admin/admindashboardview.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/view/admin/admindashboardview.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,6 +1,7 @@
<?php
lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/dao/articlecommentstatus.class.php" );
/**
* maximum number of recent items that we will show in the statistics
@@ -70,7 +71,7 @@
-1,
POST_STATUS_PUBLISHED );
$recentComments[$userBlog->getId()] = $comments->getBlogComments ( $userBlog->getId(),
- COMMENT_ORDER_NEWEST_FIRST,
+ CommentsCommon::COMMENT_ORDER_NEWEST_FIRST,
COMMENT_STATUS_ALL,
"", // no search terms
1, // first page
Modified: plog/branches/lifetype-2.0-autoload/class/view/admin/adminpostslistview.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/view/admin/adminpostslistview.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/view/admin/adminpostslistview.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -1,17 +1,7 @@
<?php
+ lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
-
-
-
-
-
-
-
-
-
-
-
/**
* \ingroup View
* @private
Modified: plog/branches/lifetype-2.0-autoload/class/view/admin/adminresourceslistview.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/view/admin/adminresourceslistview.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/view/admin/adminresourceslistview.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -56,7 +56,7 @@
$this->setSessionValue( "albumId", $this->_albumId );
- $this->_resourceType = GALLERY_RESOURCE_ANY;
+ $this->_resourceType = GalleryConstants::GALLERY_RESOURCE_ANY;
// base url for the pager so that it can be changed by parent classes
// such as AdminSimpleResourcesListView
@@ -103,7 +103,7 @@
if( $this->_searchTerms || $this->_locationId > -1 ) {
// load the resources matching the given string from *all* albums
$resources = $galleryResources->getUserResources( $this->_blogInfo->getId(),
- GALLERY_NO_ALBUM,
+ GalleryConstants::GALLERY_NO_ALBUM,
$this->_resourceType,
$this->_searchTerms,
$this->_locationId,
@@ -111,7 +111,7 @@
DEFAULT_RESOURCES_PER_PAGE );
// total number of resources for the pager
$numResources = $galleryResources->getNumUserResources( $this->_blogInfo->getId(),
- GALLERY_NO_ALBUM,
+ GalleryConstants::GALLERY_NO_ALBUM,
$this->_resourceType,
$this->_searchTerms,
$this->_locationId );
Modified: plog/branches/lifetype-2.0-autoload/class/view/admin/chooser/adminuserpictureselectview.class.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/class/view/admin/chooser/adminuserpictureselectview.class.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/class/view/admin/chooser/adminuserpictureselectview.class.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -19,7 +19,7 @@
$this->AdminResourcesListView( $blogInfo, $params );
$this->_templateName = "chooser/userpictureselect";
- $this->_resourceType = GALLERY_RESOURCE_IMAGE;
+ $this->_resourceType = GalleryConstants::GALLERY_RESOURCE_IMAGE;
}
function render()
Modified: plog/branches/lifetype-2.0-autoload/tools/generateData.php
===================================================================
--- plog/branches/lifetype-2.0-autoload/tools/generateData.php 2007-10-06 19:08:42 UTC (rev 5968)
+++ plog/branches/lifetype-2.0-autoload/tools/generateData.php 2007-10-07 12:04:57 UTC (rev 5969)
@@ -5,20 +5,8 @@
}
include_once( PLOG_CLASS_PATH."class/object/loader.class.php" );
+lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
-
-
-
-
-
-
-
-
-
-
-
-
-
// check whether we're being run from the command line
$commandLine = is_array( $argv );
if( $commandLine )
More information about the pLog-svn
mailing list