r43028 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r43027‎ | r43028 | r43029 >
Date:21:11, 1 November 2008
Author:siebrand
Status:old
Tags:
Comment:
Forgot stylize.php
Modified paths:
  • /trunk/extensions/uniwiki/CatBoxAtTop/CatBoxAtTop.php (modified) (history)

Diff [purge]

Index: trunk/extensions/uniwiki/CatBoxAtTop/CatBoxAtTop.php
@@ -3,7 +3,7 @@
44 * http://www.mediawiki.org/wiki/Extension:Uniwiki_Category_Box_at_Top
55 * http://www.gnu.org/licenses/gpl-3.0.txt */
66
7 -if (!defined("MEDIAWIKI"))
 7+if ( !defined( "MEDIAWIKI" ) )
88 die();
99
1010 /* ---- CREDITS ---- */
@@ -24,18 +24,18 @@
2525 $wgHooks['BeforePageDisplay'][] = "UW_CatBoxAtTop_CSS";
2626 $wgHooks['OutputPageBeforeHTML'][] = "UW_CatBoxAtTop_Rejig";
2727
28 -function UW_CatBoxAtTop_CSS (&$out) {
 28+function UW_CatBoxAtTop_CSS ( &$out ) {
2929 global $wgScriptPath;
3030 $href = "$wgScriptPath/extensions/uniwiki/CatBoxAtTop/style.css";
31 - $out->addScript ("<link rel='stylesheet' href='$href' />");
 31+ $out->addScript ( "<link rel='stylesheet' href='$href' />" );
3232 return true;
3333 }
3434
35 -function UW_CatBoxAtTop_Rejig (&$out, &$text) {
 35+function UW_CatBoxAtTop_Rejig ( &$out, &$text ) {
3636 global $wgVersion;
3737
3838 // no categories = no box
39 - if (!$out->mCategoryLinks)
 39+ if ( !$out->mCategoryLinks )
4040 return true;
4141
4242 /* add a category box to the top of the output,
@@ -43,16 +43,16 @@
4444 $catbox = "<div id=\"catbox\"><div>\n";
4545 $catbox .= "<h5>Categories</h5><ul>\n";
4646 $catlinks = array();
47 - if ($wgVersion == '1.13.0') {
 47+ if ( $wgVersion == '1.13.0' ) {
4848 $catlinks = $out->mCategoryLinks['normal'];
4949 } else {
5050 $catlinks = $out->mCategoryLinks;
5151 }
5252
53 - foreach ($catlinks as $cat)
 53+ foreach ( $catlinks as $cat )
5454 $catbox .= "<li>$cat</li>\n";
5555 $catbox .= "</ul></div></div>\n";
5656
57 - $text = $catbox.$text;
 57+ $text = $catbox . $text;
5858 return true;
5959 }

Status & tagging log