r51781 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51780‎ | r51781 | r51782 >
Date:03:45, 12 June 2009
Author:tstarling
Status:deferred
Tags:
Comment:
Fixed indenting on a few lines.
Modified paths:
  • /trunk/extensions/Collection/Collection.hooks.php (modified) (history)
  • /trunk/extensions/Collection/Collection.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Collection/Collection.php
@@ -143,8 +143,8 @@
144144 $collection = array();
145145 }
146146 $r = new AjaxResponse( $json->encode( array( 'collection' => $collection ) ) );
147 - $r->setContentType( 'application/json' );
148 - return $r;
 147+ $r->setContentType( 'application/json' );
 148+ return $r;
149149 }
150150
151151 $wgAjaxExportList[] = 'wfAjaxGetCollection';
@@ -157,8 +157,8 @@
158158 $collection = $json->decode( $collection );
159159 $_SESSION['wsCollection'] = $collection;
160160 $r = new AjaxResponse( $json->encode( array( 'collection' => $collection ) ) );
161 - $r->setContentType( 'application/json' );
162 - return $r;
 161+ $r->setContentType( 'application/json' );
 162+ return $r;
163163 }
164164
165165 $wgAjaxExportList[] = 'wfAjaxPostCollection';
@@ -169,15 +169,15 @@
170170 'collection_id' => $collection_id,
171171 'writer' => $writer
172172 ) );
173 - $r = new AjaxResponse( $json->encode( $result ) );
174 - $r->setContentType( 'application/json' );
175 - return $r;
 173+ $r = new AjaxResponse( $json->encode( $result ) );
 174+ $r->setContentType( 'application/json' );
 175+ return $r;
176176 }
177177
178178 $wgAjaxExportList[] = 'wfAjaxGetMWServeStatus';
179179
180180 function wfAjaxCollectionAddArticle( $namespace=0, $title='', $oldid='' ) {
181 - SpecialCollection::addArticleFromName( $namespace, $title, $oldid );
 181+ SpecialCollection::addArticleFromName( $namespace, $title, $oldid );
182182 return '';
183183 }
184184
Index: trunk/extensions/Collection/Collection.hooks.php
@@ -210,12 +210,12 @@
211211 $addRemoveState = 'addpage';
212212 $action = 'add';
213213 $uaction = 'Add';
214 - $other_action = 'remove';
 214+ $other_action = 'remove';
215215 } else {
216216 $addRemoveState = 'removepage';
217217 $action = 'remove';
218218 $uaction = 'Remove';
219 - $other_action = 'add';
 219+ $other_action = 'add';
220220 }
221221
222222 $out .= Xml::tags( 'li', array( 'id' => "coll-{$action}_page" ),
@@ -272,7 +272,7 @@
273273 ),
274274 "wgCollectionAddRemoveState = '$addRemoveState';"
275275 );
276 - $out .= Xml::element( 'script',
 276+ $out .= Xml::element( 'script',
277277 array(
278278 'type' => $wgJsMimeType,
279279 'src' => "$wgScriptPath/extensions/Collection/collection/portlet.js?$wgCollectionStyleVersion",

Status & tagging log