I dont really like the way this is achieved - I'd prefer to check if the thread has actually been deleted and only display the undelete if it has been, it means you wouldnt need to pass a deleteAction to this file.