summaryrefslogtreecommitdiff
path: root/templates/themes/categories/theme.php
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@tinyboard.org>2011-10-07 00:00:13 +1100
committerSavetheinternet <savetheinternet@tinyboard.org>2011-10-07 00:00:13 +1100
commit09268e75c807b17b042f85977b2c3cac4ef884b2 (patch)
tree255d26ad7f18d6ef147a0df3ad4e3ee2760c019e /templates/themes/categories/theme.php
parent3b7f7afc9737153662feb4e64ee2ea9ebf736caa (diff)
theme error handling
Diffstat (limited to 'templates/themes/categories/theme.php')
-rw-r--r--templates/themes/categories/theme.php34
1 files changed, 19 insertions, 15 deletions
diff --git a/templates/themes/categories/theme.php b/templates/themes/categories/theme.php
index de1b4a5b..d48c150a 100644
--- a/templates/themes/categories/theme.php
+++ b/templates/themes/categories/theme.php
@@ -121,27 +121,31 @@
'<li><a class="system" href="javascript:parent.removeFrames()">[Remove Frames]</a></li>' .
'</ul></fieldset>';
- for($cat = 0; $cat < count($config['categories']); $cat++) {
- $body .= '<fieldset><legend>' . $config['categories'][$cat] . '</legend><ul>';
+ if(isset($config['categories'])) {
+ for($cat = 0; $cat < count($config['categories']); $cat++) {
+ $body .= '<fieldset><legend>' . $config['categories'][$cat] . '</legend><ul>';
- foreach($config['boards'][$cat] as &$board) {
- $body .= '<li><a href="' .
- sprintf($config['board_path'], $board) .
- '">' . boardTitle($board) . '</a></li>';
- }
+ foreach($config['boards'][$cat] as &$board) {
+ $body .= '<li><a href="' .
+ sprintf($config['board_path'], $board) .
+ '">' . boardTitle($board) . '</a></li>';
+ }
- $body .= '</ul></fieldset>';
+ $body .= '</ul></fieldset>';
+ }
}
- foreach($config['custom_categories'] as $name => &$group) {
- $body .= '<fieldset><legend>' . $name . '</legend><ul>';
+ if(isset($config['custom_categories'])) {
+ foreach($config['custom_categories'] as $name => &$group) {
+ $body .= '<fieldset><legend>' . $name . '</legend><ul>';
- foreach($group as $title => &$url) {
- $body .= '<li><a href="' . $url .
- '">' . $title . '</a></li>';
- }
+ foreach($group as $title => &$url) {
+ $body .= '<li><a href="' . $url .
+ '">' . $title . '</a></li>';
+ }
- $body .= '</ul></fieldset>';
+ $body .= '</ul></fieldset>';
+ }
}
// Finish page