Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-11607

PM thru "quote post" should not invalidate once being previewed

    Details

      Description

      Current scenario:

      1. Alice reads a post
      2. Alice clicks the "PM" button to quote the post and having the post author as pre-filled recipient
      3. Alice adds text to the PM
      4. Bob deletes that post
      5. Alice clicks "Preview" or "Submit" or wants to add another recipient and hits "Add"
      6. Alice gets the error "Private message could not be found"

      Improvement: while I understand, that step #2 should fail if the post is already not available anymore, it is quite annoying after typing a long PM and later get that halfway misleading message - your only chance is to compose a new PM, which means filling in all recipients, the subject, the post text and adjusting all settings anew. Just because the refering post doesn't exist anymore.

      As a consquence, I suggest to not throw an error message once the PM has been shown in the editor, which means upon each HTTP POST request or certain HTTP GET requests it shouldn't been shown anymore.

      Open /includes/ucp/ucp_pm_compose.php and find:

      		case 'reply':
      		case 'quote':
      		case 'forward':
      		case 'quotepost':

      After, add:

      			/*** 2013-06-12 BEGIN AmigoJack
      				Submitting a PM when post no longer exists ***/
      			//if (!$msg_id)
      			if( !$msg_id
      			 &&( $action!= 'quotepost'  // Allow this action...
      			  ||( !$submit  // ...upon POST or certain GETs
      			   && !$refresh
      			    )
      			   )
      			  )
      			/*** 2013-06-12 END ***/


      Find:

      				if ($post)
      				{
      					trigger_error('NO_EDIT_READ_MESSAGE');
      				}
      			}

      After, add:

      			/*** 2013-06-12 BEGIN AmigoJack
      				Do not freak out if we already wrote something ***/
      			if( $action== 'quotepost'  // Allow this action...
      			 &&( $submit  // ...upon POST or certain GETs
      			  || $preview
      			  || $refresh
      			   )
      			  ) {
      				// nothing
      			} else
      			/*** 2013-06-12 END ***/

        Attachments

          Activity

            People

            • Assignee:
              CHItA CHItA
              Reporter:
              AmigoJack AmigoJack
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: