- Small index.php improvement. Modified patch from Bart Jansens.
parent
17ef869e3a
commit
ab6db28671
14
index.php
14
index.php
|
|
@ -3,24 +3,23 @@
|
||||||
|
|
||||||
include_once "includes/common.inc";
|
include_once "includes/common.inc";
|
||||||
|
|
||||||
if (isset($_GET["q"])) {
|
if (!empty($_GET["q"])) {
|
||||||
if (module_exist("node") && $path = node_get_alias($_GET["q"])) {
|
if (module_exist("node") && $path = node_get_alias($_GET["q"])) {
|
||||||
$_GET["q"] = $path;
|
$_GET["q"] = $path;
|
||||||
}
|
}
|
||||||
$mod = arg(0);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$_GET["q"] = variable_get("site_frontpage", "node");
|
$_GET["q"] = variable_get("site_frontpage", "node");
|
||||||
$mod = arg(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($mod) && module_hook($mod, "page")) {
|
$mod = arg(0);
|
||||||
|
|
||||||
drupal_page_header();
|
drupal_page_header();
|
||||||
|
|
||||||
|
if (isset($mod) && module_hook($mod, "page")) {
|
||||||
module_invoke($mod, "page");
|
module_invoke($mod, "page");
|
||||||
drupal_page_footer();
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
drupal_page_header();
|
|
||||||
check_php_setting("magic_quotes_gpc", 0);
|
check_php_setting("magic_quotes_gpc", 0);
|
||||||
|
|
||||||
if (module_hook(variable_get("site_frontpage", "node"), "page")) {
|
if (module_hook(variable_get("site_frontpage", "node"), "page")) {
|
||||||
|
|
@ -30,7 +29,8 @@ else {
|
||||||
theme("header");
|
theme("header");
|
||||||
theme("footer");
|
theme("footer");
|
||||||
}
|
}
|
||||||
drupal_page_footer();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
drupal_page_footer();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue