-
Notifications
You must be signed in to change notification settings - Fork 54
/
Copy pathupgrade.php
85 lines (81 loc) · 3.4 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
77
78
79
80
81
82
83
84
<?php
/*
* Copyright (c) Nicholas Mossor Rathmann <nicholas.rathmann@gmail.com> 2009-2011. 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');
HTMLOUT::frame_begin(false,false);
title("OBBLM upgrade script");
if (isset($_POST['version'])) {
$upgradeMsgs = upgrade_database($_POST['version'], array('lrb' => isset($_POST['lrb']) ? $_POST['lrb'] : false));
echo "<br><b><font color='green'>Finished</font></b>";
if (!empty($upgradeMsgs)) {
echo "<br><br><b>IMPORTANT</b>:<br><ul>";
echo array_strpack('<li>%s</li>', $upgradeMsgs, "\n");
echo "</ul>";
}
echo "<br><hr><br>";
}
?>
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><b>ALWAYS</b> 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 <i>previous</i> 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="096-097"></td>
<td>0.96 to 0.97</td>
<td><i>None</i></td>
</tr>
<tr>
<td><INPUT TYPE=RADIO NAME="version" VALUE="091-095"></td>
<td>0.91 to 0.95</td>
<td><i>None</i></td>
</tr>
<tr>
<td><INPUT TYPE=RADIO NAME="version" VALUE="090-091"></td>
<td>0.90 to 0.91</td>
<td><i>None</i></td>
</tr>
<tr>
<td><INPUT TYPE=RADIO NAME="version" VALUE="080-090"></td>
<td>0.80 to 0.90</td>
<td><i>None</i></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" onclick="if(!confirm('Please backup your current database if you have not done so already.\n\nAre you sure you wish to continue?')){return false;}">
</form>
<br>
<?php
HTMLOUT::dnt();
HTMLOUT::frame_end();