diff options
| author | Savetheinternet <savetheinternet@n0v4.com> | 2010-11-30 19:21:06 +1100 |
|---|---|---|
| committer | Paul Merrill <napalminc@gmail.com> | 2010-12-01 04:14:16 -0800 |
| commit | 95b91b3b5fd13a0ba1b0c0d1ff4dd27703076941 (patch) | |
| tree | 36e96f1b5e788734059d5a822132e48a8055d4cb /post.php | |
| parent | 5ffa408b4bbd9cee5c855097bfe0b95ed76b8507 (diff) | |
Fixed bug causing templates to fail after a chdir()
Diffstat (limited to 'post.php')
| -rw-r--r-- | post.php | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,11 +1,11 @@ <?php require 'inc/functions.php'; require 'inc/display.php'; - require 'inc/template.php'; if (file_exists('inc/instance-config.php')) { require 'inc/instance-config.php'; } require 'inc/config.php'; + require 'inc/template.php'; require 'inc/user.php'; // For example, we're on /b/ @@ -14,8 +14,12 @@ 'uri' => 'b', 'name' => 'Beta', 'title' => 'In development.'); + $board['dir'] = sprintf(BOARD_PATH, $board['uri']); $board['url'] = sprintf(BOARD_ABBREVIATION, $board['uri']); + if(!file_exists($board['dir'])) mkdir($board['dir'], 0777); + chdir($board['dir']); + $body = ''; // Fix for magic quotes |
