]> git.mxchange.org Git - friendica.git/blob - util/maintenance.php
Fix frio style.css indentation
[friendica.git] / util / maintenance.php
1 <?php
2
3 use \Friendica\Core\Config;
4
5 require_once("boot.php");
6
7 $a = new App;
8 @include(".htconfig.php");
9
10 $lang = get_browser_language();
11 load_translation_table($lang);
12
13 require_once("include/dba.php");
14 $db = new dba($db_host, $db_user, $db_pass, $db_data, false);
15 unset($db_host, $db_user, $db_pass, $db_data);
16
17 Config::load();
18
19 $maint_mode = 1;
20 if($argc > 1)
21         $maint_mode = intval($argv[1]);
22 set_config('system', 'maintenance', $maint_mode);
23
24 if($maint_mode)
25         $mode_str = "maintenance mode";
26 else
27         $mode_str = "normal mode";
28
29 echo "\n\tSystem set in $mode_str\n\n";
30 echo "Usage:\n\n";
31 echo "\tphp {$argv[0]} [1]\tSet the system in maintenance mode\n";
32 echo "\tphp {$argv[0]} 0  \tSet the system in normal mode\n\n";
33