*
* @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'));
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(
foreach ($discount as $discountId => $setId) {
$copyPriceSet = &CRM_Price_BAO_Set::copy($setId);
-
+
$copyDiscount = &CRM_Core_DAO::copyGeneric(
'CRM_Core_DAO_Discount',
array(
$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]);
$priceField[$priceFieldBAO->id]['price'] = CRM_Utils_Array::value('amount', $optionValues);
}
-
+
$action = array_sum(array_keys($this->actionLinks()));
if ($this->_isSetReserved) {
$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',