Skip to content
165 changes: 90 additions & 75 deletions admin_pages/events/Events_Admin_Page.core.php

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -1093,13 +1093,13 @@ public function espresso_event_months_dropdown()
{
// what we need to do is get all PRIMARY datetimes for all events to filter on.
// Note we need to include any other filters that are set!
$status = isset($this->_req_data['status']) ? $this->_req_data['status'] : null;
$status = isset($this->_req_data['status']) ? $this->_req_data['status'] : '';
// categories?
$category = isset($this->_req_data['EVT_CAT']) && $this->_req_data['EVT_CAT'] > 0
? $this->_req_data['EVT_CAT']
: null;
: '';
// active status?
$active_status = isset($this->_req_data['active_status']) ? $this->_req_data['active_status'] : null;
$active_status = isset($this->_req_data['active_status']) ? $this->_req_data['active_status'] : '';
$cur_date = isset($this->_req_data['month_range']) ? $this->_req_data['month_range'] : '';
return EEH_Form_Fields::generate_event_months_dropdown($cur_date, $status, $category, $active_status);
}
Expand All @@ -1126,6 +1126,7 @@ public function active_status_dropdown($current_value = '')
}



/**
* returns a list of "venues"
*
Expand Down
2 changes: 1 addition & 1 deletion core/EE_Data_Mapper.core.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class EE_Data_Mapper
*
* @private _instance
*/
private static $_instance = null;
private static $_instance;


public $data = array();
Expand Down
2 changes: 1 addition & 1 deletion core/EE_Data_Migration_Manager.core.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class EE_Data_Migration_Manager implements ResettableInterface
* @var EE_Data_Migration_Manager $_instance
* @access private
*/
private static $_instance = null;
private static $_instance;


/**
Expand Down
6 changes: 2 additions & 4 deletions core/EE_Deprecated.core.php
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ function ee_deprecated_update_attendee_registration_form_old($admin_page)
foreach ($qstns as $QST_ID => $qstn) {
// if $qstn isn't an array then it doesn't already have an answer, so let's create the answer
if (! is_array($qstn)) {
$success = $this->_save_new_answer($REG_ID, $QST_ID, $qstn);
$success = EE_Answer::new_instance([ 'QST_ID' => $QST_ID, 'REG_ID' => $REG_ID ]);
continue;
}

Expand Down Expand Up @@ -463,9 +463,7 @@ function ee_deprecated_reg_questions_meta_box_old($do_default_action, $admin_pag

$question_groups = EEM_Event::instance()->assemble_array_of_groups_questions_and_options(
$registration,
$registration->get(
'EVT_ID'
)
$registration->get('EVT_ID')
);

EE_Registry::instance()->load_helper('Form_Fields');
Expand Down
2 changes: 2 additions & 0 deletions core/EE_Registry.core.php
Original file line number Diff line number Diff line change
Expand Up @@ -1625,6 +1625,8 @@ public static function reset($hard = false, $reinstantiate = true, $reset_models
$instance->_cache_on = true;
// reset some "special" classes
EEH_Activation::reset();
EEH_DTT_Helper::resetDefaultTimezoneString();

$hard = apply_filters('FHEE__EE_Registry__reset__hard', $hard);
$instance->CFG = EE_Config::reset($hard, $reinstantiate);
$instance->CART = null;
Expand Down
89 changes: 48 additions & 41 deletions core/business/EE_Transaction_Processor.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ private function _set_registration_query_params($registration_query_params)
* @param array $registration_query_params array of query WHERE params to use
* when retrieving cached registrations from a transaction
* @return boolean
* @throws \EE_Error
* @throws EE_Error
* @throws ReflectionException
*/
public function manually_update_registration_statuses(
EE_Transaction $transaction,
Expand Down Expand Up @@ -127,7 +128,7 @@ public function manually_update_registration_statuses(
* @param array $registration_query_params array of query WHERE params to use
* when retrieving cached registrations from a transaction
* @return boolean
* @throws \EE_Error
* @throws EE_Error
*/
public function toggle_registration_statuses_for_default_approved_events(
EE_Transaction $transaction,
Expand Down Expand Up @@ -155,7 +156,7 @@ public function toggle_registration_statuses_for_default_approved_events(
* @param array $registration_query_params array of query WHERE params to use
* when retrieving cached registrations from a transaction
* @return boolean
* @throws \EE_Error
* @throws EE_Error
*/
public function toggle_registration_statuses_if_no_monies_owing(
EE_Transaction $transaction,
Expand All @@ -179,21 +180,22 @@ public function toggle_registration_statuses_if_no_monies_owing(
* update_transaction_and_registrations_after_checkout_or_payment
* cycles thru related registrations and calls update_registration_after_checkout_or_payment() on each
*
* @param EE_Transaction $transaction
* @param \EE_Payment | NULL $payment
* @param array $registration_query_params array of query WHERE params to use
* @param EE_Transaction $transaction
* @param EE_Payment | NULL $payment
* @param array $registration_query_params array of query WHERE params to use
* when retrieving cached registrations from a transaction
* @param bool $trigger_notifications whether or not to call
* @param bool $trigger_notifications whether or not to call
* \EE_Registration_Processor::trigger_registration_update_notifications()
* @return array
* @throws \EE_Error
* @throws EE_Error
* @throws ReflectionException
*/
public function update_transaction_and_registrations_after_checkout_or_payment(
EE_Transaction $transaction,
$payment = null,
$registration_query_params = array(),
$trigger_notifications = true
) {
): array {
// make sure some query params are set for retrieving registrations
$this->_set_registration_query_params($registration_query_params);
// get final reg step status
Expand Down Expand Up @@ -244,11 +246,12 @@ public function update_transaction_and_registrations_after_checkout_or_payment(
* readjusts TXN and Line Item totals after a registration is changed from
* cancelled or declined to another reg status such as pending payment or approved
*
* @param \EE_Registration $registration
* @param array $closed_reg_statuses
* @param bool $update_txn
* @param EE_Registration $registration
* @param array $closed_reg_statuses
* @param bool $update_txn
* @return bool
* @throws \EE_Error
* @throws EE_Error
* @throws ReflectionException
*/
public function update_transaction_after_reinstating_canceled_registration(
EE_Registration $registration,
Expand Down Expand Up @@ -297,11 +300,12 @@ public function update_transaction_after_reinstating_canceled_registration(
* update_transaction_after_canceled_or_declined_registration
* readjusts TXN and Line Item totals after a registration is cancelled or declined
*
* @param \EE_Registration $registration
* @param array $closed_reg_statuses
* @param bool $update_txn
* @param EE_Registration $registration
* @param array $closed_reg_statuses
* @param bool $update_txn
* @return bool
* @throws \EE_Error
* @throws EE_Error
* @throws ReflectionException
*/
public function update_transaction_after_canceled_or_declined_registration(
EE_Registration $registration,
Expand Down Expand Up @@ -381,10 +385,11 @@ public function get_transaction_for_registration(EE_Registration $registration)
* get_ticket_line_item_for_transaction_registration
*
* @access public
* @param EE_Transaction $transaction
* @param EE_Registration $registration
* @param EE_Transaction $transaction
* @param EE_Registration $registration
* @return EE_Line_Item
* @throws EE_Error
* @throws ReflectionException
*/
public function get_ticket_line_item_for_transaction_registration(
EE_Transaction $transaction,
Expand Down Expand Up @@ -466,8 +471,9 @@ public function toggle_transaction_status_if_all_registrations_canceled_or_decli
* @param array $registration_query_params array of query WHERE params to use
* when retrieving cached registrations from a transaction
* @param string $additional_param
* @throws \EE_Error
* @return boolean
* @throws ReflectionException
* @throws EE_Error
*/
private function _call_method_on_registrations_via_Registration_Processor(
$method_name,
Expand Down Expand Up @@ -511,9 +517,10 @@ private function _call_method_on_registrations_via_Registration_Processor(
* the first active Payment Method
* whichever is found first.
*
* @param EE_Registration $edited_registration
* @param EE_Registration $edited_registration
* @return void
* @throws \EE_Error
* @throws EE_Error
* @throws ReflectionException
*/
public function set_transaction_payment_method_based_on_registration_statuses(
EE_Registration $edited_registration
Expand Down Expand Up @@ -817,12 +824,12 @@ public function final_reg_step_completed(EE_Transaction $transaction)
* set_reg_step_initiated
* given a valid TXN_reg_step, this sets it's value to a unix timestamp
*
* @param EE_Transaction $transaction
* @param string $reg_step_slug
* @return boolean
* @throws EE_Error*@throws ReflectionException
* @deprecated 4.9.12
* @access public
* @param \EE_Transaction $transaction
* @param string $reg_step_slug
* @return boolean
* @throws \EE_Error
*/
public function set_reg_step_initiated(EE_Transaction $transaction, $reg_step_slug)
{
Expand All @@ -843,12 +850,12 @@ public function set_reg_step_initiated(EE_Transaction $transaction, $reg_step_sl
* set_reg_step_completed
* given a valid TXN_reg_step, this sets the step as completed
*
* @param EE_Transaction $transaction
* @param string $reg_step_slug
* @return boolean
* @throws EE_Error*@throws ReflectionException
* @deprecated 4.9.12
* @access public
* @param \EE_Transaction $transaction
* @param string $reg_step_slug
* @return boolean
* @throws \EE_Error
*/
public function set_reg_step_completed(EE_Transaction $transaction, $reg_step_slug)
{
Expand All @@ -869,12 +876,12 @@ public function set_reg_step_completed(EE_Transaction $transaction, $reg_step_sl
* set_reg_step_completed
* given a valid TXN_reg_step slug, this sets the step as NOT completed
*
* @param EE_Transaction $transaction
* @param string $reg_step_slug
* @return boolean
* @throws EE_Error*@throws ReflectionException
* @deprecated 4.9.12
* @access public
* @param \EE_Transaction $transaction
* @param string $reg_step_slug
* @return boolean
* @throws \EE_Error
*/
public function set_reg_step_not_completed(EE_Transaction $transaction, $reg_step_slug)
{
Expand All @@ -896,11 +903,11 @@ public function set_reg_step_not_completed(EE_Transaction $transaction, $reg_ste
* given a valid TXN_reg_step slug, this will remove (unset)
* the reg step from the TXN reg step array
*
* @deprecated 4.9.12
* @access public
* @param \EE_Transaction $transaction
* @param string $reg_step_slug
* @param EE_Transaction $transaction
* @param string $reg_step_slug
* @return void
*@deprecated 4.9.12
* @access public
*/
public function remove_reg_step(EE_Transaction $transaction, $reg_step_slug)
{
Expand All @@ -922,11 +929,11 @@ public function remove_reg_step(EE_Transaction $transaction, $reg_step_slug)
* upgrades a TXNs status from failed to abandoned,
* meaning that contact information has been captured for at least one registrant
*
* @deprecated 4.9.12
* @access public
* @param EE_Transaction $transaction
* @return boolean
* @throws \EE_Error
* @throws EE_Error*@throws ReflectionException
* @deprecated 4.9.12
* @access public
*/
public function toggle_failed_transaction_status(EE_Transaction $transaction)
{
Expand Down
Loading