From cf228c10de3803a9eba79318368f7932bcaf68ae Mon Sep 17 00:00:00 2001 From: Daniel Friesen Date: Sat, 1 Jan 2011 16:41:45 +0000 Subject: [PATCH] Convert the common bottomscripts, reporttime, and debug boilerplate into a printTrail() helper method. Note that in vector this does move the fixalpha stuff above bottomscripts while it was after it before, theoretically though this shouldn't cause any trouble. --- includes/SkinTemplate.php | 15 +++++++++++++++ skins/Modern.php | 8 +------- skins/MonoBook.php | 11 ++--------- skins/Vector.php | 6 +----- 4 files changed, 19 insertions(+), 21 deletions(-) diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 8b38500212..dcbd44b8eb 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -1716,6 +1716,21 @@ abstract class BaseTemplate extends QuickTemplate { return $footericons; } + /** + * Output the basic end-page trail including bottomscripts, reporttime, and + * debug stuff. This should be called right before outputting the closing + * body and html tags. + */ + function printTrail() { ?> +html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?> +html('reporttime') ?> +data['debug'] ): ?> + + - html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?> -html('reporttime') ?> -data['debug'] ): ?> - - + printTrail(); ?> -html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?> -html('reporttime') ?> -data['debug'] ): ?> - -printTrail(); echo Html::closeElement( 'body' ); echo Html::closeElement( 'html' ); wfRestoreWarnings(); diff --git a/skins/Vector.php b/skins/Vector.php index f9f6b38cfa..d2c77c017a 100644 --- a/skins/Vector.php +++ b/skins/Vector.php @@ -232,14 +232,10 @@ class VectorTemplate extends BaseTemplate {
- html( 'bottomscripts' ); /* JS call to runBodyOnloadHook */ ?> - html( 'reporttime' ) ?> - data['debug'] ): ?> - - + printTrail(); ?>