-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcron-updater.php
More file actions
40 lines (30 loc) · 1.08 KB
/
cron-updater.php
File metadata and controls
40 lines (30 loc) · 1.08 KB
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
39
40
<?php
//Start the Session
session_start();
// Defines
define('ROOT_DIR', realpath(dirname(__FILE__)) .'/');
define('APP_DIR', ROOT_DIR .'src/');
define('LOG_DIR', ROOT_DIR.'logs/');
define('CACHE_DIR', ROOT_DIR.'cache/');
// Includes
require(APP_DIR .'config/config.php');
require(ROOT_DIR .'system/view.php');
require(ROOT_DIR .'system/pfp.php');
require(ROOT_DIR .'vendor/autoload.php');
// Initialize Propel with the runtime configuration
Propel::init(APP_DIR."build/conf/rss-reader-conf.php");
// Add the generated 'classes' directory to the include path
set_include_path(APP_DIR."build/classes" . PATH_SEPARATOR . get_include_path());
require(APP_DIR.'factories/CriteriaFactory.php');
function handleError($errno, $errstr, $errfile, $errline, array $errcontext)
{
// error was suppressed with the @-operator
if (0 === error_reporting()) {
return false;
}
throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
}
set_error_handler('handleError');
require (APP_DIR.'controllers/feed.php');
$feedController = new FeedController();
$feedController->updateAll();