Index: trunk/phase3/includes/SkinTemplate.php |
— | — | @@ -401,7 +401,7 @@ |
402 | 402 | $tpl->set( 'bottomscripts', $this->bottomScripts() ); |
403 | 403 | |
404 | 404 | $printfooter = "<div class=\"printfooter\">\n" . $this->printSource() . "</div>\n"; |
405 | | - $out->mBodytext .= $printfooter ; |
| 405 | + $out->mBodytext .= $printfooter . $this->generateDebugHTML(); |
406 | 406 | $tpl->setRef( 'bodytext', $out->mBodytext ); |
407 | 407 | |
408 | 408 | # Language links |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -1039,6 +1039,13 @@ |
1040 | 1040 | $wgDebugLogGroups = array(); |
1041 | 1041 | |
1042 | 1042 | /** |
| 1043 | + * Display debug data at the bottom of the main content area. |
| 1044 | + * |
| 1045 | + * Useful for developers and technical users trying to working on a closed wiki. |
| 1046 | + */ |
| 1047 | +$wgShowDebug = false; |
| 1048 | + |
| 1049 | +/** |
1043 | 1050 | * Show the contents of $wgHooks in Special:Version |
1044 | 1051 | */ |
1045 | 1052 | $wgSpecialVersionShowHooks = false; |
Index: trunk/phase3/includes/Skin.php |
— | — | @@ -890,12 +890,27 @@ |
891 | 891 | } |
892 | 892 | |
893 | 893 | /** |
| 894 | + * Generate debug data HTML for displaying at the bottom of the main content |
| 895 | + * area. |
| 896 | + * @return String HTML containing debug data, if enabled (otherwise empty). |
| 897 | + */ |
| 898 | + protected function generateDebugHTML() { |
| 899 | + global $wgShowDebug, $wgOut; |
| 900 | + if ( $wgShowDebug ) { |
| 901 | + $listInternals = str_replace( "\n", "</li>\n<li>", htmlspecialchars( $wgOut->mDebugtext ) ); |
| 902 | + return "\n<hr>\n<strong>Debug data:</strong><ul style=\"font-family:monospace;\"><li>" . |
| 903 | + $listInternals . "</li></ul>\n"; |
| 904 | + } |
| 905 | + return ''; |
| 906 | + } |
| 907 | + |
| 908 | + /** |
894 | 909 | * This gets called shortly before the </body> tag. |
895 | 910 | * @return String HTML to be put before </body> |
896 | 911 | */ |
897 | 912 | function afterContent() { |
898 | 913 | $printfooter = "<div class=\"printfooter\">\n" . $this->printFooter() . "</div>\n"; |
899 | | - return $printfooter . $this->doAfterContent(); |
| 914 | + return $this->generateDebugHTML() . $printfooter . $this->doAfterContent(); |
900 | 915 | } |
901 | 916 | |
902 | 917 | /** |