update MediaMapper
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 24 Jun 2014 17:55:42 +0000 (17:55 +0000)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 24 Jun 2014 17:55:42 +0000 (17:55 +0000)
Toolkit/Photos/Models/MediaMapper.php

index 0b8d34d..53226e7 100644 (file)
@@ -671,15 +671,6 @@ class Toolkit_Photos_Models_MediaMapper
             $stmt = $this->_dbh->prepare($sql);
             $stmt->bindParam(':id', $category->getId(), PDO::PARAM_INT);
             $stmt->execute();
-            // 3. remove photos if they are orphaned from this delete
-            $sql = "
-            DELETE
-              FROM photos.photo
-             WHERE id NOT IN (
-                   SELECT distinct photo
-                     FROM photos.photo2category
-                   )";
-            $this->_dbh->query($sql);
         } catch (PDOException $e) {
             Toolkit_Common::handleError($e);
         }