From d2dbd0d543a8915ab8553a6565a2227894aa3d7e Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Tue, 12 Nov 2013 19:43:19 +0100 Subject: allow deleting and renaming of pastes with only binary files --- src/phorkie/Repository/Post.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/phorkie/Repository/Post.php') 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; } } -- cgit v1.2.3