-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Renamed Mailing Component entity #12728
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ | |
* @package CRM | ||
* @copyright CiviCRM LLC (c) 2004-2018 | ||
*/ | ||
class CRM_Mailing_BAO_Component extends CRM_Mailing_DAO_Component { | ||
class CRM_Mailing_BAO_Component extends CRM_Mailing_DAO_MailingComponent { | ||
|
||
/** | ||
* Class constructor. | ||
|
@@ -50,7 +50,7 @@ public function __construct() { | |
* @return CRM_Core_BAO_LocationType. | ||
*/ | ||
public static function retrieve(&$params, &$defaults) { | ||
$component = new CRM_Mailing_DAO_Component(); | ||
$component = new CRM_Mailing_BAO_Component(); | ||
$component->copyValues($params); | ||
if ($component->find(TRUE)) { | ||
CRM_Core_DAO::storeValues($component, $defaults); | ||
|
@@ -71,7 +71,7 @@ public static function retrieve(&$params, &$defaults) { | |
* true if we found and updated the object, else false | ||
*/ | ||
public static function setIsActive($id, $is_active) { | ||
return CRM_Core_DAO::setFieldValue('CRM_Mailing_DAO_Component', $id, 'is_active', $is_active); | ||
return CRM_Core_DAO::setFieldValue('CRM_Mailing_BAO_Component', $id, 'is_active', $is_active); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree. @pradpnayak can you update? |
||
} | ||
|
||
/** | ||
|
@@ -86,7 +86,7 @@ public static function setIsActive($id, $is_active) { | |
*/ | ||
public static function add(&$params, $ids = array()) { | ||
$id = CRM_Utils_Array::value('id', $params, CRM_Utils_Array::value('id', $ids)); | ||
$component = new CRM_Mailing_DAO_Component(); | ||
$component = new CRM_Mailing_BAO_Component(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto |
||
if ($id) { | ||
$component->id = $id; | ||
$component->find(TRUE); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we put the new DAO here - given the BAO needs renaming too but perhaps in a later iteration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. @pradpnayak can you update?