[pLog-svn] r569 - plog/trunk/class/view/admin

oscar at devel.plogworld.net oscar at devel.plogworld.net
Thu Dec 23 10:57:49 GMT 2004


Author: oscar
Date: 2004-12-23 10:57:49 +0000 (Thu, 23 Dec 2004)
New Revision: 569

Modified:
   plog/trunk/class/view/admin/adminresourceslistview.class.php
Log:
fixed a bug. Albums were appearing even in the second page, and they shoulnd't...


Modified: plog/trunk/class/view/admin/adminresourceslistview.class.php
===================================================================
--- plog/trunk/class/view/admin/adminresourceslistview.class.php	2004-12-23 10:51:46 UTC (rev 568)
+++ plog/trunk/class/view/admin/adminresourceslistview.class.php	2004-12-23 10:57:49 UTC (rev 569)
@@ -62,14 +62,13 @@
 				}
 			}
 			else {
-				// get the subalbums
 				$albums = $galleryAlbums->getChildAlbums( $this->_albumId, $this->_blogInfo->getId());
 				$resources = Array();
 			}
 			
 			// get a list with the nested albums
 			$userAlbums = $galleryAlbums->getNestedAlbumList( $this->_blogInfo->getId());
-			$this->setValue( "albumsList", $userAlbums );			
+			$this->setValue( "albumsList", $userAlbums );
 
 			// fetch some statistics and continue
 			$quotaUsage = GalleryResourceQuotas::getBlogResourceQuotaUsage( $this->_blogInfo->getId());
@@ -77,11 +76,12 @@
 			$currentQuota = GalleryResourceQuotas::getBlogResourceQuota( $this->_blogInfo->getId());
 			$this->setValue( "quotausage", $quotaUsage );
 			$this->setValue( "totalresources", $totalResources );
-			$this->setValue( "quota", $currentQuota );				
+			$this->setValue( "quota", $currentQuota );
 
-			// and now export info about the albums and so on
+			// and now export info about the albums and so on but only 
+			// if we're browsing the first page only (albums do not appear anymore after the first page)
             		$this->setValue( "album", $album );
-			if( $this->_albumId > ROOT_ALBUM_ID )
+			if( $this->_albumId > ROOT_ALBUM_ID && $this->_page < 2 )
 				$this->setValue( "albums", $album->getChildren());
 			else
 				$this->setValue( "albums", $albums );




More information about the pLog-svn mailing list