diff --git a/core/app/Load.php b/core/app/Load.php index 654294d7..1ab1344a 100644 --- a/core/app/Load.php +++ b/core/app/Load.php @@ -254,8 +254,23 @@ function loadSettings() // Call pre-load hook functions. call_hook('pre_load'); - // Sanitize and harmonize URL variables. + // Sanitize and normalize URL variables. cleanRequest(); + + if (WEDGE == 'SSI') + return; + + // Before we get carried away, are we doing a scheduled task? If so save CPU cycles by jumping out! + if (isset($_GET['scheduled'])) + { + loadSource('ScheduledTasks'); + AutoTask(); + } + elseif (isset($_GET['imperative'])) + { + loadSource('Subs-Scheduled'); + ImperativeTask(); + } } function can_shell_exec() diff --git a/index.php b/index.php index fff8ba96..fedf57f8 100644 --- a/index.php +++ b/index.php @@ -78,20 +78,10 @@ upgrade_db(); } -// Load the actions and database settings, and perform operations like optimizing. +// Load the actions and database settings, and perform operations +// like optimizing or running scheduled tasks. loadSettings(); -// Before we get carried away, are we doing a scheduled task? If so save CPU cycles by jumping out! -if (isset($_GET['scheduled'])) -{ - loadSource('ScheduledTasks'); - AutoTask(); -} -elseif (isset($_GET['imperative'])) -{ - loadSource('Subs-Scheduled'); - ImperativeTask(); -} if (!headers_sent()) {