Index: trunk/phase3/includes/Wiki.php |
— | — | @@ -25,9 +25,9 @@ |
26 | 26 | |
27 | 27 | // Namespace might change when using redirects |
28 | 28 | $article = new Article( $title ); |
29 | | - if($action == 'view' && !$request->getVal( 'oldid' ) ) { |
| 29 | + if( $action == 'view' && !$request->getVal( 'oldid' ) ) { |
30 | 30 | $rTitle = Title::newFromRedirect( $article->fetchContent() ); |
31 | | - if($rTitle) { |
| 31 | + if( $rTitle ) { |
32 | 32 | # Reload from the page pointed to later |
33 | 33 | $article->mContentLoaded = false; |
34 | 34 | $ns = $rTitle->getNamespace(); |
— | — | @@ -36,11 +36,11 @@ |
37 | 37 | |
38 | 38 | // Categories and images are handled by a different class |
39 | 39 | if( $ns == NS_IMAGE ) { |
40 | | - unset($article); |
| 40 | + unset( $article ); |
41 | 41 | require_once( 'includes/ImagePage.php' ); |
42 | 42 | return new ImagePage( $title ); |
43 | 43 | } elseif( $ns == NS_CATEGORY ) { |
44 | | - unset($article); |
| 44 | + unset( $article ); |
45 | 45 | require_once( 'includes/CategoryPage.php' ); |
46 | 46 | return new CategoryPage( $title ); |
47 | 47 | } |
— | — | @@ -50,7 +50,7 @@ |
51 | 51 | function performAction( $action, &$output, &$article, &$title, &$user, &$request ) { |
52 | 52 | switch( $action ) { |
53 | 53 | case 'view': |
54 | | - $output->setSquidMaxage( $this->getVal('SquidMaxage') ); |
| 54 | + $output->setSquidMaxage( $this->getVal( 'SquidMaxage' ) ); |
55 | 55 | $article->view(); |
56 | 56 | break; |
57 | 57 | case 'watch': |
— | — | @@ -72,7 +72,7 @@ |
73 | 73 | $article->view(); |
74 | 74 | break; |
75 | 75 | case 'dublincore': |
76 | | - if( !$this->getVal('EnableDublinCoreRdf') ) { |
| 76 | + if( !$this->getVal( 'EnableDublinCoreRdf' ) ) { |
77 | 77 | wfHttpError( 403, 'Forbidden', wfMsg( 'nodublincore' ) ); |
78 | 78 | } else { |
79 | 79 | require_once( 'includes/Metadata.php' ); |
— | — | @@ -80,8 +80,8 @@ |
81 | 81 | } |
82 | 82 | break; |
83 | 83 | case 'creativecommons': |
84 | | - if( !$this->getVal('EnableCreativeCommonsRdf') ) { |
85 | | - wfHttpError( 403, 'Forbidden', wfMsg('nocreativecommons') ); |
| 84 | + if( !$this->getVal( 'EnableCreativeCommonsRdf' ) ) { |
| 85 | + wfHttpError( 403, 'Forbidden', wfMsg( 'nocreativecommons' ) ); |
86 | 86 | } else { |
87 | 87 | require_once( 'includes/Metadata.php' ); |
88 | 88 | wfCreativeCommonsRdf( $article ); |
— | — | @@ -92,7 +92,7 @@ |
93 | 93 | showCreditsPage( $article ); |
94 | 94 | break; |
95 | 95 | case 'submit': |
96 | | - if( !$this->getVal('CommandLineMode') && !$request->checkSessionCookie() ) { |
| 96 | + if( !$this->getVal( 'CommandLineMode' ) && !$request->checkSessionCookie() ) { |
97 | 97 | # Send a cookie so anons get talk message notifications |
98 | 98 | User::SetupSession(); |
99 | 99 | } |
— | — | @@ -102,12 +102,12 @@ |
103 | 103 | $external = $request->getVal( 'externaledit' ); |
104 | 104 | $section = $request->getVal( 'section' ); |
105 | 105 | $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 ) ) { |
108 | 108 | require_once( 'includes/EditPage.php' ); |
109 | 109 | $editor = new EditPage( $article ); |
110 | 110 | $editor->submit(); |
111 | | - } elseif($this->getVal('UseExternalEditor') &&($external || $user->getOption('externaleditor'))) { |
| 111 | + } elseif( $this->getVal( 'UseExternalEditor' ) && ( $external || $user->getOption( 'externaleditor' ) ) ) { |
112 | 112 | require_once( 'includes/ExternalEdit.php' ); |
113 | 113 | $mode = $request->getVal( 'mode' ); |
114 | 114 | $extedit = new ExternalEdit( $article, $mode ); |
— | — | @@ -115,8 +115,8 @@ |
116 | 116 | } |
117 | 117 | break; |
118 | 118 | 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' ) ); |
121 | 121 | } |
122 | 122 | require_once( 'includes/PageHistory.php' ); |
123 | 123 | $history = new PageHistory( $article ); |
— | — | @@ -128,7 +128,7 @@ |
129 | 129 | $raw->view(); |
130 | 130 | break; |
131 | 131 | default: |
132 | | - if(wfRunHooks('UnknownAction', array($action, $article))) { |
| 132 | + if( wfRunHooks( 'UnknownAction', array( $action, $article ) ) ) { |
133 | 133 | $output->errorpage( 'nosuchaction', 'nosuchactiontext' ); |
134 | 134 | } |
135 | 135 | } |