Revision 707
Added by doc almost 18 years ago
| install.php | ||
|---|---|---|
| 133 | 133 |
|
| 134 | 134 |
// Make news post access files dir |
| 135 | 135 |
require_once(WB_PATH.'/framework/functions.php'); |
| 136 |
make_dir(WB_PATH.PAGES_DIRECTORY.'/posts'); |
|
| 137 |
|
|
| 138 |
} |
|
| 136 |
if(make_dir(WB_PATH.PAGES_DIRECTORY.'/posts')) {
|
|
| 137 |
// Add a index.php file to prevent directory spoofing |
|
| 138 |
$content = ''. |
|
| 139 |
"<?php |
|
| 139 | 140 |
|
| 141 |
/* |
|
| 142 |
|
|
| 143 |
Website Baker Project <http://www.websitebaker.org/> |
|
| 144 |
Copyright (C) 2004-2008, Ryan Djurovich |
|
| 145 |
|
|
| 146 |
Website Baker is free software; you can redistribute it and/or modify |
|
| 147 |
it under the terms of the GNU General Public License as published by |
|
| 148 |
the Free Software Foundation; either version 2 of the License, or |
|
| 149 |
(at your option) any later version. |
|
| 150 |
|
|
| 151 |
Website Baker is distributed in the hope that it will be useful, |
|
| 152 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 153 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 154 |
GNU General Public License for more details. |
|
| 155 |
|
|
| 156 |
You should have received a copy of the GNU General Public License |
|
| 157 |
along with Website Baker; if not, write to the Free Software |
|
| 158 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
| 159 |
|
|
| 160 |
*/ |
|
| 161 |
|
|
| 162 |
header('Location: ../');
|
|
| 163 |
?>"; |
|
| 164 |
$handle = fopen(WB_PATH.PAGES_DIRECTORY.'/posts/index.php', 'w'); |
|
| 165 |
fwrite($handle, $content); |
|
| 166 |
fclose($handle); |
|
| 167 |
change_mode(WB_PATH.PAGES_DIRECTORY.'/posts/index.php', 'file'); |
|
| 168 |
} |
|
| 169 |
}; |
|
| 170 |
|
|
| 140 | 171 |
?> |
Also available in: Unified diff
Modified news module to create a default index.php during installation (directory spoofing)