X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fupload%2FUploadStash.php;h=733c6866805eb7c5c6cfbf158eb69348c09ef4c2;hb=8f5ce91a043f74ea174c1f5feeb299f4cd5823eb;hp=c7fd23a9d5467651e41f3f05c6ee29e3161996fb;hpb=04859f5c906f69d13d783c42955f240551edd80c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/upload/UploadStash.php b/includes/upload/UploadStash.php index c7fd23a9d5..733c686680 100644 --- a/includes/upload/UploadStash.php +++ b/includes/upload/UploadStash.php @@ -152,7 +152,7 @@ class UploadStash { /** * Getter for file metadata. * - * @param key String: key under which file information is stored + * @param $key String: key under which file information is stored * @return Array */ public function getMetadata ( $key ) { @@ -163,7 +163,7 @@ class UploadStash { /** * Getter for fileProps * - * @param key String: key under which file information is stored + * @param $key String: key under which file information is stored * @return Array */ public function getFileProps ( $key ) { @@ -319,8 +319,8 @@ class UploadStash { /** * Remove a particular file from the stash. Also removes it from the repo. * - * @throws UploadStashNotLoggedInException - * @throws UploadStashWrongOwnerException + * @param $key + * @throws UploadStashNoSuchKeyException|UploadStashNotLoggedInException|UploadStashWrongOwnerException * @return boolean: success */ public function removeFile( $key ) { @@ -361,14 +361,11 @@ class UploadStash { $dbw = $this->repo->getMasterDb(); - // this gets its own transaction since it's called serially by the cleanupUploadStash maintenance script - $dbw->begin( __METHOD__ ); $dbw->delete( 'uploadstash', array( 'us_key' => $key ), __METHOD__ ); - $dbw->commit( __METHOD__ ); // TODO: look into UnregisteredLocalFile and find out why the rv here is sometimes wrong (false when file was removed) // for now, ignore. @@ -419,6 +416,8 @@ class UploadStash { * with an extension. * XXX this is somewhat redundant with the checks that ApiUpload.php does with incoming * uploads versus the desired filename. Maybe we can get that passed to us... + * @param $path + * @throws UploadStashFileException * @return string */ public static function getExtensionForPath( $path ) {