- 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.4.2.x
							parent
							
								
									494aa87e37
								
							
						
					
					
						commit
						57c7d7b43b
					
				| 
						 | 
				
			
			@ -913,7 +913,7 @@ function query_print() {
 | 
			
		|||
  print "</pre>";
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
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();
 | 
			
		||||
  }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -28,8 +28,7 @@ function admin_page() {
 | 
			
		|||
  global $base_url;
 | 
			
		||||
 | 
			
		||||
  if (user_access("access administration pages")) {
 | 
			
		||||
    page_header();
 | 
			
		||||
 | 
			
		||||
    drupal_page_header();
 | 
			
		||||
   ?>
 | 
			
		||||
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
 | 
			
		||||
    <html>
 | 
			
		||||
| 
						 | 
				
			
			@ -94,7 +93,7 @@ function admin_page() {
 | 
			
		|||
    </body>
 | 
			
		||||
   </html>
 | 
			
		||||
   <?php
 | 
			
		||||
    page_footer();
 | 
			
		||||
    drupal_page_footer();
 | 
			
		||||
  }
 | 
			
		||||
  else {
 | 
			
		||||
    print message_access();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue