X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fshadowupdate.php;h=5b0a1b94b0af3f9b530a36db860163d576f71667;hb=8c68a845230f89bf76e53571950a49eba99f98eb;hp=83a785fe1fdd88b3455685861354b27ad73d3594;hpb=d61a4a67db0ccd428ae5b5e870027d462e44e730;p=friendica.git diff --git a/include/shadowupdate.php b/include/shadowupdate.php index 83a785fe1f..5b0a1b94b0 100644 --- a/include/shadowupdate.php +++ b/include/shadowupdate.php @@ -5,20 +5,26 @@ 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); + } + + Config::load(); -Config::load(); + update_shadow_copy(); +} -update_shadow_copy(); -killme(); -?> +if (array_search(__file__,get_included_files())===0){ + shadowupdate_run($_SERVER["argv"],$_SERVER["argc"]); + killme(); +}