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