fix notices and formatting fixes
authorDonald A. Lobo <lobo@civicrm.org>
Wed, 29 May 2013 17:30:32 +0000 (10:30 -0700)
committerDonald A. Lobo <lobo@civicrm.org>
Wed, 29 May 2013 17:41:22 +0000 (10:41 -0700)
CRM/Price/BAO/Set.php
CRM/Price/Page/Field.php

index e2c9e572797aefc458de4421e958e296e78ed73a..e7434dc3472dfe8e489d44d980ab6bb6f2502082 100644 (file)
@@ -980,10 +980,8 @@ WHERE  id = %1";
    *
    * @param int $sid the price set id
    */
-  function checkPermission($sid) {
-    if ($sid &&
-      self::eventPriceSetDomainID()
-    ) {
+  static function checkPermission($sid) {
+    if ($sid && self::eventPriceSetDomainID()) {
       $domain_id = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_Set', $sid, 'domain_id', 'id');
       if (CRM_Core_Config::domainID() != $domain_id) {
         CRM_Core_Error::fatal(ts('You do not have permission to access this page'));
@@ -1193,7 +1191,7 @@ WHERE       ps.id = %1
       if($isQuickConfig) {
         $copyPriceSet = &CRM_Price_BAO_Set::copy($priceSetId);
         CRM_Price_BAO_Set::addTo($baoName, $newId, $copyPriceSet->id);
-      } 
+      }
       else {
         $copyPriceSet = &CRM_Core_DAO::copyGeneric('CRM_Price_DAO_SetEntity',
           array(
@@ -1209,7 +1207,7 @@ WHERE       ps.id = %1
         foreach ($discount as $discountId => $setId) {
 
           $copyPriceSet = &CRM_Price_BAO_Set::copy($setId);
-        
+
           $copyDiscount = &CRM_Core_DAO::copyGeneric(
             'CRM_Core_DAO_Discount',
             array(
index f52f8f26cf09edd218cf42f2db63e2ef2440d980..4151ed7be7d87bb7a688049a0e3e2f7b22eb8817 100644 (file)
@@ -131,7 +131,7 @@ class CRM_Price_Page_Field extends CRM_Core_Page {
     $priceFieldBAO->price_set_id = $this->_sid;
     $priceFieldBAO->orderBy('weight, label');
     $priceFieldBAO->find();
-    
+
     while ($priceFieldBAO->fetch()) {
       $priceField[$priceFieldBAO->id] = array();
       CRM_Core_DAO::storeValues($priceFieldBAO, $priceField[$priceFieldBAO->id]);
@@ -145,7 +145,7 @@ class CRM_Price_Page_Field extends CRM_Core_Page {
 
         $priceField[$priceFieldBAO->id]['price'] = CRM_Utils_Array::value('amount', $optionValues);
       }
-         
+
       $action = array_sum(array_keys($this->actionLinks()));
 
       if ($this->_isSetReserved) {
@@ -243,7 +243,7 @@ class CRM_Price_Page_Field extends CRM_Core_Page {
       $this->assign('usedBy', $usedBy);
       $this->_isSetReserved= CRM_Core_DAO::getFieldValue('CRM_Price_DAO_Set', $this->_sid, 'is_reserved');
       $this->assign('isReserved', $this->_isSetReserved);
-      
+
       CRM_Price_BAO_Set::checkPermission($this->_sid);
       $comps = array(
         'Event' => 'civicrm_event',