From 57c7d7b43befd2ff186d8df6622265de05ac2b20 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 18 May 2003 09:48:49 +0000 Subject: [PATCH] - The page_footer() function was always called twice due to the introduction of the "footer" hook (and because of the existence of the page module). This caused the node view counter to be incremented twice per page view, the cache being set twice, etc. Quite a bug. --- includes/common.inc | 5 ++--- index.php | 8 ++++---- modules/admin.module | 7 +++---- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/includes/common.inc b/includes/common.inc index 611135f37651..8143693f2e2f 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -913,7 +913,7 @@ function query_print() { print ""; } -function page_header() { +function drupal_page_header() { if (variable_get("dev_timer", 0)) { timer_start(); } @@ -940,8 +940,7 @@ function page_header() { } } -function page_footer() { - +function drupal_page_footer() { if (variable_get("cache", 0)) { page_set_cache(); } diff --git a/index.php b/index.php index b66948282e48..7c4fda6a08bd 100644 --- a/index.php +++ b/index.php @@ -9,15 +9,15 @@ if (isset($_GET["q"])) { if (isset($mod) && module_hook($mod, "page")) { if ($mod != "admin") { - page_header(); + drupal_page_header(); } module_invoke($mod, "page"); if ($mod != "admin") { - page_footer(); + drupal_page_footer(); } } else { - page_header(); + drupal_page_header(); check_php_setting("magic_quotes_gpc", 0); @@ -29,7 +29,7 @@ else { theme("footer"); } - page_footer(); + drupal_page_footer(); } ?> diff --git a/modules/admin.module b/modules/admin.module index 06649991afcc..c750fe67a344 100644 --- a/modules/admin.module +++ b/modules/admin.module @@ -28,8 +28,7 @@ function admin_page() { global $base_url; if (user_access("access administration pages")) { - page_header(); - + drupal_page_header(); ?> @@ -89,12 +88,12 @@ function admin_page() { echo "

". variable_get("site_name", "drupal") ."

"; print menu_tree("admin") ; print ""; - print theme_footer(); + print theme_footer(); ?>