summaryrefslogtreecommitdiff
path: root/FisheyeGallery.php
diff options
context:
space:
mode:
authorChristian Fowler <spider@viovio.com>2007-09-05 01:25:24 +0000
committerChristian Fowler <spider@viovio.com>2007-09-05 01:25:24 +0000
commit8e37ea6ca1da8f152771e35358a35b82a8b9d6f1 (patch)
treea3d7fa45a7cc87815e6316ce4b69b8e6f6f73a69 /FisheyeGallery.php
parentc8a4f056d18168038c0a22095c74c99fcd482c47 (diff)
downloadfisheye-8e37ea6ca1da8f152771e35358a35b82a8b9d6f1.tar.gz
fisheye-8e37ea6ca1da8f152771e35358a35b82a8b9d6f1.tar.bz2
fisheye-8e37ea6ca1da8f152771e35358a35b82a8b9d6f1.zip
use is_subclass_of FisheyeImage when deleting children
Diffstat (limited to 'FisheyeGallery.php')
-rw-r--r--FisheyeGallery.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/FisheyeGallery.php b/FisheyeGallery.php
index 830edb4..0d98cf3 100644
--- a/FisheyeGallery.php
+++ b/FisheyeGallery.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_fisheye/FisheyeGallery.php,v 1.63 2007/07/16 15:27:20 squareing Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_fisheye/FisheyeGallery.php,v 1.64 2007/09/05 01:25:24 spiderr Exp $
* @package fisheye
*/
@@ -463,12 +463,11 @@ class FisheyeGallery extends FisheyeBase {
if( $this->isValid() ) {
$this->mDb->StartTrans();
-
if( $this->loadImages() ) {
foreach( array_keys( $this->mItems ) as $key ) {
if( $pRecursiveDelete ) {
$this->mItems[$key]->expunge( $pRecursiveDelete );
- } elseif( $this->mItems[$key]->mInfo['content_type_guid'] == FISHEYEIMAGE_CONTENT_TYPE_GUID ) {
+ } elseif( is_subclass_of( $this->mItems[$key], 'FisheyeImage' ) ) {
$query = "SELECT COUNT(`item_content_id`) AS `other_gallery`
FROM `".BIT_DB_PREFIX."fisheye_gallery_image_map`
WHERE `item_content_id`=? AND `gallery_content_id`!=?";
@@ -480,7 +479,6 @@ class FisheyeGallery extends FisheyeBase {
}
}
}
-
$query = "DELETE FROM `".BIT_DB_PREFIX."fisheye_gallery_image_map` WHERE `gallery_content_id`=?";
$rs = $this->mDb->query($query, array( $this->mContentId ) );
$query = "DELETE FROM `".BIT_DB_PREFIX."fisheye_gallery_image_map` WHERE `item_content_id`=?";