git.cweiske.de
/
phorkie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
54451e1
)
do not add files that are empty and have no name
author
Christian Weiske
<cweiske@cweiske.de>
Mon, 2 Apr 2012 20:49:33 +0000
(22:49 +0200)
committer
Christian Weiske
<cweiske@cweiske.de>
Mon, 2 Apr 2012 20:49:33 +0000
(22:49 +0200)
src/Phorkie/Repository/Post.php
patch
|
blob
|
history
diff --git
a/src/Phorkie/Repository/Post.php
b/src/Phorkie/Repository/Post.php
index 632f321c0ca3a187e3fe7a4256544c48d6fd9bf0..d2cab253f42a219c705fe671a5a0f792e57e1f95 100644
(file)
--- a/
src/Phorkie/Repository/Post.php
+++ b/
src/Phorkie/Repository/Post.php
@@
-29,7
+29,12
@@
class Repository_Post
$this->repo->setDescription($postData['description']);
$bChanged = false;
$this->repo->setDescription($postData['description']);
$bChanged = false;
- foreach ($postData['files'] as $num => $arFile) {
+ foreach ($postData['files'] as $arFile) {
+ if ($arFile['content'] == '' && $arFile['name'] == '') {
+ //empty (new) file
+ continue;
+ }
+
$orignalName = $this->sanitizeFilename($arFile['original_name']);
$name = $this->sanitizeFilename($arFile['name']);
$orignalName = $this->sanitizeFilename($arFile['original_name']);
$name = $this->sanitizeFilename($arFile['name']);