From de09822ce0b5561cdc7f08ebc6cac1868b03088e Mon Sep 17 00:00:00 2001 From: Julian Seidenberg Date: Fri, 27 Jul 2012 12:37:21 +1200 Subject: [PATCH] MINOR: removing comments --- code/DMSDocument.php | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/code/DMSDocument.php b/code/DMSDocument.php index d8cc293..b99e612 100644 --- a/code/DMSDocument.php +++ b/code/DMSDocument.php @@ -161,8 +161,6 @@ class DMSDocument extends DataObject implements DMSDocumentInterface { $tags = $this->getTagsObjects($category, $value); if ($tags->Count() > 0) { - $tagsToDelete = array(); - foreach($tags as $t) { $documentList = $t->Documents(); @@ -172,13 +170,6 @@ class DMSDocument extends DataObject implements DMSDocumentInterface { //delete the entire tag if it has no relations left if ($documentList->Count() == 0) $t->delete(); } - - //TODO: remove this comment if unit tests work fine - //delete after the loop, so it doesn't conflict with the loop of the $tags list -// foreach($tagsToDelete as $tID) { -// $tag = DataObject::get_by_id("DMSTag",$tID); -// $tag->delete(); -// } } } @@ -187,20 +178,12 @@ class DMSDocument extends DataObject implements DMSDocumentInterface { * @return null */ function removeAllTags() { - $tagsToDelete = array(); $allTags = $this->Tags(); foreach($allTags as $tag) { $documentlist = $tag->Documents(); $documentlist->remove($this); if ($tag->Documents()->Count() == 0) $tag->delete(); } - - //TODO: remove this comment if unit tests work fine - //delete after the loop, so it doesn't conflict with the loop of the $tags list -// foreach($tagsToDelete as $tID) { -// $tag = DataObject::get_by_id("DMSTag",$tID); -// $tag->delete(); -// } } /**