From 83bd784708c54eb15d98ef01d5be16de2446cf5d Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Fri, 1 Apr 2016 04:17:12 +0000 Subject: [PATCH] allowed blank short description when uploading a file --- codepot/src/codepot/controllers/file.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/codepot/src/codepot/controllers/file.php b/codepot/src/codepot/controllers/file.php index aaf1cad0..bbe76b12 100644 --- a/codepot/src/codepot/controllers/file.php +++ b/codepot/src/codepot/controllers/file.php @@ -298,8 +298,9 @@ class File extends Controller $d = $this->input->post("file_new_file_desc_{$i}"); if ($d === FALSE || ($d = trim($d)) == '') { - $status = "error - no short description for {$_FILES[$fid]['name']}"; - break; + //$status = "error - no short description for {$_FILES[$fid]['name']}"; + //break; + $d = ''; } if (strpbrk($_FILES[$fid]['name'], CODEPOT_DISALLOWED_LETTERS_IN_FILENAME) !== FALSE) @@ -381,8 +382,9 @@ class File extends Controller $d = $this->input->post("file_add_file_desc_{$i}"); if ($d === FALSE || ($d = trim($d)) == '') { - $status = "error - no short description for {$_FILES[$fid]['name']}"; - break; + //$status = "error - no short description for {$_FILES[$fid]['name']}"; + //break; + $d = ''; } if (strpbrk($_FILES[$fid]['name'], CODEPOT_DISALLOWED_LETTERS_IN_FILENAME) !== FALSE) @@ -470,8 +472,9 @@ class File extends Controller { if (($d = trim($d)) == '') { - $status = "error - no short description for {$n}"; - break; + //$status = "error - no short description for {$n}"; + //break; + $d = ''; } array_push ($edit_files, array ('name' => $n, 'desc' => $d));