Index: trunk/phase3/includes/upload/UploadStash.php |
— | — | @@ -219,18 +219,18 @@ |
220 | 220 | wfDebug( __METHOD__ . " key for '$path': $key\n" ); |
221 | 221 | |
222 | 222 | // if not already in a temporary area, put it there |
223 | | - $storeResult = $this->repo->storeTemp( basename( $path ), $path ); |
| 223 | + $storeStatus = $this->repo->storeTemp( basename( $path ), $path ); |
224 | 224 | |
225 | | - if ( ! $storeResult->isOK() ) { |
| 225 | + if ( ! $storeStatus->isOK() ) { |
226 | 226 | // It is a convention in MediaWiki to only return one error per API exception, even if multiple errors |
227 | 227 | // are available. We use reset() to pick the "first" thing that was wrong, preferring errors to warnings. |
228 | | - // This is a bit lame, as we may have more info in the $storeResult and we're throwing it away, but to fix it means |
| 228 | + // This is a bit lame, as we may have more info in the $storeStatus and we're throwing it away, but to fix it means |
229 | 229 | // redesigning API errors significantly. |
230 | | - // $storeResult->value just contains the virtual URL (if anything) which is probably useless to the caller |
231 | | - $error = $storeResult->getErrorsArray(); |
| 230 | + // $storeStatus->value just contains the virtual URL (if anything) which is probably useless to the caller |
| 231 | + $error = $storeStatus->getErrorsArray(); |
232 | 232 | $error = reset( $error ); |
233 | 233 | if ( ! count( $error ) ) { |
234 | | - $error = $storeResult->getWarningsArray(); |
| 234 | + $error = $storeStatus->getWarningsArray(); |
235 | 235 | $error = reset( $error ); |
236 | 236 | if ( ! count( $error ) ) { |
237 | 237 | $error = array( 'unknown', 'no error recorded' ); |
— | — | @@ -238,11 +238,10 @@ |
239 | 239 | } |
240 | 240 | throw new UploadStashFileException( "error storing file in '$path': " . implode( '; ', $error ) ); |
241 | 241 | } |
242 | | - $stashPath = $storeResult->value; |
| 242 | + $stashPath = $storeStatus->value; |
243 | 243 | |
244 | 244 | // fetch the current user ID |
245 | 245 | if ( !$this->isLoggedIn ) { |
246 | | - wfDebugCallstack(); |
247 | 246 | throw new UploadStashNotLoggedInException( __METHOD__ . ' No user is logged in, files must belong to users' ); |
248 | 247 | } |
249 | 248 | |