-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsync.php
More file actions
44 lines (34 loc) · 858 Bytes
/
sync.php
File metadata and controls
44 lines (34 loc) · 858 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
$application = 'darkblog';
//define('PHAR', false);
//define('SQLITE', true);
error_reporting(E_ALL - E_NOTICE - E_DEPRECATED - E_WARNING);
ini_set('display_errors', 1);
mb_internal_encoding("UTF-8");
mb_regex_encoding('UTF-8');
require_once 'autoloader.php';
$autoloader = new libAutoloader();
require_once 'conf/conf.php';
require_once 'conf/db.php';
require_once 'conf/emercoin.conf.php';
try {
\darkblog\lib\emercoin::getinfo();
} catch (Exception $exc) {
$err = $exc->getMessage();
if(strpos($err, 'Connection refused') !== false) {
echo 'refused';
die();
}
else {
echo $err;
die();
}
}
$users = new \darkblog\objects\users();
$posts = new \darkblog\objects\posts();
$posts->clearAll();
$users->importUsers();
$posts->importPosts();
//echo ' POSTS OK ';
ob_clean();
echo 'OK';