[pLog-svn] r750 - in plog/trunk: class/action/admin class/controller templates/admin

oscar at devel.plogworld.net oscar at devel.plogworld.net
Tue Jan 18 15:36:06 GMT 2005


Author: oscar
Date: 2005-01-18 15:36:05 +0000 (Tue, 18 Jan 2005)
New Revision: 750

Removed:
   plog/trunk/class/action/admin/adminpurgepostsaction.class.php
   plog/trunk/class/action/admin/adminpurgespamcommentsaction.class.php
Modified:
   plog/trunk/class/controller/admincontrollermap.properties.php
   plog/trunk/templates/admin/adminsettings.template
   plog/trunk/templates/admin/menus.xml
Log:
moved the 'clean up' options to their own pages, since that wasn't the right place and I am going to add a few more later on (remove 'disabled' blogs and remove 'disabled' users)


Deleted: plog/trunk/class/action/admin/adminpurgepostsaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminpurgepostsaction.class.php	2005-01-18 15:05:11 UTC (rev 749)
+++ plog/trunk/class/action/admin/adminpurgepostsaction.class.php	2005-01-18 15:36:05 UTC (rev 750)
@@ -1,36 +0,0 @@
-<?php
-
-    /**
-     * @package admin
-     */
-
-
-	include_once( PLOG_CLASS_PATH."class/action/admin/siteadminaction.class.php" );
-    include_once( PLOG_CLASS_PATH."class/view/admin/admintemplatedview.class.php" );
-    include_once( PLOG_CLASS_PATH."class/view/admin/adminmessageview.class.php" );
-    include_once( PLOG_CLASS_PATH."class/dao/articles.class.php" );
-
-    /**
-     * removes all the posts from the database that have status as 'deleted'
-     * as well as its comments and trackbacks
-     */
-    class AdminPurgePostsAction extends SiteAdminAction {
-
-    	function AdminPurgePostsAction( $actionInfo, $request )
-        {
-        	$this->SiteAdminAction( $actionInfo, $request );
-        }
-
-        function perform()
-        {
-        	$articles = new Articles();
-            $articles->purgePosts();
-
-        	$this->_view = new AdminMessageView( $this->_blogInfo );
-            $this->_view->setMessage( $this->_locale->tr("posts_purged_ok"));
-            $this->setCommonData();
-
-            return true;
-        }
-    }
-?>

Deleted: plog/trunk/class/action/admin/adminpurgespamcommentsaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminpurgespamcommentsaction.class.php	2005-01-18 15:05:11 UTC (rev 749)
+++ plog/trunk/class/action/admin/adminpurgespamcommentsaction.class.php	2005-01-18 15:36:05 UTC (rev 750)
@@ -1,36 +0,0 @@
-<?php
-
-    /**
-     * @package admin
-     */
-
-
-	include_once( PLOG_CLASS_PATH."class/action/admin/siteadminaction.class.php" );
-    include_once( PLOG_CLASS_PATH."class/view/admin/admintemplatedview.class.php" );
-    include_once( PLOG_CLASS_PATH."class/view/admin/adminmessageview.class.php" );    
-    include_once( PLOG_CLASS_PATH."class/dao/articles.class.php" );
-
-    /**
-     * removes all comments marked as spam from the database
-     */
-    class AdminPurgeSpamCommentsAction extends SiteAdminAction
-    {
-
-    	function AdminPurgeSpamCommentsAction( $actionInfo, $request )
-        {
-        	$this->SiteAdminAction( $actionInfo, $request );
-        }
-
-        function perform()
-        {
-        	$comments = new ArticleComments();
-            $comments->purgeSpamComments();
-
-        	$this->_view = new AdminMessageView( $this->_blogInfo );
-            $this->_view->setMessage( $this->_locale->tr("spam_comments_purged_ok"));
-            $this->setCommonData();
-
-            return true;
-        }
-    }
-?>

Modified: plog/trunk/class/controller/admincontrollermap.properties.php
===================================================================
--- plog/trunk/class/controller/admincontrollermap.properties.php	2005-01-18 15:05:11 UTC (rev 749)
+++ plog/trunk/class/controller/admincontrollermap.properties.php	2005-01-18 15:36:05 UTC (rev 750)
@@ -248,4 +248,9 @@
 	$actions["userPictureSelect"] = "AdminUserPictureSelectAction";
 	// blog template selector
 	$actions["blogTemplateChooser"] = "AdminBlogTemplateChooserAction";
+	// clean up
+	$actions["cleanUp"] = "AdminCleanupAction";
+	$actions["cleanupPosts"] = "AdminCleanupAction";
+	$actions["cleanupSpam"] = "AdminCleanupAction";
+
 ?>

Modified: plog/trunk/templates/admin/adminsettings.template
===================================================================
--- plog/trunk/templates/admin/adminsettings.template	2005-01-18 15:05:11 UTC (rev 749)
+++ plog/trunk/templates/admin/adminsettings.template	2005-01-18 15:36:05 UTC (rev 750)
@@ -1,36 +1,5 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=adminSettings title=$locale->tr("adminSettings")}
 {$menu->generateAt("adminSettings",2)}
-
- <h3>{$locale->tr("site_stats")}</h3>
- <p>
- {$locale->tr("number_blogs")}: {$stats.totalblogs}<br/>
- {$locale->tr("number_users")}: {$stats.totalusers}<br/>
- {$locale->tr("number_posts")}: {$stats.totalposts}<br/>
- </p>
- <p>
- {$locale->tr("number_posts_today")}: {$stats.poststoday}<br/>
- {$locale->tr("number_posts_this_month")}: {$stats.poststhismonth}<br/>
- </p>
- <h3>{$locale->tr("clean_up")}</h3>
- <p>
-  {$locale->tr("purge_info")}
- </p>
- <p>
-  <form name="purgePosts" method="post" action="admin.php">
-  <input type="submit" name="purgePosts" value="{$locale->tr("purge_posts")}" />
-  <input type="hidden" name="op" value="purgePosts" />
-  </form>
- </p>
- <p>
-  {$locale->tr("spam_info")}
- </p>
- <p>
-  <form name="purgeSpamComments" method="post" action="admin.php">
-  <input type="submit" name="purgeSpam" value="{$locale->tr("purge_spam_comments")}" />
-  <input type="hidden" name="op" value="purgeSpamComments" />
-  </form>
- </p>
-
 {include file="$admintemplatepath/footernavigation.template"}
 {include file="$admintemplatepath/footer.template"}
\ No newline at end of file

Modified: plog/trunk/templates/admin/menus.xml
===================================================================
--- plog/trunk/templates/admin/menus.xml	2005-01-18 15:05:11 UTC (rev 749)
+++ plog/trunk/templates/admin/menus.xml	2005-01-18 15:36:05 UTC (rev 750)
@@ -70,6 +70,9 @@
 			<resourcesSettings url="?op=editSiteSettings#resources" siteAdmin="1" ignoreTab="1"/>
 			<searchSettings url="?op=editSiteSettings#search" siteAdmin="1" ignoreTab="1"/>
 		</GlobalSettings>
+		<cleanUpSection ignoreBreadCrums="1">
+			<cleanUp url="?op=cleanUp" siteAdmin="1" />
+		</cleanUpSection>
 	</adminSettings>
 	<Logout url="?op=Logout" /> 
 </menu>




More information about the pLog-svn mailing list