summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorDries Buytaert2003-01-06 19:51:01 (GMT)
committerDries Buytaert2003-01-06 19:51:01 (GMT)
commit89b2069e4dcc160835eefa0ba11da550c31bdafc (patch)
tree773450f8397097adf4c186eabb8bc0ff53c0ea77 /index.php
parent97858f9b2ebf7f32f00ab7688dc2eb6b3371207b (diff)
- Clean URL patch.
Diffstat (limited to 'index.php')
-rw-r--r--index.php35
1 files changed, 25 insertions, 10 deletions
diff --git a/index.php b/index.php
index 0d725eb..a31d94b 100644
--- a/index.php
+++ b/index.php
@@ -3,19 +3,34 @@
include_once "includes/common.inc";
-page_header();
-
-check_php_setting("magic_quotes_gpc", 0);
-check_php_setting("register_globals", 1);
+if ($q) {
+ $mod = arg(0);
+}
-if (module_hook(variable_get("site_frontpage", "node"), "page")) {
- module_invoke(variable_get("site_frontpage", "node"), "page");
+if ($mod && module_hook($mod, "page")) {
+ if ($mod != "admin") {
+ page_header();
+ }
+ module_invoke($mod, "page");
+ if ($mod != "admin") {
+ page_footer();
+ }
}
else {
- $theme->header();
- $theme->footer();
-}
+ page_header();
-page_footer();
+ check_php_setting("magic_quotes_gpc", 0);
+ check_php_setting("register_globals", 1);
+
+ if (module_hook(variable_get("site_frontpage", "node"), "page")) {
+ module_invoke(variable_get("site_frontpage", "node"), "page");
+ }
+ else {
+ $theme->header();
+ $theme->footer();
+ }
+
+ page_footer();
+}
?>