Revision 1457
Added by Dietmar over 13 years ago
install.php | ||
---|---|---|
1 |
<?php |
|
2 |
/** |
|
3 |
* |
|
4 |
* @category modules |
|
5 |
* @package news |
|
6 |
* @author WebsiteBaker Project |
|
7 |
* @copyright 2004-2009, Ryan Djurovich |
|
8 |
* @copyright 2009-2011, Website Baker Org. e.V. |
|
9 |
* @link http://www.websitebaker2.org/ |
|
10 |
* @license http://www.gnu.org/licenses/gpl.html |
|
11 |
* @platform WebsiteBaker 2.8.x |
|
12 |
* @requirements PHP 5.2.2 and higher |
|
13 |
* @version $Id$ |
|
14 |
* @filesource $HeadURL$ |
|
15 |
* @lastmodified $Date$ |
|
16 |
* |
|
17 |
*/ |
|
18 |
|
|
19 |
if(defined('WB_URL')) |
|
20 |
{ |
|
21 |
|
|
22 |
// $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_posts`"); |
|
23 |
$mod_news = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_news_posts` ( ' |
|
24 |
. '`post_id` INT NOT NULL AUTO_INCREMENT,' |
|
25 |
. '`section_id` INT NOT NULL DEFAULT \'0\',' |
|
26 |
. '`page_id` INT NOT NULL DEFAULT \'0\',' |
|
27 |
. '`group_id` INT NOT NULL DEFAULT \'0\',' |
|
28 |
. '`active` INT NOT NULL DEFAULT \'0\',' |
|
29 |
. '`position` INT NOT NULL DEFAULT \'0\',' |
|
30 |
. '`title` VARCHAR(255) NOT NULL DEFAULT \'\',' |
|
31 |
. '`link` TEXT NOT NULL ,' |
|
32 |
. '`content_short` TEXT NOT NULL ,' |
|
33 |
. '`content_long` TEXT NOT NULL ,' |
|
34 |
. '`commenting` VARCHAR(7) NOT NULL DEFAULT \'\',' |
|
35 |
. '`published_when` INT NOT NULL DEFAULT \'0\',' |
|
36 |
. '`published_until` INT NOT NULL DEFAULT \'0\',' |
|
37 |
. '`posted_when` INT NOT NULL DEFAULT \'0\',' |
|
38 |
. '`posted_by` INT NOT NULL DEFAULT \'0\',' |
|
39 |
. 'PRIMARY KEY (post_id)' |
|
40 |
. ' )'; |
|
41 |
$database->query($mod_news); |
|
42 |
|
|
43 |
// $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_groups`"); |
|
44 |
$mod_news = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_news_groups` ( ' |
|
45 |
. '`group_id` INT NOT NULL AUTO_INCREMENT,' |
|
46 |
. '`section_id` INT NOT NULL DEFAULT \'0\',' |
|
47 |
. '`page_id` INT NOT NULL DEFAULT \'0\',' |
|
48 |
. '`active` INT NOT NULL DEFAULT \'0\',' |
|
49 |
. '`position` INT NOT NULL DEFAULT \'0\',' |
|
50 |
. '`title` VARCHAR(255) NOT NULL DEFAULT \'\',' |
|
51 |
. 'PRIMARY KEY (group_id)' |
|
52 |
. ' )'; |
|
53 |
$database->query($mod_news); |
|
54 |
|
|
55 |
// $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_comments`"); |
|
56 |
$mod_news = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_news_comments` ( ' |
|
57 |
. '`comment_id` INT NOT NULL AUTO_INCREMENT,' |
|
58 |
. '`section_id` INT NOT NULL DEFAULT \'0\',' |
|
59 |
. '`page_id` INT NOT NULL DEFAULT \'0\',' |
|
60 |
. '`post_id` INT NOT NULL DEFAULT \'0\',' |
|
61 |
. '`title` VARCHAR(255) NOT NULL DEFAULT \'\',' |
|
62 |
. '`comment` TEXT NOT NULL ,' |
|
63 |
. '`commented_when` INT NOT NULL DEFAULT \'0\',' |
|
64 |
. '`commented_by` INT NOT NULL DEFAULT \'0\',' |
|
65 |
. 'PRIMARY KEY (comment_id)' |
|
66 |
. ' )'; |
|
67 |
|
|
68 |
$database->query($mod_news); |
|
69 |
|
|
70 |
// $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_settings`"); |
|
71 |
$mod_news = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_news_settings` ( ' |
|
72 |
. '`section_id` INT NOT NULL DEFAULT \'0\',' |
|
73 |
. '`page_id` INT NOT NULL DEFAULT \'0\',' |
|
74 |
. '`header` TEXT NOT NULL ,' |
|
75 |
. '`post_loop` TEXT NOT NULL ,' |
|
76 |
. '`footer` TEXT NOT NULL ,' |
|
77 |
. '`posts_per_page` INT NOT NULL DEFAULT \'0\',' |
|
78 |
. '`post_header` TEXT NOT NULL,' |
|
79 |
. '`post_footer` TEXT NOT NULL,' |
|
80 |
. '`comments_header` TEXT NOT NULL,' |
|
81 |
. '`comments_loop` TEXT NOT NULL,' |
|
82 |
. '`comments_footer` TEXT NOT NULL,' |
|
83 |
. '`comments_page` TEXT NOT NULL,' |
|
84 |
. '`commenting` VARCHAR(7) NOT NULL DEFAULT \'\',' |
|
85 |
. '`resize` INT NOT NULL DEFAULT \'0\',' |
|
86 |
. ' `use_captcha` INT NOT NULL DEFAULT \'0\',' |
|
87 |
. 'PRIMARY KEY (section_id)' |
|
88 |
. ' )'; |
|
89 |
|
|
90 |
$database->query($mod_news); |
|
91 |
|
|
92 |
$mod_search = "SELECT * FROM ".TABLE_PREFIX."search WHERE value = 'news'"; |
|
93 |
$insert_search = $database->query($mod_search); |
|
94 |
if( $insert_search->numRows() == 0 ) |
|
95 |
{ |
|
96 |
// Insert info into the search table |
|
97 |
// Module query info |
|
98 |
$field_info = array(); |
|
99 |
$field_info['page_id'] = 'page_id'; |
|
100 |
$field_info['title'] = 'page_title'; |
|
101 |
$field_info['link'] = 'link'; |
|
102 |
$field_info['description'] = 'description'; |
|
103 |
$field_info['modified_when'] = 'modified_when'; |
|
104 |
$field_info['modified_by'] = 'modified_by'; |
|
105 |
$field_info = serialize($field_info); |
|
106 |
$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('module', 'news', '$field_info')"); |
|
107 |
// Query start |
|
108 |
$query_start_code = "SELECT [TP]pages.page_id, [TP]pages.page_title, [TP]pages.link, [TP]pages.description, [TP]pages.modified_when, [TP]pages.modified_by FROM [TP]mod_news_posts, [TP]mod_news_groups, [TP]mod_news_comments, [TP]mod_news_settings, [TP]pages WHERE "; |
|
109 |
$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_start', '$query_start_code', 'news')"); |
|
110 |
// Query body |
|
111 |
$query_body_code = " |
|
112 |
[TP]pages.page_id = [TP]mod_news_posts.page_id AND [TP]mod_news_posts.title LIKE \'%[STRING]%\' |
|
113 |
OR [TP]pages.page_id = [TP]mod_news_posts.page_id AND [TP]mod_news_posts.content_short LIKE \'%[STRING]%\' |
|
114 |
OR [TP]pages.page_id = [TP]mod_news_posts.page_id AND [TP]mod_news_posts.content_long LIKE \'%[STRING]%\' |
|
115 |
OR [TP]pages.page_id = [TP]mod_news_comments.page_id AND [TP]mod_news_comments.title LIKE \'%[STRING]%\' |
|
116 |
OR [TP]pages.page_id = [TP]mod_news_comments.page_id AND [TP]mod_news_comments.comment LIKE \'%[STRING]%\' |
|
117 |
OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.header LIKE \'%[STRING]%\' |
|
118 |
OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.footer LIKE \'%[STRING]%\' |
|
119 |
OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.post_header LIKE \'%[STRING]%\' |
|
120 |
OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.post_footer LIKE \'%[STRING]%\' |
|
121 |
OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.comments_header LIKE \'%[STRING]%\' |
|
122 |
OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.comments_footer LIKE \'%[STRING]%\'"; |
|
123 |
$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_body', '$query_body_code', 'news')"); |
|
124 |
// Query end |
|
125 |
$query_end_code = ""; |
|
126 |
$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_end', '$query_end_code', 'news')"); |
|
127 |
|
|
128 |
// Insert blank row (there needs to be at least on row for the search to work) |
|
129 |
$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_posts (section_id,page_id) VALUES ('0', '0')"); |
|
130 |
$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_groups (section_id,page_id) VALUES ('0', '0')"); |
|
131 |
$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_comments (section_id,page_id) VALUES ('0', '0')"); |
|
132 |
$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_settings (section_id,page_id) VALUES ('0', '0')"); |
|
133 |
} |
|
134 |
|
|
135 |
// Make news post access files dir |
|
136 |
require_once(WB_PATH.'/framework/functions.php'); |
|
137 |
if(make_dir(WB_PATH.PAGES_DIRECTORY.'/posts')) { |
|
138 |
// Add a index.php file to prevent directory spoofing |
|
139 |
$content = ''. |
|
140 |
"<?php |
|
141 |
|
|
142 |
/* |
|
143 |
|
|
144 |
Website Baker Project <http://www.websitebaker.org/> |
|
145 |
Copyright (C) 2004-2009, Ryan Djurovich |
|
146 |
|
|
147 |
Website Baker is free software; you can redistribute it and/or modify |
|
148 |
it under the terms of the GNU General Public License as published by |
|
149 |
the Free Software Foundation; either version 2 of the License, or |
|
150 |
(at your option) any later version. |
|
151 |
|
|
152 |
Website Baker is distributed in the hope that it will be useful, |
|
153 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
154 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
155 |
GNU General Public License for more details. |
|
156 |
|
|
157 |
You should have received a copy of the GNU General Public License |
|
158 |
along with Website Baker; if not, write to the Free Software |
|
159 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
160 |
|
|
161 |
*/ |
|
162 |
|
|
163 |
header('Location: ../'); |
|
164 |
?>"; |
|
165 |
$handle = fopen(WB_PATH.PAGES_DIRECTORY.'/posts/index.php', 'w'); |
|
166 |
fwrite($handle, $content); |
|
167 |
fclose($handle); |
|
168 |
change_mode(WB_PATH.PAGES_DIRECTORY.'/posts/index.php', 'file'); |
|
169 |
} |
|
170 |
}; |
|
171 |
|
|
172 |
?> |
|
1 |
<?php |
|
2 |
/** |
|
3 |
* |
|
4 |
* @category modules |
|
5 |
* @package news |
|
6 |
* @author WebsiteBaker Project |
|
7 |
* @copyright 2004-2009, Ryan Djurovich |
|
8 |
* @copyright 2009-2011, Website Baker Org. e.V. |
|
9 |
* @link http://www.websitebaker2.org/ |
|
10 |
* @license http://www.gnu.org/licenses/gpl.html |
|
11 |
* @platform WebsiteBaker 2.8.x |
|
12 |
* @requirements PHP 5.2.2 and higher |
|
13 |
* @version $Id$ |
|
14 |
* @filesource $HeadURL$ |
|
15 |
* @lastmodified $Date$ |
|
16 |
* |
|
17 |
*/ |
|
18 |
|
|
19 |
if(defined('WB_URL')) |
|
20 |
{ |
|
21 |
|
|
22 |
// $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_posts`"); |
|
23 |
$mod_news = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_news_posts` ( ' |
|
24 |
. '`post_id` INT NOT NULL AUTO_INCREMENT,' |
|
25 |
. '`section_id` INT NOT NULL DEFAULT \'0\',' |
|
26 |
. '`page_id` INT NOT NULL DEFAULT \'0\',' |
|
27 |
. '`group_id` INT NOT NULL DEFAULT \'0\',' |
|
28 |
. '`active` INT NOT NULL DEFAULT \'0\',' |
|
29 |
. '`position` INT NOT NULL DEFAULT \'0\',' |
|
30 |
. '`title` VARCHAR(255) NOT NULL DEFAULT \'\',' |
|
31 |
. '`link` TEXT NOT NULL ,' |
|
32 |
. '`content_short` TEXT NOT NULL ,' |
|
33 |
. '`content_long` TEXT NOT NULL ,' |
|
34 |
. '`commenting` VARCHAR(7) NOT NULL DEFAULT \'\',' |
|
35 |
. '`created_when` INT NOT NULL DEFAULT \'0\',' |
|
36 |
. '`created_by` INT NOT NULL DEFAULT \'0\',' |
|
37 |
. '`published_when` INT NOT NULL DEFAULT \'0\',' |
|
38 |
. '`published_until` INT NOT NULL DEFAULT \'0\',' |
|
39 |
. '`posted_when` INT NOT NULL DEFAULT \'0\',' |
|
40 |
. '`posted_by` INT NOT NULL DEFAULT \'0\',' |
|
41 |
. 'PRIMARY KEY (post_id)' |
|
42 |
. ' )'; |
|
43 |
$database->query($mod_news); |
|
44 |
|
|
45 |
// $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_groups`"); |
|
46 |
$mod_news = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_news_groups` ( ' |
|
47 |
. '`group_id` INT NOT NULL AUTO_INCREMENT,' |
|
48 |
. '`section_id` INT NOT NULL DEFAULT \'0\',' |
|
49 |
. '`page_id` INT NOT NULL DEFAULT \'0\',' |
|
50 |
. '`active` INT NOT NULL DEFAULT \'0\',' |
|
51 |
. '`position` INT NOT NULL DEFAULT \'0\',' |
|
52 |
. '`title` VARCHAR(255) NOT NULL DEFAULT \'\',' |
|
53 |
. 'PRIMARY KEY (group_id)' |
|
54 |
. ' )'; |
|
55 |
$database->query($mod_news); |
|
56 |
|
|
57 |
// $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_comments`"); |
|
58 |
$mod_news = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_news_comments` ( ' |
|
59 |
. '`comment_id` INT NOT NULL AUTO_INCREMENT,' |
|
60 |
. '`section_id` INT NOT NULL DEFAULT \'0\',' |
|
61 |
. '`page_id` INT NOT NULL DEFAULT \'0\',' |
|
62 |
. '`post_id` INT NOT NULL DEFAULT \'0\',' |
|
63 |
. '`title` VARCHAR(255) NOT NULL DEFAULT \'\',' |
|
64 |
. '`comment` TEXT NOT NULL ,' |
|
65 |
. '`commented_when` INT NOT NULL DEFAULT \'0\',' |
|
66 |
. '`commented_by` INT NOT NULL DEFAULT \'0\',' |
|
67 |
. 'PRIMARY KEY (comment_id)' |
|
68 |
. ' )'; |
|
69 |
|
|
70 |
$database->query($mod_news); |
|
71 |
|
|
72 |
// $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_settings`"); |
|
73 |
$mod_news = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_news_settings` ( ' |
|
74 |
. '`section_id` INT NOT NULL DEFAULT \'0\',' |
|
75 |
. '`page_id` INT NOT NULL DEFAULT \'0\',' |
|
76 |
. '`header` TEXT NOT NULL ,' |
|
77 |
. '`post_loop` TEXT NOT NULL ,' |
|
78 |
. '`footer` TEXT NOT NULL ,' |
|
79 |
. '`posts_per_page` INT NOT NULL DEFAULT \'0\',' |
|
80 |
. '`post_header` TEXT NOT NULL,' |
|
81 |
. '`post_footer` TEXT NOT NULL,' |
|
82 |
. '`comments_header` TEXT NOT NULL,' |
|
83 |
. '`comments_loop` TEXT NOT NULL,' |
|
84 |
. '`comments_footer` TEXT NOT NULL,' |
|
85 |
. '`comments_page` TEXT NOT NULL,' |
|
86 |
. '`commenting` VARCHAR(7) NOT NULL DEFAULT \'\',' |
|
87 |
. '`resize` INT NOT NULL DEFAULT \'0\',' |
|
88 |
. ' `use_captcha` INT NOT NULL DEFAULT \'0\',' |
|
89 |
. 'PRIMARY KEY (section_id)' |
|
90 |
. ' )'; |
|
91 |
|
|
92 |
$database->query($mod_news); |
|
93 |
|
|
94 |
$mod_search = "SELECT * FROM ".TABLE_PREFIX."search WHERE value = 'news'"; |
|
95 |
$insert_search = $database->query($mod_search); |
|
96 |
if( $insert_search->numRows() == 0 ) |
|
97 |
{ |
|
98 |
// Insert info into the search table |
|
99 |
// Module query info |
|
100 |
$field_info = array(); |
|
101 |
$field_info['page_id'] = 'page_id'; |
|
102 |
$field_info['title'] = 'page_title'; |
|
103 |
$field_info['link'] = 'link'; |
|
104 |
$field_info['description'] = 'description'; |
|
105 |
$field_info['modified_when'] = 'modified_when'; |
|
106 |
$field_info['modified_by'] = 'modified_by'; |
|
107 |
$field_info = serialize($field_info); |
|
108 |
$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('module', 'news', '$field_info')"); |
|
109 |
// Query start |
|
110 |
$query_start_code = "SELECT [TP]pages.page_id, [TP]pages.page_title, [TP]pages.link, [TP]pages.description, [TP]pages.modified_when, [TP]pages.modified_by FROM [TP]mod_news_posts, [TP]mod_news_groups, [TP]mod_news_comments, [TP]mod_news_settings, [TP]pages WHERE "; |
|
111 |
$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_start', '$query_start_code', 'news')"); |
|
112 |
// Query body |
|
113 |
$query_body_code = " |
|
114 |
[TP]pages.page_id = [TP]mod_news_posts.page_id AND [TP]mod_news_posts.title LIKE \'%[STRING]%\' |
|
115 |
OR [TP]pages.page_id = [TP]mod_news_posts.page_id AND [TP]mod_news_posts.content_short LIKE \'%[STRING]%\' |
|
116 |
OR [TP]pages.page_id = [TP]mod_news_posts.page_id AND [TP]mod_news_posts.content_long LIKE \'%[STRING]%\' |
|
117 |
OR [TP]pages.page_id = [TP]mod_news_comments.page_id AND [TP]mod_news_comments.title LIKE \'%[STRING]%\' |
|
118 |
OR [TP]pages.page_id = [TP]mod_news_comments.page_id AND [TP]mod_news_comments.comment LIKE \'%[STRING]%\' |
|
119 |
OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.header LIKE \'%[STRING]%\' |
|
120 |
OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.footer LIKE \'%[STRING]%\' |
|
121 |
OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.post_header LIKE \'%[STRING]%\' |
|
122 |
OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.post_footer LIKE \'%[STRING]%\' |
|
123 |
OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.comments_header LIKE \'%[STRING]%\' |
|
124 |
OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.comments_footer LIKE \'%[STRING]%\'"; |
|
125 |
$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_body', '$query_body_code', 'news')"); |
|
126 |
// Query end |
|
127 |
$query_end_code = ""; |
|
128 |
$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_end', '$query_end_code', 'news')"); |
|
129 |
|
|
130 |
// Insert blank row (there needs to be at least on row for the search to work) |
|
131 |
$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_posts (section_id,page_id) VALUES ('0', '0')"); |
|
132 |
$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_groups (section_id,page_id) VALUES ('0', '0')"); |
|
133 |
$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_comments (section_id,page_id) VALUES ('0', '0')"); |
|
134 |
$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_settings (section_id,page_id) VALUES ('0', '0')"); |
|
135 |
} |
|
136 |
|
|
137 |
// Make news post access files dir |
|
138 |
require_once(WB_PATH.'/framework/functions.php'); |
|
139 |
if(make_dir(WB_PATH.PAGES_DIRECTORY.'/posts')) { |
|
140 |
// Add a index.php file to prevent directory spoofing |
|
141 |
$content = ''. |
|
142 |
"<?php |
|
143 |
|
|
144 |
/* |
|
145 |
|
|
146 |
Website Baker Project <http://www.websitebaker.org/> |
|
147 |
Copyright (C) 2004-2009, Ryan Djurovich |
|
148 |
|
|
149 |
Website Baker is free software; you can redistribute it and/or modify |
|
150 |
it under the terms of the GNU General Public License as published by |
|
151 |
the Free Software Foundation; either version 2 of the License, or |
|
152 |
(at your option) any later version. |
|
153 |
|
|
154 |
Website Baker is distributed in the hope that it will be useful, |
|
155 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
156 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
157 |
GNU General Public License for more details. |
|
158 |
|
|
159 |
You should have received a copy of the GNU General Public License |
|
160 |
along with Website Baker; if not, write to the Free Software |
|
161 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
162 |
|
|
163 |
*/ |
|
164 |
|
|
165 |
header('Location: ../'); |
|
166 |
?>"; |
|
167 |
$handle = fopen(WB_PATH.PAGES_DIRECTORY.'/posts/index.php', 'w'); |
|
168 |
fwrite($handle, $content); |
|
169 |
fclose($handle); |
|
170 |
change_mode(WB_PATH.PAGES_DIRECTORY.'/posts/index.php', 'file'); |
|
171 |
} |
|
172 |
}; |
|
173 | 173 |
Also available in: Unified diff
Preparing 2.8.2 stable, last tests