aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2013-11-12 19:43:19 +0100
committerChristian Weiske <cweiske@cweiske.de>2013-11-12 19:43:19 +0100
commitd2dbd0d543a8915ab8553a6565a2227894aa3d7e (patch)
treeed2763cf26fd725ef0174e9fbb62b82ca12dbcba /src
parentec4492e355c665b0148ddfce1982e946565b8447 (diff)
downloadphorkie-d2dbd0d543a8915ab8553a6565a2227894aa3d7e.tar.gz
phorkie-d2dbd0d543a8915ab8553a6565a2227894aa3d7e.zip
allow deleting and renaming of pastes with only binary files
Diffstat (limited to 'src')
-rw-r--r--src/phorkie/Repository/Post.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/phorkie/Repository/Post.php b/src/phorkie/Repository/Post.php
index 0860cad..226c2d8 100644
--- 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;
}
}