From 18f5e269ce88eb569c0ff6ae8da0990a8b255570 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 22 Feb 2015 23:05:21 -0800 Subject: fix 404 pages for derivative themes by pretending we've found a module called '404'. This way all the correct theme initialisation stuff will happen. --- index.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'index.php') diff --git a/index.php b/index.php index 4e39ee1ac..94d22e415 100755 --- a/index.php +++ b/index.php @@ -240,6 +240,9 @@ if(strlen($a->module)) { $a->page['content'] = replace_macros($tpl, array( '$message' => t('Page not found.' ) )); + // pretend this is a module so it will initialise the theme. + $a->module = '404'; + $a->module_loaded = true; } } -- cgit v1.2.3