aboutsummaryrefslogtreecommitdiff
path: root/src/phorkie/Repository/Post.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/phorkie/Repository/Post.php')
-rw-r--r--src/phorkie/Repository/Post.php10
1 files changed, 10 insertions, 0 deletions
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;
}