Index: trunk/extensions/RdfRedland/test/includes/User.php |
— | — | @@ -38,9 +38,13 @@ |
39 | 39 | private $realName; |
40 | 40 | private $hasPage; |
41 | 41 | |
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 | + } |
45 | 49 | foreach ( self::$Map as $key => $vals ) { |
46 | 50 | if ( $id && $id == $key ) { |
47 | 51 | $this->name = $vals[0]; |
Index: trunk/extensions/CodeBrowse/CodeBrowseRepoListView.php |
— | — | @@ -4,12 +4,13 @@ |
5 | 5 | function getContent() { |
6 | 6 | global $wgOut; |
7 | 7 | return $wgOut->parse( self::reallyGetContent() ); |
8 | | - |
9 | 8 | } |
| 9 | + |
10 | 10 | static function reallyGetContent() { |
11 | 11 | $repos = CodeRepository::getRepoList(); |
12 | | - if ( !count( $repos ) ) |
| 12 | + if ( !count( $repos ) ) { |
13 | 13 | return wfMsg( 'code-no-repo' ); |
| 14 | + } |
14 | 15 | |
15 | 16 | $text = ''; |
16 | 17 | foreach ( $repos as $repo ) { |
Index: trunk/extensions/CodeBrowse/SpecialCodeBrowse.php |
— | — | @@ -5,9 +5,6 @@ |
6 | 6 | parent::__construct( 'CodeBrowse', 'codebrowse' ); |
7 | 7 | } |
8 | 8 | function execute( $par ) { |
9 | | - wfLoadExtensionMessages( 'CodeReview' ); |
10 | | - wfLoadExtensionMessages( 'CodeBrowse' ); |
11 | | - |
12 | 9 | $this->setHeaders(); |
13 | 10 | |
14 | 11 | global $wgRequest; |
Index: trunk/extensions/CodeBrowse/CodeBrowseView.php |
— | — | @@ -2,10 +2,11 @@ |
3 | 3 | |
4 | 4 | class CodeBrowseView { |
5 | 5 | static function newFromPath( $path, $request ) { |
6 | | - if ( ltrim( $path, '/' ) == '' ) |
| 6 | + if ( ltrim( $path, '/' ) == '' ){ |
7 | 7 | return new CodeBrowseRepoListView( $path, $request ); |
8 | | - else |
| 8 | + } else { |
9 | 9 | return new CodeBrowseItemView( $path, $request ); |
| 10 | + } |
10 | 11 | } |
11 | 12 | |
12 | 13 | function __construct( $path, $request ) { |
— | — | @@ -25,6 +26,4 @@ |
26 | 27 | function getFooter() { |
27 | 28 | return ''; |
28 | 29 | } |
29 | | - |
30 | | - |
31 | 30 | } |