Skip to content

Instantly share code, notes, and snippets.

@creitve
Created December 30, 2015 08:26
Show Gist options
  • Save creitve/eccd86fab7415cef41b6 to your computer and use it in GitHub Desktop.
Save creitve/eccd86fab7415cef41b6 to your computer and use it in GitHub Desktop.
diff --git a/app/functions/fn.ultimate.php b/app/functions/fn.ultimate.php
index 51641da..f06ba6c 100644
--- a/app/functions/fn.ultimate.php
+++ b/app/functions/fn.ultimate.php
@@ -2880,7 +2880,15 @@ function fn_ult_update_status_pre(&$status, &$status_data, &$type, &$lang_code,
function fn_ult_get_statuses_post(&$statuses, &$join, &$condition, &$type, &$status_to_select, &$additional_statuses, &$exclude_parent, &$lang_code, &$company_id)
{
- $_company_id = $company_id ?: Registry::get('runtime.forced_company_id') ?: Registry::get('runtime.company_id');
+ $_company_id = $company_id;
+ if (!$_company_id) {
+ if (Registry::get('runtime.simple_ultimate')){
+ $_company_id = Registry::get('runtime.forced_company_id');
+ } else {
+ $_company_id = Registry::get('runtime.company_id');
+ }
+ }
+
if ($_company_id) {
$data = db_get_hash_array("SELECT status,email_subj,email_header FROM ?:ult_status_descriptions WHERE type = ?s AND company_id = ?i AND lang_code = ?s", 'status', $type, $_company_id, $lang_code);
foreach ($data as $status => $status_data) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment