r53296 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53295‎ | r53296 | r53297 >
Date:07:38, 15 July 2009
Author:nikerabbit
Status:ok
Tags:
Comment:
Only whitespace changes
Modified paths:
  • /trunk/phase3/includes/HttpFunctions.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUpload.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/HttpFunctions.php
@@ -129,7 +129,7 @@
130130 *
131131 * @param $session_id String: the session id to grab download details from
132132 * @param $upload_session_key String: the key of the given upload session
133 - * (a given client could have started a few http uploads at once)
 133+ * (a given client could have started a few http uploads at once)
134134 */
135135 public static function doSessionIdDownload( $session_id, $upload_session_key ){
136136 global $wgUser, $wgEnableWriteAPI, $wgAsyncHTTPTimeout;
@@ -154,9 +154,9 @@
155155 session_write_close();
156156
157157 $req = new HttpRequest( $sd['url'], array(
158 - 'target_file_path' => $sd['target_file_path'],
 158+ 'target_file_path' => $sd['target_file_path'],
159159 'upload_session_key'=> $upload_session_key,
160 - 'timeout' => $wgAsyncHTTPTimeout
 160+ 'timeout' => $wgAsyncHTTPTimeout
161161 ) );
162162 // run the actual request .. (this can take some time)
163163 wfDebug( __METHOD__ . "do Request: " . $sd['url'] . ' tf: ' . $sd['target_file_path'] );
@@ -264,9 +264,9 @@
265265 * Get the contents of a file by HTTP
266266 * @param $url string Full URL to act on
267267 * @param $Opt associative array Optional array of options:
268 - * 'method' => 'GET', 'POST' etc.
269 - * 'target_file_path' => if curl should output to a target file
270 - * 'adapter' => 'curl', 'soket'
 268+ * 'method' => 'GET', 'POST' etc.
 269+ * 'target_file_path' => if curl should output to a target file
 270+ * 'adapter' => 'curl', 'soket'
271271 */
272272 public function doRequest() {
273273 # Use curl if available
@@ -278,9 +278,9 @@
279279 }
280280
281281 private function doCurlReq(){
282 - global $wgHTTPProxy, $wgTitle;
 282+ global $wgHTTPProxy, $wgTitle;
283283
284 - $status = Status::newGood();
 284+ $status = Status::newGood();
285285 $c = curl_init( $this->url );
286286
287287 // proxy setup:
Index: trunk/phase3/includes/specials/SpecialUpload.php
@@ -27,7 +27,7 @@
2828 var $mDestWarningAck;
2929 var $mLocalFile;
3030
31 - var $mUpload; // Instance of UploadBase or derivative
 31+ var $mUpload; // Instance of UploadBase or derivative
3232
3333 # Placeholders for text injection by hooks (must be HTML)
3434 # extensions should take care to _append_ to the present value
@@ -77,7 +77,7 @@
7878 $this->mReUpload = $request->getCheck( 'wpReUpload' );
7979
8080 $this->mAction = $request->getVal( 'action' );
81 - $this->mUpload = UploadBase::createFromRequest( $request );
 81+ $this->mUpload = UploadBase::createFromRequest( $request );
8282 }
8383
8484
@@ -156,14 +156,14 @@
157157 *
158158 * FIXME this should really use the standard Status class (instead of associative array)
159159 * FIXME would be nice if we refactored this into the upload api.
160 - * (the special upload page is not the only response point that needs clean localized error msgs)
 160+ * (the special upload page is not the only response point that needs clean localized error msgs)
161161 *
162162 * @access private
163163 */
164164 function processUpload(){
165165 global $wgOut, $wgFileExtensions, $wgLang;
166 - $details = $this->internalProcessUpload();
167 - switch( $details['status'] ) {
 166+ $details = $this->internalProcessUpload();
 167+ switch( $details['status'] ) {
168168 case UploadBase::SUCCESS:
169169 $wgOut->redirect( $this->mLocalFile->getTitle()->getFullURL() );
170170 break;
@@ -239,7 +239,7 @@
240240
241241 default:
242242 throw new MWException( __METHOD__ . ": Unknown value `{$details['status']}`" );
243 - }
 243+ }
244244 }
245245
246246 /**
@@ -835,7 +835,7 @@
836836 Xml::element( 'legend', null, wfMsg( 'upload' ) ) .
837837 Xml::openElement( 'table', array( 'border' => '0', 'id' => 'mw-upload-table' ) ) .
838838 "<tr>
839 - {$this->uploadFormTextTop}
 839+ {$this->uploadFormTextTop}
840840 <td class='mw-label'>
841841 <label for='wpUploadFile'>{$sourcefilename}</label>
842842 </td>

Status & tagging log