-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathUPGRADING
216 lines (173 loc) · 10.5 KB
/
UPGRADING
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
== 1.5.0 to 1.6.0 ==
Apply the patches in patch/ from the root of your Kitto install.
Replace resource/tinymce with the folder from this version.
Replace resource/script with the folder from this version.
Replace external_lib/ with the folder from this version.
Run the following SQL to update your schema (MySQL):
CREATE TABLE `item_recipe_material` (
`item_recipe_material_id` int(11) NOT NULL auto_increment,
`recipe_item_type_id` int(11) NOT NULL,
`material_item_type_id` int(11) NOT NULL,
`material_quantity` int(11) NOT NULL default '1',
PRIMARY KEY (`item_recipe_material_id`),
UNIQUE KEY `recipe_item_type_id` (`recipe_item_type_id`,`material_item_type_id`)
) ENGINE=InnoDB;
CREATE TABLE `item_recipe_type` (
`item_recipe_type_id` int(11) NOT NULL auto_increment,
`recipe_type_description` varchar(20) NOT NULL,
PRIMARY KEY (`item_recipe_type_id`)
) ENGINE=InnoDB;
ALTER TABLE `item_class` ADD COLUMN `normal_inventory_display` enum('Y','N') NOT NULL;
ALTER TABLE `jump_page` ADD COLUMN `show_layout` enum('Y','N') NOT NULL default 'Y' AFTER `layout_type`;
ALTER TABLE `item_type`
ADD COLUMN `item_recipe_type_id` int(11) NOT NULL,
ADD COLUMN `recipe_created_item_type_id` int(11) NOT NULL,
ADD COLUMN `recipe_batch_quantity` int(11) NOT NULL,
ADD COLUMN `unique_item` enum('N','Y') NOT NULL,
ADD COLUMN `transferable_item` enum('Y','N') NOT NULL;
ALTER TABLE `item_type`
ADD INDEX (`item_name`),
ADD INDEX (`item_recipe_type_id`,`recipe_created_item_type_id`);
INSERT INTO jump_page (`page_title,`page_html_title`,`layout_type`,`show_layout`,`page_slug`,`access_level`,`restricted_permission_api_name`,`php_script`,`include_tinymce`,`active`) VALUES
('AJAX Item Search Callback','','deep','N','item-search-ajax','user','','items/ajax_widget_search.php','N','Y'),
('Manage Recipe Materials','Manage Recipe Materials','deep','Y','admin-recipe','restricted','manage_items','admin/items/recipe_materials.php','N','Y'),
('Add Recipe Materials','Add Recipe Materials','deep','Y','admin-recipe-add','restricted','manage_items','admin/items/recipe_add_material.php','N','Y'),
('Crafting','Crafting','deep','Y','crafting','user','','crafting/list.php','N','Y'),
('Crafting','Crafting','deep','Y','craft','user','','crafting/recipe.php','N','Y');
INSERT INTO `item_class` (`item_class_id`, `php_class`, `class_descr`, `relative_image_dir`, `verb`, `one_per_use`, `normal_inventory_display`) VALUES (4,'Recipe_Item','Recipe','recipe','creates','N','N');
== 1.4.0 to 1.5.0 ==
Apply the patches in patch/ from the root of your Kitto install.
There are no database schema changes.
== 1.3.1 to 1.4.0 ==
Apply the patches in patch/ from the root of your Kitto install.
Be sure to update the external_libs/aphp folder to the latest version of aphp.
There are no database schema changes.
== 1.3.0.1 to 1.3.1 ==
Apply the following patches from the root of your Kitto install:
* 0001-Refactored-board-news-code-to-use-ActiveTable-s-sl.patch
* 0002-Refactored-pagination-in-the-inventory-to-use-the.patch
* 0003-Refactored-mail-code-to-work-with-ActiveTable-s-ne.patch
* 0004-Pagination-refactored.patch
Delete the external_libs/aphp folder in your Kitto install and upload
the updated version from this archive.
There are no database schema changes to be performed.
== 1.3.0 to 1.3.0.1 ==
Apply the following patches from the root of your Kitto install:
* patches/users_online-1.3.0.1.patch
== 1.2.2.4 to 1.3.0 ==
To upgrade from Kitto 1.2.2.4 to 1.3.0, run the following SQL:
ALTER TABLE `user_item` ADD `quantity` INT UNSIGNED DEFAULT '1' NOT NULL ;
ALTER TABLE `item_class` ADD `one_per_use` ENUM( 'N', 'Y' ) DEFAULT 'N' NOT NULL AFTER `verb` ;
CREATE TABLE `board_category` (
`board_category_id` INT NOT NULL AUTO_INCREMENT ,
`category_name` VARCHAR( 50 ) NOT NULL ,
`order_by` TINYINT DEFAULT '0' NOT NULL ,
`required_permission_id` INT NOT NULL ,
PRIMARY KEY ( `board_category_id` ) ,
INDEX ( `required_permission_id` )
) TYPE = innodb;
ALTER TABLE `board` ADD `board_category_id` INT NOT NULL AFTER `board_id` ;
ALTER TABLE `board` ADD INDEX ( `board_category_id` ) ;
Then, upload the following changed/new files. If you have customized a file in
this list, you will need to merge the changes. If you have not customized a
file, it is recommended that you overwrite it with the updated version.
-- New Art
* resources/items/toys (created folder)
* resources/items/paints (created folder)
* resources/shopkeepers (created folder)
-- Item stacking
* includes/classes/inflectors (added folder with one file)
* scripts/items/list.php (lines 65-66)
* scripts/items/detail.php (large number of changes; advised to upload new
version)
* scripts/shops/shop.php (lines 140-174)
* includes/classes/item/item.class.php (modified #giveItem(), added:
#getInflectedName(), #makeActionText())
* includes/classes/item/food_item.class.php (modified #feedTo())
* includes/classes/item/toy_item.class.php (modified #playWith())
* includes/classes/item/paint_item.class.php (modified #paint())
* template/templates/items/details.tpl (quantity stuff added)
* template/templates/items/list.tpl (quantity stuff added)
* template/templates/items/give_form.tpl (quantity stuff added)
* template/templates/items/use_form.tpl (quantity stuff added)
-- Board Categories
* includes/classes/board/board_category.class.php (new file)
* includes/classes/board/board.class.php (added 47-52, added 59-65,
added 67-73. Modified #hasAccess())
* scripts/boards/create_thread.php (added line 61)
* scripts/boards/edit_post.php (added line 86)
* scripts/boards/edit_thread.php (added line 76)
* scripts/boards/post_list.php (added line 82)
* scripts/boards/board_list.php (large change, advised to upload new copy)
* scripts/boards/thread_list.php (added line 84)
* template/templates/boards/board_list.tpl (breadcrumb line)
* template/templates/boards/thread_list.tpl (breadcrumb line)
* template/templates/boards/edit_post.tpl (breadcrumb line)
* template/templates/boards/edit_thread.tpl (breadcrumb line)
* template/templates/boards/post_list.tpl (breadcrumb line)
* template/templates/boards/new_thread.tpl (breadcrumb line)
-- General
* index.php (lines 97-111 modified)
* includes/classes/classes.config.php (37-40 added, 84 added)
After that, check your boards. Each one must now be underneath a board_category.
Sample categories can be found in the db/data/board_category.sql file.
== 1.2.2.x to 1.2.2.4 ==
To upgrade an earlier 1.2.2.x release to 1.2.2.4, update the following files or
manually merge the changes:
* index.php (line 143 changed)
* includes/config.inc.php (line 189, the require for Log.php)
* includes/classes/user/user_online.class.php (all static methods
changed to use #findBy()'s new counting abilities instead of running
queries manually, one method added)
* scripts/meta/search.php (lines 51-53 changed)
* external_lib/aphp (whole folder)
== 1.2.2.1 or 1.2.2.2 to 1.2.2.3 ==
To upgrade an earlier 1.2.2 release to 1.2.2.3, update the following files:
* captcha.php
* scripts/user/register.php (line 64 modified).
* scripts/user/forgot_password.php (line 66 modified).
== 1.2.2.1, 1.2.2.2 ==
Both of these releases contained insignificant updates. 1.2.2.1 corrected
an error in the db/mysql4_ddl.sql file, and 1.2.2.2 was targetted towards
making installation easier.
== 1.2.1 to 1.2.2.0 ==
To upgrade from Kitto 1.2.1 to 1.2.2, run the following SQL:
-- Create the new table required.
CREATE TABLE `user_online` (
`user_online_id` INT NOT NULL AUTO_INCREMENT ,
`user_type` ENUM( 'user', 'guest' ) DEFAULT 'guest' NOT NULL ,
`user_id` INT NOT NULL ,
`client_ip` VARCHAR( 15 ) NOT NULL ,
`client_user_agent` VARCHAR( 255 ) NOT NULL ,
`datetime_last_active` DATETIME NOT NULL ,
PRIMARY KEY ( `user_online_id` ) ,
INDEX (`user_id`),
INDEX (`client_ip`),
) TYPE = memory;
-- Add a new column for holding the user preference in.
ALTER TABLE `user` ADD `show_online_status` ENUM( 'Y', 'N' ) DEFAULT 'Y' NOT NULL ;
-- Add the new cronjob.
INSERT INTO `cron_tab` ( `cron_tab_id` , `cron_class` , `cron_frequency_seconds` , `unixtime_next_run` , `enabled` ) VALUES ('', 'Job_UserOnline', '300', '', 'Y');
-- Add the online users page and search page.
INSERT INTO `jump_page` ( `jump_page_id` , `page_title` , `page_html_title` , `layout_type` , `page_slug` , `access_level` , `restricted_permission_api_name` , `php_script` , `include_tinymce` , `active` ) VALUES ('', 'Online Users', 'Online Users', 'deep', 'online', 'public', '', 'meta/online.php', 'N', 'Y');
INSERT INTO `jump_page` ( `jump_page_id` , `page_title` , `page_html_title` , `layout_type` , `page_slug` , `access_level` , `restricted_permission_api_name` , `php_script` , `include_tinymce` , `active` ) VALUES ('', 'Search', 'Search', 'deep', 'search', 'user', '', 'meta/search.php', 'N', 'Y');
Then, upload the following changed/new files. If you have customized a file in this list,
you will need to merge the changes. If you have not customized a file, it is recommended
that you overwrite it with the updated version.
scripts/user/register.php (change is on line 151).
includes/classes/classes.config.php (change is online 49).
includes/main.inc.php (lines 119 to 153 were added).
includes/cronjobs/user_online.class.php (new file).
includes/cronjobs/cronjobs.config.php (lines 37 to 40 were added).
index.php (lines 142 to 144 added).
template/templates/layout/deep/footer.tpl (changed line 9 to include 'X User(s) Online' link).
scripts/meta/online.php (new file).
template/templates/meta/online.tpl (new file).
scripts/user/preferences.php (added lines 33, 57, 111, 187, 240 to 243, and 262).
template/templates/user/preferences/pref_errors_back.tpl (added line 13).
template/templates/user/preferences/preferences.tpl (added lines 116 to 123, modified all subsequent class='', and added line 163).
external_lib/aphp (ActivePHP 2.2.6, upload entire external_lib/aphp/ folder).
template/layout/user_box.tpl (added line 8).
script/meta/search.php (new file).
template/templates/meta/search (new folder).
.htaccess file - you will need to set the RewriteBase as per the installation instructions (added lines 37 to 38).