Move App to src
[friendica.git/.git] / include / shadowupdate.php
1 <?php
2
3 use Friendica\App;
4 use Friendica\Core\Config;
5
6 require_once("boot.php");
7 require_once("include/threads.php");
8
9 function shadowupdate_run(&$argv, &$argc){
10         global $a, $db;
11
12         if (is_null($a)) {
13                 $a = new App;
14         }
15
16         if (is_null($db)) {
17                 @include(".htconfig.php");
18                 require_once("include/dba.php");
19                 $db = new dba($db_host, $db_user, $db_pass, $db_data);
20                 unset($db_host, $db_user, $db_pass, $db_data);
21         }
22
23         Config::load();
24
25         update_shadow_copy();
26 }
27
28 if (array_search(__file__,get_included_files())===0){
29         shadowupdate_run($_SERVER["argv"],$_SERVER["argc"]);
30         killme();
31 }