X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FContribute%2FBAO%2FManagePremiums.php;h=b0ada9e03a7971eeb25a02cc686ccec50081ef8c;hb=1817e748ccf09fb18d5e66b8825f6ef32dd4a3aa;hp=4408c2824d97c636b5c322414618bbe1426c8e89;hpb=a5d44edbee5498fa4195c5f3571db6b820185fa8;p=civicrm-core.git diff --git a/CRM/Contribute/BAO/ManagePremiums.php b/CRM/Contribute/BAO/ManagePremiums.php index 4408c2824d..b0ada9e03a 100644 --- a/CRM/Contribute/BAO/ManagePremiums.php +++ b/CRM/Contribute/BAO/ManagePremiums.php @@ -1,7 +1,7 @@ copyValues($params); if ($premium->find(TRUE)) { @@ -72,15 +68,17 @@ class CRM_Contribute_BAO_ManagePremiums extends CRM_Contribute_DAO_Product { } /** - * update the is_active flag in the db + * Update the is_active flag in the db. * - * @param int $id id of the database record - * @param boolean $is_active value we want to set the is_active field + * @param int $id + * Id of the database record. + * @param bool $is_active + * Value we want to set the is_active field. * - * @return Object DAO object on sucess, null otherwise - * @static + * @return Object + * DAO object on sucess, null otherwise */ - static function setIsActive($id, $is_active) { + public static function setIsActive($id, $is_active) { if (!$is_active) { $dao = new CRM_Contribute_DAO_PremiumsProduct(); $dao->product_id = $id; @@ -90,17 +88,17 @@ class CRM_Contribute_BAO_ManagePremiums extends CRM_Contribute_DAO_Product { } /** - * function to add the financial types + * add the financial types. * - * @param array $params reference array contains the values submitted by the form - * @param array $ids reference array contains the id + * @param array $params + * Reference array contains the values submitted by the form. + * @param array $ids + * Reference array contains the id. * - * @access public - * @static * * @return object */ - static function add(&$params, &$ids) { + public static function add(&$params, &$ids) { // CRM-14283 - strip protocol and domain from image URLs $image_type = array('image', 'thumbnail'); foreach ($image_type as $key) { @@ -131,13 +129,11 @@ class CRM_Contribute_BAO_ManagePremiums extends CRM_Contribute_DAO_Product { } /** - * Function to delete premium Types + * Delete premium Types. * * @param int $productID - * @static */ - - static function del($productID) { + public static function del($productID) { //check dependencies $premiumsProduct = new CRM_Contribute_DAO_PremiumsProduct(); $premiumsProduct->product_id = $productID; @@ -148,10 +144,10 @@ class CRM_Contribute_BAO_ManagePremiums extends CRM_Contribute_DAO_Product { return CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/admin/contribute/managePremiums', 'reset=1&action=browse')); } - //delete from financial Type table + //delete from financial Type table $premium = new CRM_Contribute_DAO_Product(); $premium->id = $productID; $premium->delete(); } -} +}