-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupgrade.php
76 lines (70 loc) · 2.72 KB
/
upgrade.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
/*
* Copyright (c) Nicholas Mossor Rathmann <[email protected]> 2009-2010. All Rights Reserved.
*
*
* This file is part of OBBLM.
*
* OBBLM is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* OBBLM 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. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
define('T_NO_STARTUP', true);
require('header.php');
?>
<html>
<head>
</head>
<body>
<br>
<big>
<center>
<b>OBBLM MySQL upgrade script</b>
</center>
</big>
<br>
<small>
<?php
if (isset($_POST['version'])) {
echo ($upgradeMsgs = upgrade_database($_POST['version'], array('lrb' => isset($_POST['lrb']) ? $_POST['lrb'] : false)))
? "<br><b><font color='green'>Done</font></b>"
: "<br><b><font color='red'>Error</font></b>";
echo "<br><br><b>IMPORTANT</b>:<br><ul>";
echo array_strpack('<li>%s</li>', $upgradeMsgs, "\n");
echo "</ul><br><hr>";
}
?>
Please make sure that the MySQL user and database you have specified in <i>settings.php</i> exist and are valid AND that the rules fields of the old settings file are consistant with the new settings file for those fields which are common.<br><br>
Now, click the appropriate SQL code to run depending on the version upgrade you are doing.<br><br>
<b>Please note:</b>
<ul>
<li>ALWAYS make sure you have a backup/dump of your OBBLM database before running the upgrade script.</li>
<li>If upgrading across two or more versions simply run the SQL code for the next version, one after the other until the latest version is reached.</li>
<li>If upgrading <i>from</i> versions previous of v. 0.75 you must consult the <i>INSTALL</i> file and run the listed SQL queries <u>manually</u>.</li>
</ul>
<br>
<form method="POST">
<table border='1' style='font-size:small; mergin: 5px;'>
<tr style='font-weight:bold;'><td></td><td>Version upgrade</td><td>Required upgrade parameters</td></tr>
<tr>
<td><INPUT TYPE=RADIO NAME="version" VALUE="075-080"></td>
<td>0.75 to 0.80</td>
<td>The <u>current</u> 0.75 LRB used is: LRB5<INPUT TYPE=RADIO NAME="lrb" VALUE="5"> LRB5b/LRB6x<INPUT TYPE=RADIO NAME="lrb" VALUE="6x"></td>
</tr>
</table>
<br>
<input type="submit" name='submit' value="Run upgrade SQLs">
</form>
</small>
</body>
</html>