summaryrefslogtreecommitdiff
path: root/includes/UploadFromStash.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2009-06-10 13:00:47 +0200
committerPierre Schmitz <pierre@archlinux.de>2009-06-10 13:00:47 +0200
commit72e90545454c0e014318fa3c81658e035aac58c1 (patch)
tree9212e3f46868989c4d57ae9a5c8a1a80e4dc0702 /includes/UploadFromStash.php
parent565a0ccc371ec1a2a0e9b39487cbac18e6f60e25 (diff)
applying patch to version 1.15.0
Diffstat (limited to 'includes/UploadFromStash.php')
-rw-r--r--includes/UploadFromStash.php58
1 files changed, 0 insertions, 58 deletions
diff --git a/includes/UploadFromStash.php b/includes/UploadFromStash.php
deleted file mode 100644
index 8bff3b49..00000000
--- a/includes/UploadFromStash.php
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-
-class UploadFromStash extends UploadBase {
- static function isValidSessionKey( $key, $sessionData ) {
- return !empty( $key ) &&
- is_array( $sessionData ) &&
- isset( $sessionData[$key] ) &&
- isset( $sessionData[$key]['version'] ) &&
- $sessionData[$key]['version'] == self::SESSION_VERSION
- ;
- }
- static function isValidRequest( $request ) {
- $sessionData = $request->getSessionData('wsUploadData');
- return self::isValidSessionKey(
- $request->getInt( 'wpSessionKey' ),
- $sessionData
- );
- }
-
- function initialize( $name, $sessionData ) {
- /**
- * Confirming a temporarily stashed upload.
- * We don't want path names to be forged, so we keep
- * them in the session on the server and just give
- * an opaque key to the user agent.
- */
- $this->initialize( $name,
- $sessionData['mTempPath'],
- $sessionData['mFileSize'],
- false
- );
-
- $this->mFileProps = $sessionData['mFileProps'];
- }
- function initializeFromRequest( &$request ) {
- $sessionKey = $request->getInt( 'wpSessionKey' );
- $sessionData = $request->getSessionData('wsUploadData');
-
- $desiredDestName = $request->getText( 'wpDestFile' );
- if( !$desiredDestName )
- $desiredDestName = $request->getText( 'wpUploadFile' );
-
- return $this->initialize( $desiredDestName, $sessionData[$sessionKey] );
- }
-
- /**
- * File has been previously verified so no need to do so again.
- */
- protected function verifyFile( $tmpfile ) {
- return true;
- }
- /**
- * We're here from "ignore warnings anyway" so return just OK
- */
- function checkWarnings() {
- return array();
- }
-}