Commits

matteosister committed 622cc77

refactor and naming convention

  • Participants
  • Parent commits 93b249e

Comments (0)

Files changed (1)

lib/behavior/TaggableBehavior.php

             \$theTag = new {$this->tagTable->getPhpName()}();
             \$theTag->setName(\$tag);
             \$theTag->save();
-        }
-
-        if (!\$this->getTags()->contains(\$theTag))
             \$this->addTag(\$theTag);
+        }
     }
 }
 
  * @param      PropelPDO \$con optional connection object
  */
 public function removeAllTags(PropelPDO \$con = null) {
-      // Get all tags for this object
+    // Get all tags for this object
     \$taggings = \$this->get{$this->taggingTable->getPhpName()}s(\$con);
-    foreach (\$taggings as \$tag) {
-      \$tag->delete(\$con);
+    foreach (\$taggings as \$tagging) {
+      \$tagging->delete(\$con);
     }
 }