[pLog-svn] r1748 - plog/branches/plog-1.1-ben/class/action/admin

ork at devel.plogworld.net ork at devel.plogworld.net
Tue Apr 5 18:53:00 GMT 2005


Author: ork
Date: 2005-04-05 18:52:59 +0000 (Tue, 05 Apr 2005)
New Revision: 1748

Modified:
   plog/branches/plog-1.1-ben/class/action/admin/adminmainaction.class.php
Log:
changed includes


Modified: plog/branches/plog-1.1-ben/class/action/admin/adminmainaction.class.php
===================================================================
--- plog/branches/plog-1.1-ben/class/action/admin/adminmainaction.class.php	2005-04-05 18:52:21 UTC (rev 1747)
+++ plog/branches/plog-1.1-ben/class/action/admin/adminmainaction.class.php	2005-04-05 18:52:59 UTC (rev 1748)
@@ -1,10 +1,7 @@
 <?php
 
 	include_once( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
-    include_once( PLOG_CLASS_PATH."class/view/admin/adminnewpostview.class.php" );
-	include_once( PLOG_CLASS_PATH."class/view/admin/adminsimpleerrorview.class.php" );	
-    include_once( PLOG_CLASS_PATH."class/view/admin/admindashboardview.class.php" );	
-	include_once( PLOG_CLASS_PATH."class/dao/users.class.php" );
+//    include_once( PLOG_CLASS_PATH."class/view/admin/adminnewpostview.class.php" );
 
     /**
      * \ingroup Action
@@ -34,11 +31,13 @@
 	        // first of all, check if we have a valid blog id
 	        $this->_blogId = $this->_request->getValue( "blogId" );
             if( $this->_blogId == "" || $this->_blogId < 0 ) {
+	            include_once( PLOG_CLASS_PATH."class/dao/users.class.php" );
 				
 				// check if the user really belongs to one or more blogs and if not, quit
 				$users = new Users();
 				$userBlogs = $users->getUsersBlogs( $this->_userInfo->getId());
 				if( count($userBlogs) == 0 ) {
+	                include_once( PLOG_CLASS_PATH."class/view/admin/adminsimpleerrorview.class.php" );	
 					$this->_view = new AdminSimpleErrorView();
 					$this->_view->setValue( "message", $this->_locale->tr("error_dont_belong_to_any_blog" ));
 					
@@ -46,6 +45,8 @@
 				}
 				
 				// if everything went fine, then we can continue...
+                include_once( PLOG_CLASS_PATH."class/view/admin/admindashboardview.class.php" );	
+
 				$this->_view = new AdminDashboardView( $this->_userInfo, $userBlogs );
 				return false;
             }
@@ -57,6 +58,8 @@
 			 
 			// check if the blog really exists
 			if( !$this->_blogInfo ) {
+	            include_once( PLOG_CLASS_PATH."class/view/admin/adminsimpleerrorview.class.php" );	
+
 				$this->_view = new AdminSimpleErrorView();
 				$this->_view->setValue( "message", $this->_locale->tr("error_incorrect_blog_id" ));
 				
@@ -69,6 +72,8 @@
             $userPermissions = new UserPermissions();
 			$blogUserPermissions = $userPermissions->getUserPermissions( $this->_userInfo->getId(), $this->_blogInfo->getId());
 			if( !$blogUserPermissions ) {
+	            include_once( PLOG_CLASS_PATH."class/view/admin/adminsimpleerrorview.class.php" );	
+
 				$this->_view = new AdminSimpleErrorView();
 				$this->_view->setValue( "message", $this->_locale->tr("error_no_permissions" ));
 				




More information about the pLog-svn mailing list