summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjartan Mannes <kjartan@2.no-reply.drupal.org>2002-03-05 22:53:51 +0000
committerKjartan Mannes <kjartan@2.no-reply.drupal.org>2002-03-05 22:53:51 +0000
commit35a9fd1e351d7505f210d5bc1fd908bf5fe3e5dc (patch)
treed8ed9d642d2f0a752b980b24714ff3163988bf2b
parent1fe8d6b1959b2b5ac4d70a9030ccd51d1f9b5449 (diff)
downloadbrdo-35a9fd1e351d7505f210d5bc1fd908bf5fe3e5dc.tar.gz
brdo-35a9fd1e351d7505f210d5bc1fd908bf5fe3e5dc.tar.bz2
- specifying an invalid module will redirect you to the index page instead of
showing a blank page.
-rw-r--r--module.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/module.php b/module.php
index 30954d8ac..4767459d0 100644
--- a/module.php
+++ b/module.php
@@ -3,10 +3,13 @@
include_once "includes/common.inc";
-page_header();
-
-module_invoke($mod, "page");
-
-page_footer();
+if (module_hook($mod, "page")) {
+ page_header();
+ module_invoke($mod, "page");
+ page_footer();
+}
+else {
+ header("Location: index.php");
+}
?>