aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid King <imkingdavid@gmail.com>2012-03-31 15:52:16 -0400
committerDavid King <imkingdavid@gmail.com>2012-03-31 15:52:16 -0400
commit5ccd6915e3e8af30856319d84a48dde074fdbaee (patch)
treee16fe08b8a005cb477ce772c8949244a193f4b0d
parent0c8d0a82de69277d090907618eee71f815f12436 (diff)
downloadforums-5ccd6915e3e8af30856319d84a48dde074fdbaee.tar
forums-5ccd6915e3e8af30856319d84a48dde074fdbaee.tar.gz
forums-5ccd6915e3e8af30856319d84a48dde074fdbaee.tar.bz2
forums-5ccd6915e3e8af30856319d84a48dde074fdbaee.tar.xz
forums-5ccd6915e3e8af30856319d84a48dde074fdbaee.zip
[feature/qrpreview] Do not error or show preview if no text is entered
PHPBB3-10726
-rw-r--r--phpBB/posting.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 71ba353e89..7f57f693af 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -38,7 +38,7 @@ $load = (isset($_POST['load'])) ? true : false;
$delete = (isset($_POST['delete'])) ? true : false;
$cancel = (isset($_POST['cancel']) && !isset($_POST['save'])) ? true : false;
-$refresh = (isset($_POST['add_file']) || isset($_POST['delete_file']) || isset($_POST['cancel_unglobalise']) || $save || $load) ? true : false;
+$refresh = (isset($_POST['add_file']) || isset($_POST['delete_file']) || isset($_POST['cancel_unglobalise']) || $save || $load || $preview) ? true : false;
$mode = ($delete && !$preview && !$refresh && $submit) ? 'delete' : request_var('mode', '');
$error = $post_data = array();
@@ -1198,8 +1198,8 @@ if (!sizeof($error) && $preview)
'PREVIEW_MESSAGE' => $preview_message,
'PREVIEW_SIGNATURE' => $preview_signature,
- 'S_DISPLAY_PREVIEW' => true)
- );
+ 'S_DISPLAY_PREVIEW' => !empty($preview_message),
+ ));
}
}