Index: trunk/phase3/includes/upload/UploadFromStash.php |
— | — | @@ -35,7 +35,7 @@ |
36 | 36 | * an opaque key to the user agent. |
37 | 37 | */ |
38 | 38 | |
39 | | - parent::initialize( $name, |
| 39 | + $this->initializePathInfo( $name, |
40 | 40 | $this->getRealPath ( $sessionData['mTempPath'] ), |
41 | 41 | $sessionData['mFileSize'], |
42 | 42 | false |
— | — | @@ -62,7 +62,7 @@ |
63 | 63 | return true; |
64 | 64 | } |
65 | 65 | |
66 | | - |
| 66 | + |
67 | 67 | /** |
68 | 68 | * There is no need to stash the image twice |
69 | 69 | */ |
Index: trunk/phase3/includes/upload/UploadFromUrl.php |
— | — | @@ -36,7 +36,7 @@ |
37 | 37 | global $wgTmpDirectory; |
38 | 38 | |
39 | 39 | $localFile = tempnam( $wgTmpDirectory, 'WEBUPLOAD' ); |
40 | | - parent::initialize( $name, $localFile, 0, true ); |
| 40 | + $this->initializePathInfo( $name, $localFile, 0, true ); |
41 | 41 | |
42 | 42 | $this->mUrl = trim( $url ); |
43 | 43 | } |
Index: trunk/phase3/includes/upload/UploadBase.php |
— | — | @@ -110,9 +110,14 @@ |
111 | 111 | public function __construct() {} |
112 | 112 | |
113 | 113 | /** |
114 | | - * Do the real variable initialization |
| 114 | + * Initialize the path information |
| 115 | + * @param $name string the desired destination name |
| 116 | + * @param $tempPath string the temporary path |
| 117 | + * @param $fileSize int the file size |
| 118 | + * @param $removeTempFile bool (false) remove the temporary file? |
| 119 | + * @return null |
115 | 120 | */ |
116 | | - public function initialize( $name, $tempPath, $fileSize, $removeTempFile = false ) { |
| 121 | + public function initializePathInfo( $name, $tempPath, $fileSize, $removeTempFile = false ) { |
117 | 122 | $this->mDesiredDestName = $name; |
118 | 123 | $this->mTempPath = $tempPath; |
119 | 124 | $this->mFileSize = $fileSize; |