diff options
Diffstat (limited to 'templates/homepage/basic/theme.php')
| -rw-r--r-- | templates/homepage/basic/theme.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/templates/homepage/basic/theme.php b/templates/homepage/basic/theme.php index 1251cfff..6a6f0bfa 100644 --- a/templates/homepage/basic/theme.php +++ b/templates/homepage/basic/theme.php @@ -25,16 +25,22 @@ // Unique function name for building everything $theme['build_function'] = 'basic_build'; - function basic_build($settings) { - Basic::build($settings); + function basic_build($action, $settings) { + // Possible values for $action: + // - all (rebuild everything, initialization) + // - news (news has been updated) + // - boards (board list changed) + + Basic::build($action, $settings); } // Wrap functions in a class so they don't interfere with normal Tinyboard operations class Basic { - public static function build($settings) { + public static function build($action, $settings) { global $config; - file_put_contents($config['dir']['home'] . $config['file_index'], Basic::homepage($settings)); + if($action == 'all' || $action == 'news') + file_put_contents($config['dir']['home'] . $config['file_index'], Basic::homepage($settings)); } // Build news page |
