Skip to content

Commit

Permalink
* Moved scheduled task launcher to loadSettings. I'm not 100% sure it…
Browse files Browse the repository at this point in the history
…'ll stay there though, as I had to add a SSI test before running it... Not very clean. For now, I'm just trying to shrink the index down to the bare minimum. (Load.php)
  • Loading branch information
Nao committed Mar 19, 2014
1 parent d5e9c81 commit 1910c57
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
17 changes: 16 additions & 1 deletion core/app/Load.php
Expand Up @@ -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()
Expand Down
14 changes: 2 additions & 12 deletions index.php
Expand Up @@ -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())
{
Expand Down

0 comments on commit 1910c57

Please sign in to comment.