Skip to content
Permalink
Browse files

! Moved some of the app_error_count logic around. I haven't seen sign…

…ificant improvements, but it makes more sense to me. (index.php, Subs-Template.php)

* Spacinazi. (index.template.php)
  • Loading branch information...
Nao committed Jul 22, 2017
1 parent ec916e4 commit 1937057ffbde8411931d6dfc39e66c1be09afac0
Showing with 6 additions and 13 deletions.
  1. +5 −6 core/app/Subs-Template.php
  2. +1 −1 core/html/index.template.php
  3. +0 −6 index.php
@@ -113,15 +113,14 @@ function obExit($start = null, $do_finish = null, $from_index = false, $from_fat
// Hand off the output to the portal, etc. we're integrated with.
call_hook('exit', array($do_finish));
if (!isset($settings['app_error_count']))
$settings['app_error_count'] = 0;
if (!empty($context['app_error_count']))
updateSettings(['app_error_count' => $settings['app_error_count'] + $context['app_error_count']]);
// Don't exit if we're coming from index.php; that will pass through normally.
if (!$from_index)
{
if (!isset($settings['app_error_count']))
$settings['app_error_count'] = 0;
if (!empty($context['app_error_count']))
updateSettings(['app_error_count' => $settings['app_error_count'] + $context['app_error_count']]);
exit;
}
}
/**
@@ -493,7 +493,7 @@ function template_insert_javascript()
echo '
we_script = "<URL>";
we_assets = "', ASSETS, '";', '
we_assets = "', ASSETS, '";
we_sessid = "', $context['session_id'], '";
we_sessvar = "', $context['session_var'], '";', $context['server']['iso_case_folding'] && isset($context['main_js_files']['sha1.js']) ? '
we_iso_case_folding = 1;' : '', empty($options['collapse_header']) ? '' : '
@@ -156,12 +156,6 @@
// I have only one thing to say to you... Bye!
obExit(null, null, true);
// Since we're not leaving obExit the special route, we need to make sure we update the error count.
if (!isset($settings['app_error_count']))
$settings['app_error_count'] = 0;
if (!empty($context['app_error_count']))
updateSettings(array('app_error_count' => $settings['app_error_count'] + $context['app_error_count']));
// Loads a named file from the app folder. Uses cache if possible.
// $source_name can be a string or an array of strings.
function loadSource($source_name)

0 comments on commit 1937057

Please sign in to comment.
You can’t perform that action at this time.