Skip to content

Commit 1ef8434

Browse files
committed
BAO - Noisily deprecate and stop using deprecated functions
1 parent 5cbdfc0 commit 1ef8434

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

CRM/Price/BAO/PriceFieldValue.php

+1
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ public static function deleteValues($fieldId) {
223223
* @return bool
224224
*/
225225
public static function del($id) {
226+
CRM_Core_Error::deprecatedFunctionWarning('deleteRecord');
226227
return (bool) self::deleteRecord(['id' => $id]);
227228
}
228229

CRM/Price/Form/Option.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -320,14 +320,12 @@ public function postProcess() {
320320
'label', 'id'
321321
);
322322

323-
if (CRM_Price_BAO_PriceFieldValue::del($this->_oid)) {
324-
CRM_Core_Session::setStatus(ts('%1 option has been deleted.', [1 => $label]), ts('Record Deleted'), 'success');
325-
}
323+
CRM_Price_BAO_PriceFieldValue::deleteRecord(['id' => $this->_oid]);
324+
CRM_Core_Session::setStatus(ts('%1 option has been deleted.', [1 => $label]), ts('Record Deleted'), 'success');
326325
return NULL;
327326
}
328327
else {
329328
$params = $this->controller->exportValues('Option');
330-
$fieldLabel = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceField', $this->_fid, 'label');
331329

332330
foreach ($this->_moneyFields as $field) {
333331
$params[$field] = CRM_Utils_Rule::cleanMoney(trim($params[$field]));

0 commit comments

Comments
 (0)