fix strict notices from PHP 5.4
authorDonald A. Lobo <lobo@civicrm.org>
Wed, 20 Mar 2013 17:49:14 +0000 (10:49 -0700)
committerDonald A. Lobo <lobo@civicrm.org>
Thu, 21 Mar 2013 01:49:26 +0000 (18:49 -0700)
CRM/Activity/Form/Activity.php
CRM/Activity/Form/ActivityLinks.php

index 24338aa9870dacf93c0dc74c8099e4768e3b86b5..205d12616aeffe0f039fa4b6860bf322e5b76579 100644 (file)
@@ -647,7 +647,7 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
     }
 
     //build other activity links
-    CRM_Activity_Form_ActivityLinks::buildQuickForm();
+    CRM_Activity_Form_ActivityLinks::commonBuildQuickForm($this);
 
     //enable form element (ActivityLinks sets this true)
     $this->assign('suppressForm', FALSE);
index 38c9a282b62697b9efeea773f8c1cadd85c5d8a6..30c839eb1db8f64341955faafdb6e9700fff56e9 100644 (file)
  */
 class CRM_Activity_Form_ActivityLinks extends CRM_Core_Form {
   public function buildQuickForm() {
-    $contactId = CRM_Utils_Request::retrieve('cid', 'Positive', $this);
+    self::commonBuildQuickForm($this);
+  }
+
+  static function commonBuildQuickForm($self) {
+    $contactId = CRM_Utils_Request::retrieve('cid', 'Positive', $self);
     if (!$contactId) {
       $contactId = CRM_Utils_Request::retrieve('cid', 'Positive', CRM_Core_DAO::$_nullObject, FALSE, NULL, $_REQUEST);
     }
@@ -60,7 +64,7 @@ class CRM_Activity_Form_ActivityLinks extends CRM_Core_Form {
       'Text Message (SMS)',
       'label'
     );
-   
+
     if (CRM_Utils_Mail::validOutBoundMail() && $contactId) {
       list($name, $email, $doNotEmail, $onHold, $isDeseased) = CRM_Contact_BAO_Contact::getContactDetails($contactId);
       if (!$doNotEmail && $email && !$isDeseased) {
@@ -72,7 +76,7 @@ class CRM_Activity_Form_ActivityLinks extends CRM_Core_Form {
       // Check for existence of a mobile phone and ! do not SMS privacy setting
       $mobileTypeID = CRM_Core_OptionGroup::getValue('phone_type', 'Mobile', 'name');
       list($name, $phone, $doNotSMS) = CRM_Contact_BAO_Contact_Location::getPhoneDetails($contactId, $mobileTypeID);
-      
+
       if (!$doNotSMS && $phone) {
         $sendSMS = array($SMSId  => ts('Send SMS'));
         $activityTypes += $sendSMS;
@@ -106,10 +110,10 @@ class CRM_Activity_Form_ActivityLinks extends CRM_Core_Form {
       }
     }
 
-    $this->assign('activityTypes', $activityTypes);
-    $this->assign('urls', $urls);
+    $self->assign('activityTypes', $activityTypes);
+    $self->assign('urls', $urls);
 
-    $this->assign('suppressForm', TRUE);
+    $self->assign('suppressForm', TRUE);
   }
 }