diff options
| author | Michael Save <savetheinternet@tinyboard.org> | 2012-05-06 01:33:10 +1000 |
|---|---|---|
| committer | Michael Save <savetheinternet@tinyboard.org> | 2012-05-06 01:33:10 +1000 |
| commit | a6104587203f1b1b448e6977066d6e649de91ae8 (patch) | |
| tree | 58f3f17daaeb47de3ecc87f9967b432612147e68 /templates/themes/categories | |
| parent | ac2837c6204221554ceebc56c5fb9e38be4e0925 (diff) | |
a lot more improvements
Diffstat (limited to 'templates/themes/categories')
| -rw-r--r-- | templates/themes/categories/info.php | 4 | ||||
| -rw-r--r-- | templates/themes/categories/sidebar.html | 2 | ||||
| -rw-r--r-- | templates/themes/categories/theme.php | 12 |
3 files changed, 9 insertions, 9 deletions
diff --git a/templates/themes/categories/info.php b/templates/themes/categories/info.php index 5ae3d296..62d8f6bb 100644 --- a/templates/themes/categories/info.php +++ b/templates/themes/categories/info.php @@ -54,11 +54,11 @@ Requires $config[\'categories\'].'; $theme['build_function'] = 'categories_build'; $theme['install_callback'] = 'categories_install'; - if(!function_exists('categories_install')) { + if (!function_exists('categories_install')) { function categories_install($settings) { global $config; - if(!isset($config['categories'])) { + if (!isset($config['categories'])) { return Array(false, '<h2>Prerequisites not met!</h2>' . 'This theme requires $config[\'boards\'] and $config[\'categories\'] to be set.'); } diff --git a/templates/themes/categories/sidebar.html b/templates/themes/categories/sidebar.html index a4bc28ae..856930ab 100644 --- a/templates/themes/categories/sidebar.html +++ b/templates/themes/categories/sidebar.html @@ -31,7 +31,7 @@ </legend> {% for board in boards %} <li> - <a href="{{ board.uri }}">{{ board.title }}</a> + <a href="{{ board.uri }}">{{ board.title|e }}</a> </li> {% endfor %} </fieldset> diff --git a/templates/themes/categories/theme.php b/templates/themes/categories/theme.php index 648034e7..11fcbbaf 100644 --- a/templates/themes/categories/theme.php +++ b/templates/themes/categories/theme.php @@ -15,13 +15,13 @@ public static function build($action, $settings) { global $config; - if($action == 'all') + if ($action == 'all') file_write($config['dir']['home'] . $settings['file_main'], Categories::homepage($settings)); - if($action == 'all' || $action == 'boards') + if ($action == 'all' || $action == 'boards') file_write($config['dir']['home'] . $settings['file_sidebar'], Categories::sidebar($settings)); - if($action == 'all' || $action == 'news') + if ($action == 'all' || $action == 'news') file_write($config['dir']['home'] . $settings['file_news'], Categories::news($settings)); } @@ -52,10 +52,10 @@ $categories = $config['categories']; - foreach($categories as &$boards) { - foreach($boards as &$board) { + foreach ($categories as &$boards) { + foreach ($boards as &$board) { $title = boardTitle($board); - if(!$title) + if (!$title) $title = $board; // board doesn't exist, but for some reason you want to display it anyway $board = Array('title' => $title, 'uri' => sprintf($config['board_path'], $board)); } |
