r53860 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53859‎ | r53860 | r53861 >
Date:06:54, 28 July 2009
Author:nikerabbit
Status:ok
Tags:
Comment:
* formatSize is not static
* isset returns bool
Modified paths:
  • /trunk/phase3/includes/HttpFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/HttpFunctions.php
@@ -286,7 +286,7 @@
287287 $this->target_file_path = ( isset( $opt['target_file_path'] ) ) ? $opt['target_file_path'] : false;
288288 $this->upload_session_key = ( isset( $opt['upload_session_key'] ) ) ? $opt['upload_session_key'] : false;
289289 $this->headers_only = ( isset( $opt['headers_only'] ) ) ? $opt['headers_only'] : false;
290 - $this->do_close_session_update = ( isset( $opt['do_close_session_update'] ) ) ? true : false;
 290+ $this->do_close_session_update = isset( $opt['do_close_session_update'] );
291291 }
292292
293293 /**
@@ -519,7 +519,7 @@
520520 }
521521
522522 public function callbackWriteBody( $ch, $data_packet ){
523 - global $wgMaxUploadSize;
 523+ global $wgMaxUploadSize, $wgLang;
524524
525525 // write out the content
526526 if( fwrite( $this->fp, $data_packet ) === false ){
@@ -535,7 +535,7 @@
536536 if( $this->current_fsize > $wgMaxUploadSize ){
537537 wfDebug( __METHOD__ . " ::http download too large\n" );
538538 $this->status = Status::newFatal( 'HTTP::file-has-grown-beyond-upload-limit-killing: downloaded more than ' .
539 - Language::formatSize( $wgMaxUploadSize ) . ' ' );
 539+ $wgLang->formatSize( $wgMaxUploadSize ) . ' ' );
540540 return 0;
541541 }
542542

Status & tagging log