From 09268e75c807b17b042f85977b2c3cac4ef884b2 Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Fri, 7 Oct 2011 00:00:13 +1100 Subject: theme error handling --- templates/themes/categories/info.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'templates/themes/categories/info.php') 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, '

Prerequisites not met!

' . + 'This theme requires $config[\'boards\'] and $config[\'categories\'] to be set.'); + } + } + } ?> -- cgit v1.3