- Update the copyright notices to use the correct year and not a non-ASCII symbol
[bugdar.git] / install / upgrade13.php
1 <?php
2 /*=====================================================================*\
3 || ###################################################################
4 || # Bugdar
5 || # Copyright (c)2004-2008 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 2 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', 'upgrade13.php');
24
25 require_once('./global.php');
26 require_once('./includes/functions_datastore.php');
27
28 page_start();
29
30 // ###################################################################
31
32 if ($input->in['mark'] == 0)
33 {
34 ?>
35 <h1>Welcome to Bugdar</h1>
36
37 <p>This upgrade will take from Bugdar 1.2.0 Beta 2 to Bugdar 1.2.0 Beta 3.</p>
38
39 <p>To begin the process, please click the button below.</p>
40 <?php
41 }
42
43 // ###################################################################
44
45 if ($input->in['mark'] == 1)
46 {
47 ?>
48 <h1>Potential Schema Updates</h1>
49
50 <p>Due to a small error in a previous scripts, this corrects some problems.</p>
51 <?php
52
53 $db->showerrors = false;
54 if (!$db->query("SELECT groupids FROM " . TABLE_PREFIX . "user"))
55 {
56 $db->query("ALTER TABLE " . TABLE_PREFIX . "user ADD groupids TEXT NULL");
57 echo "Adding user.groupids<br />\n";
58 }
59
60 build_usergroups();
61 build_statuses();
62 build_priorities();
63 build_severities();
64 build_assignedto();
65 build_resolutions();
66 build_products();
67 build_versions();
68 build_languages();
69 build_user_help();
70
71 if ($db->query("SELECT * FROM " . TABLE_PREFIX . "component"))
72 {
73 $db->query("DROP TABLE " . TABLE_PREFIX . "component");
74 echo "Dropping the component table<br />\n";
75 }
76 }
77
78 // ###################################################################
79
80 if ($input->in['mark'] == 2)
81 {
82 ?>
83 <h1>Version Number Change</h1>
84
85 <p>This step finishes the upgrade by inreasing your version number.</p>
86
87 <?php
88
89 $db->query("UPDATE " . TABLE_PREFIX . "setting SET value = '1.2.0 Beta 3' WHERE varname = 'trackerversion'");
90
91 build_settings();
92
93 ?>
94
95 ... done.
96
97 <?php
98 }
99
100 // ###################################################################
101
102 page_end();
103
104 ?>