summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorDries Buytaert2003-08-12 15:57:16 (GMT)
committerDries Buytaert2003-08-12 15:57:16 (GMT)
commitab6db2867158923f17601edfd9718151dbfb304a (patch)
treeb3a8fd67cc49d4ee6ac6d5b7bed1e9d4f53ff995 /index.php
parent17ef869e3ae26f8af4f7cc623dc03392d5131065 (diff)
- Small index.php improvement. Modified patch from Bart Jansens.
Diffstat (limited to 'index.php')
-rw-r--r--index.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/index.php b/index.php
index 5da9d3c..416fa17 100644
--- a/index.php
+++ b/index.php
@@ -3,24 +3,23 @@
include_once "includes/common.inc";
-if (isset($_GET["q"])) {
+if (!empty($_GET["q"])) {
if (module_exist("node") && $path = node_get_alias($_GET["q"])) {
$_GET["q"] = $path;
}
- $mod = arg(0);
}
else {
$_GET["q"] = variable_get("site_frontpage", "node");
- $mod = arg(0);
}
+$mod = arg(0);
+
+drupal_page_header();
+
if (isset($mod) && module_hook($mod, "page")) {
- drupal_page_header();
module_invoke($mod, "page");
- drupal_page_footer();
}
else {
- drupal_page_header();
check_php_setting("magic_quotes_gpc", 0);
if (module_hook(variable_get("site_frontpage", "node"), "page")) {
@@ -30,7 +29,8 @@ else {
theme("header");
theme("footer");
}
- drupal_page_footer();
}
+drupal_page_footer();
+
?>