r77112 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77111‎ | r77112 | r77113 >
Date:19:44, 22 November 2010
Author:reedy
Status:ok
Tags:
Comment:
Minor cleanup...
Modified paths:
  • /trunk/extensions/CodeBrowse/CodeBrowseRepoListView.php (modified) (history)
  • /trunk/extensions/CodeBrowse/CodeBrowseView.php (modified) (history)
  • /trunk/extensions/CodeBrowse/SpecialCodeBrowse.php (modified) (history)
  • /trunk/extensions/RdfRedland/test/includes/User.php (modified) (history)

Diff [purge]

Index: trunk/extensions/RdfRedland/test/includes/User.php
@@ -38,9 +38,13 @@
3939 private $realName;
4040 private $hasPage;
4141
42 - public function __construct( $id, $name = null ) {
43 - if ( $name ) $this->name = $name;
44 - if ( $id ) $this->id = $id;
 42+ public function __construct( $id = null, $name = null ) {
 43+ if ( $name ) {
 44+ $this->name = $name;
 45+ }
 46+ if ( $id ) {
 47+ $this->id = $id;
 48+ }
4549 foreach ( self::$Map as $key => $vals ) {
4650 if ( $id && $id == $key ) {
4751 $this->name = $vals[0];
Index: trunk/extensions/CodeBrowse/CodeBrowseRepoListView.php
@@ -4,12 +4,13 @@
55 function getContent() {
66 global $wgOut;
77 return $wgOut->parse( self::reallyGetContent() );
8 -
98 }
 9+
1010 static function reallyGetContent() {
1111 $repos = CodeRepository::getRepoList();
12 - if ( !count( $repos ) )
 12+ if ( !count( $repos ) ) {
1313 return wfMsg( 'code-no-repo' );
 14+ }
1415
1516 $text = '';
1617 foreach ( $repos as $repo ) {
Index: trunk/extensions/CodeBrowse/SpecialCodeBrowse.php
@@ -5,9 +5,6 @@
66 parent::__construct( 'CodeBrowse', 'codebrowse' );
77 }
88 function execute( $par ) {
9 - wfLoadExtensionMessages( 'CodeReview' );
10 - wfLoadExtensionMessages( 'CodeBrowse' );
11 -
129 $this->setHeaders();
1310
1411 global $wgRequest;
Index: trunk/extensions/CodeBrowse/CodeBrowseView.php
@@ -2,10 +2,11 @@
33
44 class CodeBrowseView {
55 static function newFromPath( $path, $request ) {
6 - if ( ltrim( $path, '/' ) == '' )
 6+ if ( ltrim( $path, '/' ) == '' ){
77 return new CodeBrowseRepoListView( $path, $request );
8 - else
 8+ } else {
99 return new CodeBrowseItemView( $path, $request );
 10+ }
1011 }
1112
1213 function __construct( $path, $request ) {
@@ -25,6 +26,4 @@
2627 function getFooter() {
2728 return '';
2829 }
29 -
30 -
3130 }

Status & tagging log