summaryrefslogtreecommitdiff
path: root/templates/themes/categories/info.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/info.php
parent3b7f7afc9737153662feb4e64ee2ea9ebf736caa (diff)
theme error handling
Diffstat (limited to 'templates/themes/categories/info.php')
-rw-r--r--templates/themes/categories/info.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/templates/themes/categories/info.php b/templates/themes/categories/info.php
index 0090f39d..108cc254 100644
--- a/templates/themes/categories/info.php
+++ b/templates/themes/categories/info.php
@@ -27,4 +27,16 @@ Requires $config[\'boards\'] and $config[\'categories\'].';
// Unique function name for building everything
$theme['build_function'] = 'categories_build';
+
+ $theme['install_callback'] = 'categories_install';
+ if(!function_exists('categories_install')) {
+ function categories_install($settings) {
+ global $config;
+
+ if(!isset($config['boards']) || !isset($config['categories'])) {
+ return Array(false, '<h2>Prerequisites not met!</h2>' .
+ 'This theme requires $config[\'boards\'] and $config[\'categories\'] to be set.');
+ }
+ }
+ }
?>