r12594 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r12593‎ | r12594 | r12595 >
Date:00:16, 11 January 2006
Author:vibber
Status:old
Tags:
Comment:
whitespace
Modified paths:
  • /trunk/phase3/includes/Wiki.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Wiki.php
@@ -25,9 +25,9 @@
2626
2727 // Namespace might change when using redirects
2828 $article = new Article( $title );
29 - if($action == 'view' && !$request->getVal( 'oldid' ) ) {
 29+ if( $action == 'view' && !$request->getVal( 'oldid' ) ) {
3030 $rTitle = Title::newFromRedirect( $article->fetchContent() );
31 - if($rTitle) {
 31+ if( $rTitle ) {
3232 # Reload from the page pointed to later
3333 $article->mContentLoaded = false;
3434 $ns = $rTitle->getNamespace();
@@ -36,11 +36,11 @@
3737
3838 // Categories and images are handled by a different class
3939 if( $ns == NS_IMAGE ) {
40 - unset($article);
 40+ unset( $article );
4141 require_once( 'includes/ImagePage.php' );
4242 return new ImagePage( $title );
4343 } elseif( $ns == NS_CATEGORY ) {
44 - unset($article);
 44+ unset( $article );
4545 require_once( 'includes/CategoryPage.php' );
4646 return new CategoryPage( $title );
4747 }
@@ -50,7 +50,7 @@
5151 function performAction( $action, &$output, &$article, &$title, &$user, &$request ) {
5252 switch( $action ) {
5353 case 'view':
54 - $output->setSquidMaxage( $this->getVal('SquidMaxage') );
 54+ $output->setSquidMaxage( $this->getVal( 'SquidMaxage' ) );
5555 $article->view();
5656 break;
5757 case 'watch':
@@ -72,7 +72,7 @@
7373 $article->view();
7474 break;
7575 case 'dublincore':
76 - if( !$this->getVal('EnableDublinCoreRdf') ) {
 76+ if( !$this->getVal( 'EnableDublinCoreRdf' ) ) {
7777 wfHttpError( 403, 'Forbidden', wfMsg( 'nodublincore' ) );
7878 } else {
7979 require_once( 'includes/Metadata.php' );
@@ -80,8 +80,8 @@
8181 }
8282 break;
8383 case 'creativecommons':
84 - if( !$this->getVal('EnableCreativeCommonsRdf') ) {
85 - wfHttpError( 403, 'Forbidden', wfMsg('nocreativecommons') );
 84+ if( !$this->getVal( 'EnableCreativeCommonsRdf' ) ) {
 85+ wfHttpError( 403, 'Forbidden', wfMsg( 'nocreativecommons' ) );
8686 } else {
8787 require_once( 'includes/Metadata.php' );
8888 wfCreativeCommonsRdf( $article );
@@ -92,7 +92,7 @@
9393 showCreditsPage( $article );
9494 break;
9595 case 'submit':
96 - if( !$this->getVal('CommandLineMode') && !$request->checkSessionCookie() ) {
 96+ if( !$this->getVal( 'CommandLineMode' ) && !$request->checkSessionCookie() ) {
9797 # Send a cookie so anons get talk message notifications
9898 User::SetupSession();
9999 }
@@ -102,12 +102,12 @@
103103 $external = $request->getVal( 'externaledit' );
104104 $section = $request->getVal( 'section' );
105105 $oldid = $request->getVal( 'oldid' );
106 - if(!$this->getVal('UseExternalEditor') || $action=='submit' || $internal ||
107 - $section || $oldid ||(!$user->getOption('externaleditor') && !$external)) {
 106+ if( !$this->getVal( 'UseExternalEditor' ) || $action=='submit' || $internal ||
 107+ $section || $oldid ||( !$user->getOption( 'externaleditor' ) && !$external ) ) {
108108 require_once( 'includes/EditPage.php' );
109109 $editor = new EditPage( $article );
110110 $editor->submit();
111 - } elseif($this->getVal('UseExternalEditor') &&($external || $user->getOption('externaleditor'))) {
 111+ } elseif( $this->getVal( 'UseExternalEditor' ) && ( $external || $user->getOption( 'externaleditor' ) ) ) {
112112 require_once( 'includes/ExternalEdit.php' );
113113 $mode = $request->getVal( 'mode' );
114114 $extedit = new ExternalEdit( $article, $mode );
@@ -115,8 +115,8 @@
116116 }
117117 break;
118118 case 'history':
119 - if($_SERVER['REQUEST_URI'] == $title->getInternalURL('action=history')) {
120 - $output->setSquidMaxage( $this->getVal('SquidMaxage') );
 119+ if( $_SERVER['REQUEST_URI'] == $title->getInternalURL( 'action=history' ) ) {
 120+ $output->setSquidMaxage( $this->getVal( 'SquidMaxage' ) );
121121 }
122122 require_once( 'includes/PageHistory.php' );
123123 $history = new PageHistory( $article );
@@ -128,7 +128,7 @@
129129 $raw->view();
130130 break;
131131 default:
132 - if(wfRunHooks('UnknownAction', array($action, $article))) {
 132+ if( wfRunHooks( 'UnknownAction', array( $action, $article ) ) ) {
133133 $output->errorpage( 'nosuchaction', 'nosuchactiontext' );
134134 }
135135 }

Status & tagging log