Index: trunk/phase3/includes/upload/UploadBase.php |
— | — | @@ -216,6 +216,19 @@ |
217 | 217 | } |
218 | 218 | |
219 | 219 | /** |
| 220 | + * Finish appending to the Repo file |
| 221 | + * |
| 222 | + * @param $toAppendPath String: path to the Repo file that will be appended to. |
| 223 | + * @return Status Status |
| 224 | + */ |
| 225 | + protected function appendFinish( $toAppendPath ) { |
| 226 | + $repo = RepoGroup::singleton()->getLocalRepo(); |
| 227 | + $status = $repo->appendFinish( $toAppendPath ); |
| 228 | + return $status; |
| 229 | + } |
| 230 | + |
| 231 | + |
| 232 | + /** |
220 | 233 | * @param $srcPath String: the source path |
221 | 234 | * @return the real path if it was a virtual URL |
222 | 235 | */ |
Index: trunk/phase3/includes/filerepo/FileRepo.php |
— | — | @@ -429,7 +429,8 @@ |
430 | 430 | |
431 | 431 | |
432 | 432 | /** |
433 | | - * Append the contents of the source path to the given file. |
| 433 | + * Append the contents of the source path to the given file, OR queue |
| 434 | + * the appending operation in anticipation of a later appendFinish() call. |
434 | 435 | * @param $srcPath String: location of the source file |
435 | 436 | * @param $toAppendPath String: path to append to. |
436 | 437 | * @param $flags Integer: bitfield, may be FileRepo::DELETE_SOURCE to indicate |
— | — | @@ -439,6 +440,13 @@ |
440 | 441 | abstract function append( $srcPath, $toAppendPath, $flags = 0 ); |
441 | 442 | |
442 | 443 | /** |
| 444 | + * Finish the append operation. |
| 445 | + * @param $toAppendPath String: path to append to. |
| 446 | + * @return mixed Status or false |
| 447 | + */ |
| 448 | + abstract function appendFinish( $toAppendPath ); |
| 449 | + |
| 450 | + /** |
443 | 451 | * Remove a temporary file or mark it for garbage collection |
444 | 452 | * @param $virtualUrl String: the virtual URL returned by storeTemp |
445 | 453 | * @return Boolean: true on success, false on failure |