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