[pLog-svn] r2490 - plog/trunk/class/gallery/dao
oscar at devel.plogworld.net
oscar at devel.plogworld.net
Mon Sep 19 06:21:36 GMT 2005
Author: oscar
Date: 2005-09-19 06:21:36 +0000 (Mon, 19 Sep 2005)
New Revision: 2490
Modified:
plog/trunk/class/gallery/dao/galleryresources.class.php
Log:
this probably came with the merging, but it wasn't necessary...
Modified: plog/trunk/class/gallery/dao/galleryresources.class.php
===================================================================
--- plog/trunk/class/gallery/dao/galleryresources.class.php 2005-09-19 04:18:56 UTC (rev 2489)
+++ plog/trunk/class/gallery/dao/galleryresources.class.php 2005-09-19 06:21:36 UTC (rev 2490)
@@ -668,6 +668,12 @@
$this->_cache->removeData( $resource->getId(), CACHE_RESOURCES );
$this->_cache->removeData( $resource->getOwnerId(), CACHE_RESOURCES_USER );
$this->_cache->removeData( $resource->getOwnerId()."_".$resource->getFileName(), CACHE_RESOURCES_BY_NAME );
+ // and update the album counters... must substract 1 from the previous album
+ // and must add one to the new album
+ $albums = new GalleryAlbums();
+ $album = $resource->getAlbum();
+ $album->setNumResources( $album->getNumResources() + 1 );
+ $albums->updateAlbum( $album );
}
return( $result );
@@ -742,12 +748,6 @@
$row["thumbnail_format"],
$row["id"] );
- // we should also try to get some information about
- // to which album this resource belongs
- $album = $this->albums->getAlbum( $row["album_id"], $row["owner_id"], false );
- $res->setAlbum( $album );
- // print_r(unserialize($row["metadata"]));
-
return $res;
}
}
More information about the pLog-svn
mailing list