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

oscar at devel.plogworld.net oscar at devel.plogworld.net
Wed Dec 22 15:15:13 GMT 2004


Author: oscar
Date: 2004-12-22 15:15:13 +0000 (Wed, 22 Dec 2004)
New Revision: 563

Removed:
   plog/trunk/class/action/admin/adminresourcecenteraction.class.php
Modified:
   plog/trunk/class/controller/admincontrollermap.properties.php
Log:
removed the "resourceCenter" action that wasn't needed anymore


Deleted: plog/trunk/class/action/admin/adminresourcecenteraction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminresourcecenteraction.class.php	2004-12-22 15:14:01 UTC (rev 562)
+++ plog/trunk/class/action/admin/adminresourcecenteraction.class.php	2004-12-22 15:15:13 UTC (rev 563)
@@ -1,79 +0,0 @@
-<?php
-
-    /**
-     * @package admin
-     */
-
-
-	include_once( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
-    include_once( PLOG_CLASS_PATH."class/view/admin/admintemplatedview.class.php" );
-	include_once( PLOG_CLASS_PATH."class/view/admin/adminerrorview.class.php" );
-	include_once( PLOG_CLASS_PATH."class/gallery/dao/galleryresourcestorage.class.php" );
-	include_once( PLOG_CLASS_PATH."class/gallery/dao/galleryresources.class.php" );
-	include_once( PLOG_CLASS_PATH."class/gallery/dao/galleryresourcequotas.class.php" );
-
-    /**
-     * Shows the main page of the "Resource Center"
-     */
-    class AdminResourceCenterAction extends AdminAction {
-
-    	/**
-         * Constructor. If nothing else, it also has to call the constructor of the parent
-         * class, BlogAction with the same parameters
-         */
-        function AdminResourceCenter( $actionInfo, $request )
-        {
-        	$this->AdminAction( $actionInfo, $request );
-        }
-
-        /**
-         * Carries out the specified action
-         */
-        function perform()
-        {
-			$baseFolder = GalleryResourceStorage::getResourcesStorageFolder();
-			$userFolder = GalleryResourceStorage::getUserFolder( $this->_blogInfo->getId());
-			$previewsFolder = GalleryResourceStorage::getPreviewsFolder( $this->_blogInfo->getId());
-			$folders = "$baseFolder<br/>$userFolder<br/>$previewsFolder";
-			// check if the storage folder exists and it is readable
-			if( !GalleryResourceStorage::checkBaseStorageFolder()) {
-				$this->_view = new AdminErrorView( $this->_blogInfo );
-				$this->_view->setMessage( $this->_locale->pr("error_base_storage_folder_missing_or_unreadable", $folders));
-				$this->setCommonData();
-				
-				return false;
-			}
-
-			if( !GalleryResourceStorage::checkUserStorageFolder( $this->_blogInfo->getId())) {
-				$this->_view = new AdminErrorView( $this->_blogInfo );
-				$this->_view->setMessage( $this->_locale->pr("error_base_storage_folder_missing_or_unreadable",$folders));
-				$this->setCommonData();
-				
-				return false;
-			}
-			
-			if( !GalleryResourceStorage::checkPreviewsStorageFolder( $this->_blogInfo->getId())) {
-				$this->_view = new AdminErrorView( $this->_blogInfo );
-				$this->_view->setMessage( $this->_locale->pr("error_base_storage_folder_missing_or_unreadable",$folders));
-				$this->setCommonData();
-				
-				return false;
-			}
-			
-			// otherwise, fetch some statistics and continue
-			$resources = new GalleryResources();
-			$quotaUsage = GalleryResourceQuotas::getBlogResourceQuotaUsage( $this->_blogInfo->getId());
-			$totalResources = $resources->getNumResources( $this->_blogInfo->getId());
-			$currentQuota = GalleryResourceQuotas::getBlogResourceQuota( $this->_blogInfo->getId());
-			
-            $this->_view = new AdminTemplatedView( $this->_blogInfo, "resourcecenter" );
-			$this->_view->setValue( "quotausage", $quotaUsage );
-			$this->_view->setValue( "totalresources", $totalResources );
-			$this->_view->setValue( "quota", $currentQuota );						
-            $this->setCommonData();
-
-            // better to return true if everything fine
-            return true;
-        }
-    }
-?>

Modified: plog/trunk/class/controller/admincontrollermap.properties.php
===================================================================
--- plog/trunk/class/controller/admincontrollermap.properties.php	2004-12-22 15:14:01 UTC (rev 562)
+++ plog/trunk/class/controller/admincontrollermap.properties.php	2004-12-22 15:15:13 UTC (rev 563)
@@ -181,8 +181,6 @@
     $actions["deleteBlog"] = "AdminDeleteBlogAction";
 	// removes all posts marked as spam and marked as deleted
     $actions["purgePosts"] = "AdminPurgePostsAction";
-    // shows the resource center
-    $actions["resourceCenter"] = "AdminResourceCenterAction";
     // shows the form to add a new resource album
     $actions["newResourceAlbum"] = "AdminNewResourceAlbumAction";
     // adds a new album to the database
@@ -250,4 +248,4 @@
 	$actions["userPictureSelect"] = "AdminUserPictureSelectAction";
 	// blog template selector
 	$actions["blogTemplateChooser"] = "AdminBlogTemplateChooserAction";
-?>
\ No newline at end of file
+?>




More information about the pLog-svn mailing list