]> src.bluestatic.org Git - bugdar.git/blob - install/upgrade5.php
Updating api_userhelp.php
[bugdar.git] / install / upgrade5.php
1 <?php
2 /*=====================================================================*\
3 || ###################################################################
4 || # Bugdar
5 || # Copyright ©2002-2007 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', 'upgrade5.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.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 ($input->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 $topic = $db->queryFirst("SELECT * FROM " . TABLE_PREFIX . "fieldhelp WHERE keystring = 'newreply'");
65 if (md5($topic['body']) == '7e1154340454ca6d8f8ba47aab057c23')
66 {
67 $topic = $db->query("UPDATE " . TABLE_PREFIX . "fieldhelp SET body = 'Here you can specify additional comments. If you do not change any fields, this will merely attach a comment.
68
69 The \"Automation\" drop-down next to this box (which may be hidden) will allow you to perform a common task. These administrator-defined tasks can change any of the bug fields automatically and then add an automatic reply. If you change a field that will be altered by the action, the action\'s change will take precedence. Also, if you enter a comment and the action specifies a comment, the automatic comment will be attached to yours.' WHERE keystring = 'newreply'");
70 echo "Updating user help topic on new replies<br />\n";
71 }
72 else
73 {
74 echo "<strong>ALERT:</strong> You have modified your user help topic for <em>newreply</em> which means that the help item was not updated for the renaming of 'Automatic Action' to 'Automation'<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.1.0' WHERE varname = 'trackerversion'");
90
91 build_settings();
92
93 ?>
94
95 ... done.
96
97 <?php
98 }
99
100 // ###################################################################
101
102 page_end();
103
104 /*=====================================================================*\
105 || ###################################################################
106 || # $HeadURL$
107 || # $Id$
108 || ###################################################################
109 \*=====================================================================*/
110 ?>