[pLog-svn] r3743 - plog/trunk/class/gallery/dao

oscar at devel.lifetype.net oscar at devel.lifetype.net
Wed Jul 19 21:11:54 GMT 2006


Author: oscar
Date: 2006-07-19 21:11:53 +0000 (Wed, 19 Jul 2006)
New Revision: 3743

Modified:
   plog/trunk/class/gallery/dao/galleryresources.class.php
Log:
modified getNumUserResources so that no blog id needs to be provided (just leave it as '-1')


Modified: plog/trunk/class/gallery/dao/galleryresources.class.php
===================================================================
--- plog/trunk/class/gallery/dao/galleryresources.class.php	2006-07-19 21:11:11 UTC (rev 3742)
+++ plog/trunk/class/gallery/dao/galleryresources.class.php	2006-07-19 21:11:53 UTC (rev 3743)
@@ -255,7 +255,13 @@
 		{
 			$prefix = $this->getPrefix();
 			$table  = "{$prefix}gallery_resources";
-			$cond = "owner_id = '".Db::qstr( $ownerId )."'";
+			
+			$cond = "";
+			if( $ownerId != -1 )
+				$cond = "owner_id = '".Db::qstr( $ownerId )."'";
+			else
+				$cond = "owner_id = owner_id";
+			
             if( $albumId > GALLERY_NO_ALBUM )
             	$cond .= "AND album_id = '".Db::qstr($albumId)."'";
 			if( $resourceType > GALLERY_RESOURCE_ANY )



More information about the pLog-svn mailing list