} if ($result) { fn_set_notification('N', __('notice'), $msg); } else { fn_set_notification('E', __('error'), __('error_status_not_changed'), 'I'); } return array(CONTROLLER_STATUS_REDIRECT, 'companies.manage'); } } if ($mode == 'delete') { fn_delete_company($_REQUEST['company_id']); return array(CONTROLLER_STATUS_REDIRECT, 'companies.manage'); } if ($mode == 'update_status') { $notification = !empty($_REQUEST['notify_user']) && $_REQUEST['notify_user'] == 'Y'; if (fn_change_company_status($_REQUEST['id'], $_REQUEST['status'], '', $status_from, false, $notification)) { fn_set_notification('N', __('notice'), __('status_changed')); } else { fn_set_notification('E', __('error'), __('error_status_not_changed')); Tygh::$app['ajax']->assign('return_status', $status_from); } if (!empty($_REQUEST['return_url'])) { return array(CONTROLLER_STATUS_REDIRECT, $_REQUEST['return_url']); } exit; } if ($mode == 'payout_delete' && !Registry::get('runtime.company_id')) { fn_companies_delete_payout($_REQUEST['payout_id']); } return array(CONTROLLER_STATUS_OK, 'companies' . $suffix); }
/** * @deprecated since 4.3.6 */ function fn_companies_change_status($company_id, $status_to, $reason = '', &$status_from = '', $skip_query = false, $notify = true) { Development::deprecated("The function fn_companies_change_status() is deprecated. Use fn_change_company_status() instead."); return fn_change_company_status($company_id, $status_to, $reason, $status_from, $skip_query, $notify); }