Skip to content
Snippets Groups Projects
Commit 44c8822b authored by lobo's avatar lobo
Browse files

fix notices and formatting fixes

parent 496e07aa
No related branches found
No related tags found
No related merge requests found
......@@ -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(
......
......@@ -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',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment