r1194: Lots of changes to get the internals of the rename to work
[bugdar.git] / install / upgrade5.php
1 <?php
2 /*=====================================================================*\
3 || ###################################################################
4 || # Bugdar [#]version[#]
5 || # Copyright ©2002-[#]year[#] Blue Static
6 || #
7 || # This program is free software; you can redistribute it and/or modify
8 || # it under the terms of the GNU General Public License as published by
9 || # the Free Software Foundation; version [#]gpl[#] of the License.
10 || #
11 || # This program is distributed in the hope that it will be useful, but
12 || # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 || # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 || # more details.
15 || #
16 || # You should have received a copy of the GNU General Public License along
17 || # with this program; if not, write to the Free Software Foundation, Inc.,
18 || # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 || ###################################################################
20 \*=====================================================================*/
21
22 define('STOP_MARK', 2);
23 define('ACTIVE_SITE', 'upgrade5.php');
24
25 require_once('./global.php');
26 require_once('./includes/functions_datastore.php');
27
28 page_start();
29
30 // ###################################################################
31
32 if ($bugsys->in['mark'] == 0)
33 {
34 ?>
35 <h1>Welcome to Bugdar</h1>
36
37 <p>This upgrade will take from Bugdar 1.1.0 Release Candidate 1 to Bugdar 1.1.0 (final).</p>
38
39 <p>Not much has to be done, we just have a quick rename and version number change.</p>
40
41 <p>To begin the process, please click the button below.</p>
42 <?php
43 }
44
45 // ###################################################################
46
47 if ($bugsys->in['mark'] == 1)
48 {
49 ?>
50 <h1>Rename Automatic Actions</h1>
51
52 <p>Simply for aesthetic's sake, we've ranamed "Automatic Actions" to "Automations." This does all the necessary database changes to make that rename work internally.</p>
53 <?php
54
55 $db->query("ALTER TABLE " . TABLE_PREFIX . "autoaction RENAME " . TABLE_PREFIX . "automation");
56 echo "Renaming datbase table<br />\n";
57
58 $db->query("DELETE FROM " . TABLE_PREFIX . "datastore WHERE title = 'autoaction'");
59 echo "Clearing old datastore information<br />\n";
60
61 build_automations();
62 echo "Rebuilding the automations cahce<br />\n";
63 }
64
65 // ###################################################################
66
67 if ($bugsys->in['mark'] == 2)
68 {
69 ?>
70 <h1>Version Number Change</h1>
71
72 <p>This step finishes the upgrade by inreasing your version number.</p>
73
74 <?php
75
76 require_once('./includes/settings.php');
77
78 $db->query("UPDATE " . TABLE_PREFIX . "setting SET value = '1.1.0' WHERE varname = 'trackerversion'");
79
80 build_settings();
81
82 ?>
83
84 ... done.
85
86 <?php
87 }
88
89 // ###################################################################
90
91 page_end();
92
93 /*=====================================================================*\
94 || ###################################################################
95 || # $HeadURL$
96 || # $Id$
97 || ###################################################################
98 \*=====================================================================*/
99 ?>