summaryrefslogtreecommitdiff
path: root/includes/upload/UploadFromStash.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2011-06-22 11:28:20 +0200
committerPierre Schmitz <pierre@archlinux.de>2011-06-22 11:28:20 +0200
commit9db190c7e736ec8d063187d4241b59feaf7dc2d1 (patch)
tree46d1a0dee7febef5c2d57a9f7b972be16a163b3d /includes/upload/UploadFromStash.php
parent78677c7bbdcc9739f6c10c75935898a20e1acd9e (diff)
update to MediaWiki 1.17.0
Diffstat (limited to 'includes/upload/UploadFromStash.php')
-rw-r--r--includes/upload/UploadFromStash.php17
1 files changed, 8 insertions, 9 deletions
diff --git a/includes/upload/UploadFromStash.php b/includes/upload/UploadFromStash.php
index 17e922b0..156781e9 100644
--- a/includes/upload/UploadFromStash.php
+++ b/includes/upload/UploadFromStash.php
@@ -1,10 +1,9 @@
<?php
/**
- * @file
- * @ingroup upload
- *
* Implements uploading from previously stored file.
*
+ * @file
+ * @ingroup upload
* @author Bryan Tong Minh
*/
@@ -14,13 +13,13 @@ class UploadFromStash extends UploadBase {
is_array( $sessionData ) &&
isset( $sessionData[$key] ) &&
isset( $sessionData[$key]['version'] ) &&
- $sessionData[$key]['version'] == self::SESSION_VERSION;
+ $sessionData[$key]['version'] == UploadBase::SESSION_VERSION;
}
public static function isValidRequest( $request ) {
- $sessionData = $request->getSessionData( 'wsUploadData' );
+ $sessionData = $request->getSessionData( UploadBase::SESSION_KEYNAME );
return self::isValidSessionKey(
- $request->getInt( 'wpSessionKey' ),
+ $request->getText( 'wpSessionKey' ),
$sessionData
);
}
@@ -45,8 +44,8 @@ class UploadFromStash extends UploadBase {
}
public function initializeFromRequest( &$request ) {
- $sessionKey = $request->getInt( 'wpSessionKey' );
- $sessionData = $request->getSessionData('wsUploadData');
+ $sessionKey = $request->getText( 'wpSessionKey' );
+ $sessionData = $request->getSessionData( UploadBase::SESSION_KEYNAME );
$desiredDestName = $request->getText( 'wpDestFile' );
if( !$desiredDestName )
@@ -65,7 +64,7 @@ class UploadFromStash extends UploadBase {
/**
* There is no need to stash the image twice
*/
- public function stashSession() {
+ public function stashSession( $key = null ) {
if ( !empty( $this->mSessionKey ) )
return $this->mSessionKey;
return parent::stashSession();