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