From 4137e993d11e926ae28343c1eeac1a46977efd47 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Tue, 14 Jul 2015 08:05:03 +0200 Subject: jump to correct hash after renaming a file --- src/phorkie/Repository/Post.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/phorkie/Repository/Post.php') diff --git a/src/phorkie/Repository/Post.php b/src/phorkie/Repository/Post.php index 7a373aa..b9489e7 100644 --- a/src/phorkie/Repository/Post.php +++ b/src/phorkie/Repository/Post.php @@ -13,6 +13,12 @@ class Repository_Post */ public $newfileName; + /** + * List of files that have been renamed. + * + * @var array + */ + public $renameMap = array(); public function __construct(Repository $repo = null) @@ -48,6 +54,9 @@ class Repository_Post $bChanged = true; } + $this->renameMap = array(); + $this->newfileName = null; + foreach ($postData['files'] as $num => $arFile) { $bUpload = false; if ($_FILES['files']['error'][$num]['upload'] == 0) { @@ -102,6 +111,7 @@ class Repository_Post ->addArgument($name) ->execute(); $bCommit = true; + $this->renameMap[$originalName] = $name; } else { $name = $originalName; } -- cgit v1.2.3