http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62164

Revision: 62164
Author:   mah
Date:     2010-02-09 03:54:59 +0000 (Tue, 09 Feb 2010)

Log Message:
-----------
follow up r61407
rename UploadBase::initialize to UploadBase::initializeFileInfo
Each sub-class implements initialize() with a different prototype.  Only two 
sub-classes actually use the parent initialize().

Modified Paths:
--------------
    trunk/phase3/includes/upload/UploadBase.php
    trunk/phase3/includes/upload/UploadFromStash.php
    trunk/phase3/includes/upload/UploadFromUrl.php

Modified: trunk/phase3/includes/upload/UploadBase.php
===================================================================
--- trunk/phase3/includes/upload/UploadBase.php 2010-02-09 03:43:20 UTC (rev 
62163)
+++ trunk/phase3/includes/upload/UploadBase.php 2010-02-09 03:54:59 UTC (rev 
62164)
@@ -110,9 +110,14 @@
        public function __construct() {}
 
        /**
-        * Do the real variable initialization
+        * Initialize the path information
+        * @param $name string the desired destination name
+        * @param $tempPath string the temporary path
+        * @param $fileSize int the file size
+        * @param $removeTempFile bool (false) remove the temporary file?
+        * @return null
         */
-       public function initialize( $name, $tempPath, $fileSize, 
$removeTempFile = false ) {
+       public function initializePathInfo( $name, $tempPath, $fileSize, 
$removeTempFile = false ) {
                $this->mDesiredDestName = $name;
                $this->mTempPath = $tempPath;
                $this->mFileSize = $fileSize;

Modified: trunk/phase3/includes/upload/UploadFromStash.php
===================================================================
--- trunk/phase3/includes/upload/UploadFromStash.php    2010-02-09 03:43:20 UTC 
(rev 62163)
+++ trunk/phase3/includes/upload/UploadFromStash.php    2010-02-09 03:54:59 UTC 
(rev 62164)
@@ -35,7 +35,7 @@
                         * an opaque key to the user agent.
                         */
 
-                       parent::initialize( $name,
+                       $this->initializePathInfo( $name,
                                $this->getRealPath ( $sessionData['mTempPath'] 
),
                                $sessionData['mFileSize'],
                                false
@@ -62,7 +62,7 @@
                return true;
        }
 
-       
+
        /**
         * There is no need to stash the image twice
         */

Modified: trunk/phase3/includes/upload/UploadFromUrl.php
===================================================================
--- trunk/phase3/includes/upload/UploadFromUrl.php      2010-02-09 03:43:20 UTC 
(rev 62163)
+++ trunk/phase3/includes/upload/UploadFromUrl.php      2010-02-09 03:54:59 UTC 
(rev 62164)
@@ -36,7 +36,7 @@
                global $wgTmpDirectory;
 
                $localFile = tempnam( $wgTmpDirectory, 'WEBUPLOAD' );
-               parent::initialize( $name, $localFile, 0, true );
+               $this->initializePathInfo( $name, $localFile, 0, true );
 
                $this->mUrl = trim( $url );
        }



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to