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
(from parent 1:
ec4492e
)
allow deleting and renaming of pastes with only binary files
author
Christian Weiske
<cweiske@cweiske.de>
Tue, 12 Nov 2013 18:43:19 +0000
(19:43 +0100)
committer
Christian Weiske
<cweiske@cweiske.de>
Tue, 12 Nov 2013 18:43:19 +0000
(19:43 +0100)
src/phorkie/Repository/Post.php
patch
|
blob
|
history
diff --git
a/src/phorkie/Repository/Post.php
b/src/phorkie/Repository/Post.php
index 0860cad631b665fb50f047fab80a35163a790760..226c2d8f65d7a1133fbfdf0df032822c8b9169a1 100644
(file)
--- a/
src/phorkie/Repository/Post.php
+++ b/
src/phorkie/Repository/Post.php
@@
-178,7
+178,15
@@
class Repository_Post
if ($_FILES['files']['error'][$num]['upload'] == 0) {
return true;
}
- if ($arFile['content'] != '') {
+ if (isset($arFile['content']) && $arFile['content'] != '') {
+ return true;
+ }
+ if (isset($arFile['name']) && $arFile['name'] != '') {
+ //binary files do not have content
+ return true;
+ }
+ if (isset($arFile['delete']) && $arFile['delete'] != '') {
+ //binary files do not have content
return true;
}
}