[pLog-svn] r2281 - plog/branches/plog-1.0.2/class/gallery/dao

jondaley at devel.plogworld.net jondaley at devel.plogworld.net
Sat Jul 2 19:23:53 GMT 2005


Author: jondaley
Date: 2005-07-02 19:23:52 +0000 (Sat, 02 Jul 2005)
New Revision: 2281

Modified:
   plog/branches/plog-1.0.2/class/gallery/dao/galleryalbums.class.php
Log:
fixes various warnings, discovered during research of http://bugs.plogworld.net/view.php?id=608

Modified: plog/branches/plog-1.0.2/class/gallery/dao/galleryalbums.class.php
===================================================================
--- plog/branches/plog-1.0.2/class/gallery/dao/galleryalbums.class.php	2005-07-01 12:33:37 UTC (rev 2280)
+++ plog/branches/plog-1.0.2/class/gallery/dao/galleryalbums.class.php	2005-07-02 19:23:52 UTC (rev 2281)
@@ -147,11 +147,11 @@
 				return false;
 
             $row = $result->FetchRow();
-            $album = $this->_fetchAlbumInformation( $row, $fetchResources, $onlyShownAlbums );
+            $album = $this->_fetchAlbumInformation($row);
 
             // ...and keep a copy of the object we just fetched
             // just in case, one  never knows :)
-            $this->cache[$id] = $album;
+            $this->cache[$row['id']] = $album;
 
             return $album;
 		}
@@ -320,7 +320,7 @@
 		{
 			// if we haven't loaded them all yet...
 			$prefix = $this->getPrefix();
-			if( $this->_counters == null ) {
+			if( $this->_counts == null ) {
 				$query = "SELECT album_id, COUNT(*) AS total FROM {$prefix}gallery_resources GROUP BY album_id";
 			
 				$result = $this->Execute( $query );
@@ -330,11 +330,11 @@
 					
 				while( $row = $result->FetchRow()) {
 					$id = $row["album_id"];
-					$this->_counters[$id] = $row["total"];
+					$this->_counts[$id] = $row["total"];
 				}
 			}
 			
-			$total = $this->_counters[$albumId];
+			$total = $this->_counts[$albumId];
 			
 			if( $total == "" ) $total = 0;
 			




More information about the pLog-svn mailing list