Skip to content
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

Deprecated code removal #25710

Merged
merged 1 commit into from
Mar 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions CRM/Event/BAO/Participant.php
Original file line number Diff line number Diff line change
Expand Up @@ -552,23 +552,6 @@ public static function priceSetOptionsCount(
return $optionsCount;
}

/**
* Get the empty spaces for event those we can allocate
* to pending participant to become confirm.
*
* @deprecated
*
* @param int $eventId
* Event id.
*
* @return int
* $spaces Number of Empty Seats/null.
*/
public static function pendingToConfirmSpaces($eventId) {
CRM_Core_Error::deprecatedFunctionWarning('CRM_Event_BAO_Participant::eventFull');
return CRM_Event_BAO_Participant::eventFull($eventId, TRUE, FALSE, TRUE, FALSE, TRUE);
}

/**
* Combine all the importable fields from the lower levels object.
*
Expand Down
8 changes: 1 addition & 7 deletions CRM/Event/Form/Participant.php
Original file line number Diff line number Diff line change
Expand Up @@ -979,9 +979,6 @@ public function submit($params) {
if (!empty($params['contact_id'])) {
$this->_contactID = $this->_contactId = $params['contact_id'];
}
if (!$this->_priceSetId && $this->_isPaidEvent) {
CRM_Core_Error::deprecatedFunctionWarning('this should never be true, handling to be removed');
}
if ($this->_priceSetId && $isQuickConfig = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceSet', $this->_priceSetId, 'is_quick_config')) {
$this->_quickConfig = $isQuickConfig;
}
Expand Down Expand Up @@ -1797,10 +1794,7 @@ protected function preparePaidEventProcessing($params): array {
//re-enter the values for UPDATE mode
$params['fee_level'] = $params['amount_level'] = $this->getParticipantValue('fee_level');
$params['fee_amount'] = $this->getParticipantValue('fee_amount');
if (isset($params['priceSetId'])) {
CRM_Core_Error::deprecatedFunctionWarning('It seems this line is never hit & can go.');
$lineItem[0] = CRM_Price_BAO_LineItem::getLineItems($this->_id);
}

//also add additional participant's fee level/priceset
if (CRM_Event_BAO_Participant::isPrimaryParticipant($this->_id)) {
$additionalIds = CRM_Event_BAO_Participant::getAdditionalParticipantIds($this->_id);
Expand Down
60 changes: 0 additions & 60 deletions CRM/Utils/PDF/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,66 +109,6 @@ public static function html2pdf($text, $fileName = 'civicrm.pdf', $output = FALS
}
}

/**
* Convert html to tcpdf.
*
* @deprecated
* @param $paper_size
* @param $orientation
* @param $margins
* @param $html
* @param $output
* @param $fileName
* @param $stationery_path
*/
public static function _html2pdf_tcpdf($paper_size, $orientation, $margins, $html, $output, $fileName, $stationery_path) {
CRM_Core_Error::deprecatedFunctionWarning('CRM_Utils_PDF::_html2pdf_dompdf');
return self::_html2pdf_dompdf($paper_size, $orientation, $margins, $html, $output, $fileName);
// Documentation on the TCPDF library can be found at: http://www.tcpdf.org
// This function also uses the FPDI library documented at: http://www.setasign.com/products/fpdi/about/
// Syntax borrowed from https://github.com/jake-mw/CDNTaxReceipts/blob/master/cdntaxreceipts.functions.inc
require_once 'tcpdf/tcpdf.php';
// This library is only in the 'packages' area as of version 4.5
require_once 'FPDI/fpdi.php';

$paper_size_arr = [$paper_size[2], $paper_size[3]];

$pdf = new TCPDF($orientation, 'pt', $paper_size_arr);
$pdf->Open();

if (is_readable($stationery_path)) {
$pdf->SetStationery($stationery_path);
}

$pdf->SetAuthor('');
$pdf->SetKeywords('CiviCRM.org');
$pdf->setPageUnit($margins[0]);
$pdf->SetMargins($margins[4], $margins[1], $margins[2], TRUE);

$pdf->setJPEGQuality('100');
$pdf->SetAutoPageBreak(TRUE, $margins[3]);

$pdf->AddPage();

$ln = TRUE;
$fill = FALSE;
$reset_parm = FALSE;
$cell = FALSE;
$align = '';

// output the HTML content
$pdf->writeHTML($html, $ln, $fill, $reset_parm, $cell, $align);

// reset pointer to the last page
$pdf->lastPage();

// close and output the PDF
$pdf->Close();
$pdf_file = 'CiviLetter' . '.pdf';
$pdf->Output($pdf_file, 'D');
CRM_Utils_System::civiExit();
}

/**
* @param $paper_size
* @param $orientation
Expand Down
4 changes: 2 additions & 2 deletions CRM/Utils/System.php
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,7 @@ public static function checkPHPVersion($ver = 5, $abort = TRUE) {
* Encode url.
*
* @param string $url
*
* @deprecated
* @return null|string
*/
public static function urlEncode($url) {
Expand Down Expand Up @@ -1596,7 +1596,7 @@ public static function baseCMSURL() {
* Given a URL, return a relative URL if possible.
*
* @param string $url
*
* @deprecated
* @return string
*/
public static function relativeURL($url) {
Expand Down