X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FActivity%2FForm%2FTask%2FRemoveFromTag.php;h=37973570e6d89b2d5647883ab36fe11d47f33e29;hb=99483ce807074cfd70987eb1d52fb5fddd94511c;hp=746984c2b3e162148d3309122a117027d5144bba;hpb=c52174d854bcc01af1e112d3bb0eee0e201d65e6;p=civicrm-core.git diff --git a/CRM/Activity/Form/Task/RemoveFromTag.php b/CRM/Activity/Form/Task/RemoveFromTag.php index 746984c2b3..37973570e6 100644 --- a/CRM/Activity/Form/Task/RemoveFromTag.php +++ b/CRM/Activity/Form/Task/RemoveFromTag.php @@ -1,7 +1,7 @@ _tags = CRM_Core_BAO_Tag::getTags('civicrm_activity'); foreach ($this->_tags as $tagID => $tagName) { @@ -72,7 +71,7 @@ class CRM_Activity_Form_Task_RemoveFromTag extends CRM_Activity_Form_Task { $this->addDefaultButtons(ts('Remove Tags from activities')); } - function addRules() { + public function addRules() { $this->addFormRule(array('CRM_Activity_Form_Task_RemoveFromTag', 'formRule')); } @@ -82,7 +81,7 @@ class CRM_Activity_Form_Task_RemoveFromTag extends CRM_Activity_Form_Task { * * @return array */ - static function formRule($form, $rule) { + public static function formRule($form, $rule) { $errors = array(); if (empty($form['tag']) && empty($form['activity_taglist'])) { $errors['_qf_default'] = "Please select atleast one tag."; @@ -91,9 +90,8 @@ 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 * * @return void */ @@ -136,13 +134,21 @@ class CRM_Activity_Form_Task_RemoveFromTag extends CRM_Activity_Form_Task { list($total, $removed, $notRemoved) = CRM_Core_BAO_EntityTag::removeEntitiesFromTag($this->_activityHolderIds, $key, 'civicrm_activity'); - $status = array(ts('%count activities un-tagged', array('count' => $removed, 'plural' => '%count activities un-tagged'))); + $status = array( + ts('%count activity un-tagged', array( + 'count' => $removed, + 'plural' => '%count activities un-tagged', + )), + ); if ($notRemoved) { - $status[] = ts('1 activity already did not have this tag', array('count' => $notRemoved, 'plural' => '%count activities already did not have this tag')); + $status[] = ts('1 activity already did not have this tag', array( + 'count' => $notRemoved, + 'plural' => '%count activities already did not have this tag', + )); } $status = ''; CRM_Core_Session::setStatus($status, ts("Removed Tag %1", array(1 => $this->_tags[$key])), 'success', array('expires' => 0)); } } -} +}