summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorctrlcctrlv <wizardchan@hush.com>2013-08-20 18:59:20 +0000
committerctrlcctrlv <wizardchan@hush.com>2013-08-20 18:59:20 +0000
commit8c081a4ab5eeccd2e0988c69a870eb0aac6b06e0 (patch)
treeacf1bfea6e60d4c0d6c67382019d3b31e3c36324
parentcc5173f4309c72fc8d0f52f70576302dbb998b1e (diff)
Oops, forgot to check if enabled at one point
-rw-r--r--inc/functions.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/inc/functions.php b/inc/functions.php
index 15007505..ae178a73 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -1339,9 +1339,11 @@ function buildIndex() {
for (;$page<=$config['max_pages'];$page++) {
$filename = $board['dir'] . ($page==1 ? $config['file_index'] : sprintf($config['file_page'], $page));
file_unlink($filename);
-
- $jsonFilename = $board['dir'] . ($page-1) . ".json";
- file_unlink($jsonFilename);
+
+ if ($config['api']['enabled']) {
+ $jsonFilename = $board['dir'] . ($page-1) . ".json";
+ file_unlink($jsonFilename);
+ }
}
}