-
-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathloader.inc.php
More file actions
28 lines (23 loc) · 653 Bytes
/
Copy pathloader.inc.php
File metadata and controls
28 lines (23 loc) · 653 Bytes
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
<?php
// static imports
require_once(__DIR__.'/conf.php');
require_once(__DIR__.'/lib/Tools.php');
// dynamic class imports
spl_autoload_register(function ($class) {
$file = str_replace('\\', DIRECTORY_SEPARATOR, $class).'.class.php';
$filePath = __DIR__.'/lib/'.$file;
if(file_exists($filePath)) {
require_once($filePath);
return true;
}
return false;
});
// global database handle object
$db = new DatabaseController();
// load extensions
$ext = new ExtensionController();
// housekeeping without cron
if($db->settings->get('do-housekeeping-by-web-requests')) {
$houseKeeping = new HouseKeeping($db, $ext);
$houseKeeping->cleanup();
}