diff options
| author | czaks <marcin@6irc.net> | 2016-05-08 10:54:30 +0200 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2016-05-08 10:54:30 +0200 |
| commit | b6f0317bde1b6d9a9ac5d81a660865a7aa9ad13d (patch) | |
| tree | 6c6523b9081d2d561080f1b2d8378d93e2a237e1 /smart_build.php | |
| parent | 644f227ab33f247dc82e0208fe2125d5d002f4f4 (diff) | |
advanced build (1/2): a small refactor of index generating procedure; generation strategies
Diffstat (limited to 'smart_build.php')
| -rw-r--r-- | smart_build.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/smart_build.php b/smart_build.php index 58596055..7ca5fcbf 100644 --- a/smart_build.php +++ b/smart_build.php @@ -3,14 +3,16 @@ require_once("inc/functions.php"); require_once("inc/route.php"); require_once("inc/controller.php"); -if (!$config['smart_build'] && !$config["smart_build_helper"]) { - die('You need to enable $config["smart_build"] or $config["smart_build_helper"]'); +if (!$config["smart_build_helper"]) { + die('You need to enable $config["smart_build_helper"]'); } $config['smart_build'] = false; // Let's disable it, so we can build the page for real +$config['generation_strategies'] = array('strategy_immediate'); function after_open_board() { global $config; $config['smart_build'] = false; + $config['generation_strategies'] = array('strategy_immediate'); }; $request = $_SERVER['REQUEST_URI']; @@ -59,6 +61,9 @@ if ($reached) { elseif (preg_match('/\.xml$/', $request)) { header("Content-Type", "application/xml"); } + elseif (preg_match('/\.rss$/', $request)) { + header("Content-Type", "application/rss+xml"); + } else { header("Content-Type", "text/html; charset=utf-8"); } |
