-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathforce_update.php
executable file
·54 lines (46 loc) · 1.37 KB
/
force_update.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#! /usr/bin/php -q
<?php
/**
* force_update.php
*
* Copyright (C) 2008-2023 Null Team
*
* This software is distributed under multiple licenses;
* see the COPYING file in the main directory for licensing
* information for this specific distribution.
*
* This use of this software may be subject to additional restrictions.
* See the LEGAL file in the main directory for details.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
?>
<?php
/*
* To use make symlink to it from main project directory (it can't be run from this directory)
*
* >> ln -s ansql/force_update.php force_update.php
* >> ./force_update.php
*/
require_once ('ansql/lib.php');
require_once ('ansql/framework.php');
include_classes();
require_once ('ansql/set_debug.php');
$stdout = (php_sapi_name() == 'cli') ? 'php://stdout' : 'web';
if (isset($logs_in)) {
if (is_array($logs_in)) {
if (!in_array($stdout,$logs_in))
$logs_in[] = $stdout;
} elseif ($logs_in!=$stdout)
$logs_in = array($logs_in, $stdout);
} else
$logs_in = $stdout;
$res = Model::updateAll();
if ($res)
Debug::Output("Succesfully performed sql structure update.");
// Error is printed from framework
//else
// Debug::Output("Errors update sql structure. Please see above messages.");
?>