-
Notifications
You must be signed in to change notification settings - Fork 16
/
cron.php
38 lines (32 loc) · 860 Bytes
/
cron.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/**
* Front controller for LiveCart scheduled tasks
*
* @author Integry Systems
*/
if (isset($_SERVER['REQUEST_URI']))
{
$_SERVER['REQUEST_URI'] = dirname($_SERVER['REQUEST_URI']) . '/';
}
else
{
// retrieve base URL from configuration
$url = include dirname(__file__) . '/storage/configuration/url.php';
$parsed = parse_url($url['url']);
$_SERVER['HTTP_HOST'] = $parsed['host'];
$_SERVER['REQUEST_URI'] = $parsed['path'];
$_SERVER['REWRITE'] = $url['rewrite'];
}
if (isset($_SERVER['REWRITE']) && !$_SERVER['REWRITE'])
{
$this->request->set('noRewrite', true);
// $app->getRouter()->enableURLRewrite($_SERVER['rewrite']);
}
include dirname(__file__) . '/application/Initialize.php';
$app = new LiveCart();
if (isset($_SERVER['REWRITE']))
{
// $app->getRouter()->enableURLRewrite($_SERVER['rewrite']);
}
$app->getCron()->process();
?>