]> git.mxchange.org Git - friendica.git/blobdiff - include/shadowupdate.php
Revert unneeded changes in third-party libraries
[friendica.git] / include / shadowupdate.php
index e003edea1701bd29eeb0995c3b68cd41038df6a7..5b0a1b94b0af3f9b530a36db860163d576f71667 100644 (file)
@@ -1,24 +1,30 @@
 <?php
+
+use \Friendica\Core\Config;
+
 require_once("boot.php");
 require_once("include/threads.php");
 
-global $a, $db;
+function shadowupdate_run(&$argv, &$argc){
+       global $a, $db;
 
-if(is_null($a))
-       $a = new App;
+       if (is_null($a)) {
+               $a = new App;
+       }
 
-if(is_null($db)) {
-       @include(".htconfig.php");
-       require_once("include/dba.php");
-       $db = new dba($db_host, $db_user, $db_pass, $db_data);
-       unset($db_host, $db_user, $db_pass, $db_data);
-}
+       if (is_null($db)) {
+               @include(".htconfig.php");
+               require_once("include/dba.php");
+               $db = new dba($db_host, $db_user, $db_pass, $db_data);
+               unset($db_host, $db_user, $db_pass, $db_data);
+       }
 
-$a->start_process();
+       Config::load();
 
-load_config('config');
-load_config('system');
+       update_shadow_copy();
+}
 
-update_shadow_copy();
-killme();
-?>
+if (array_search(__file__,get_included_files())===0){
+       shadowupdate_run($_SERVER["argv"],$_SERVER["argc"]);
+       killme();
+}