Merge pull request #4726 from atif-shaikh/CRM-5039
[civicrm-core.git] / CRM / Activity / Form / Task / RemoveFromTag.php
index 3c37f1ee3e25584f3d75a4eb214e639e6b32dfb4..a2e0dd57535df5d824722d149a01971ed01ac9f3 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
 class CRM_Activity_Form_Task_RemoveFromTag extends CRM_Activity_Form_Task {
 
   /**
-   * name of the tag
+   * Name of the tag
    *
    * @var string
    */
   protected $_name;
 
   /**
-   * all the tags in the system
+   * All the tags in the system
    *
    * @var array
    */
   protected $_tags;
 
   /**
-   * Build the form
+   * Build the form object
    *
    * @access public
    *
@@ -67,7 +67,7 @@ class CRM_Activity_Form_Task_RemoveFromTag extends CRM_Activity_Form_Task {
     }
 
     $parentNames = CRM_Core_BAO_Tag::getTagSet('civicrm_activity');
-    CRM_Core_Form_Tag::buildQuickForm($this, $parentNames, 'civicrm_activity', NULL, TRUE, FALSE, TRUE);
+    CRM_Core_Form_Tag::buildQuickForm($this, $parentNames, 'civicrm_activity', NULL, TRUE, FALSE);
 
     $this->addDefaultButtons(ts('Remove Tags from activities'));
   }
@@ -76,6 +76,12 @@ class CRM_Activity_Form_Task_RemoveFromTag extends CRM_Activity_Form_Task {
     $this->addFormRule(array('CRM_Activity_Form_Task_RemoveFromTag', 'formRule'));
   }
 
+  /**
+   * @param CRM_Core_Form $form
+   * @param $rule
+   *
+   * @return array
+   */
   static function formRule($form, $rule) {
     $errors = array();
     if (empty($form['tag']) && empty($form['activity_taglist'])) {
@@ -85,7 +91,7 @@ class CRM_Activity_Form_Task_RemoveFromTag extends CRM_Activity_Form_Task {
   }
 
   /**
-   * process the form after the input has been submitted and validated
+   * Process the form after the input has been submitted and validated
    *
    * @access public
    *
@@ -138,6 +144,5 @@ class CRM_Activity_Form_Task_RemoveFromTag extends CRM_Activity_Form_Task {
       CRM_Core_Session::setStatus($status, ts("Removed Tag <em>%1</em>", array(1 => $this->_tags[$key])), 'success', array('expires' => 0));
     }
   }
-  //end of function
 }