|
From: <php...@be...> - 2003-06-01 19:25:16
|
This update needs to be reverted. Error messages need to be shown to
users when attaching something to an existing bug. If you want to not
fail bug creation due to an attachment problem, then some logic needs to
be added to handle just that case. Removing all error messages for any
attachment is not the way to do it.
On Sun, Jun 01, 2003 at 11:18:49AM -0700, Ken Tossell wrote:
> Update of /cvsroot/phpbt/phpbt
> In directory sc8-pr-cvs1:/tmp/cvs-serv26267
>
> Modified Files:
> bug.php
> Log Message:
> let bug entry succeed with attachment errors
>
>
> Index: bug.php
> ===================================================================
> RCS file: /cvsroot/phpbt/phpbt/bug.php,v
> retrieving revision 1.129
> retrieving revision 1.130
> diff -u -r1.129 -r1.130
> --- bug.php 18 May 2003 23:40:22 -0000 1.129
> +++ bug.php 1 Jun 2003 18:18:46 -0000 1.130
> @@ -464,14 +464,12 @@
>
> if (!isset($HTTP_POST_FILES['attachment']) ||
> $HTTP_POST_FILES['attachment']['tmp_name'] == 'none') {
> - show_attachment_form($bugid, $STRING['give_attachment']);
> return;
> }
>
> // Check the upload size. If the size was greater than the max in
> // php.ini, the file won't even be set and will fail at the check above
> if ($HTTP_POST_FILES['attachment']['size'] > ATTACHMENT_MAX_SIZE) {
> - show_attachment_form($bugid, $STRING['attachment_too_large']);
> return;
> }
>
> @@ -487,7 +485,6 @@
> "and a.bug_id = b.bug_id");
> while ($rs->fetchInto($ainfo)) {
> if ($bugid == $ainfo['bug_id'] && $projectid == $ainfo['project_id']) {
> - show_attachment_form($bugid, $STRING['dupe_attachment']);
> return;
> }
> }
> @@ -497,12 +494,10 @@
> $filename = "$bugid-{$HTTP_POST_FILES['attachment']['name']}";
>
> if (!is_dir($filepath)) {
> - show_attachment_form($bugid, $STRING['no_attachment_save_path']);
> return;
> }
>
> if (!is_writeable($filepath)) {
> - show_attachment_form($bugid, $STRING['attachment_path_not_writeable']);
> return;
> }
>
> @@ -512,7 +507,6 @@
>
> if (!@move_uploaded_file($HTTP_POST_FILES['attachment']['tmp_name'],
> "$filepath/$projectid/$filename")) {
> - show_attachment_form($bugid, $STRING['attachment_move_error']);
> return;
> }
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: eBay
> Get office equipment for less on eBay!
> http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
> _______________________________________________
> phpbt-dev mailing list
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/phpbt-dev
|