MINOR: removing comments

This commit is contained in:
Julian Seidenberg 2012-07-27 12:37:21 +12:00
parent 7b18e3ba7e
commit de09822ce0

View File

@ -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();
// }
}
/**