aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/posting.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2014-05-08 18:43:46 +0200
committerMarc Alexander <admin@m-a-styles.de>2014-05-08 18:43:46 +0200
commit8121f87f084c0e1790dd59105a00de8d4b3c7cdb (patch)
treea9e2d9565cec2c9888390337852c64ab88284e4b /phpBB/posting.php
parentbfd66ef2fdc1721ded267b6a0af3883f827840c1 (diff)
parentd4fc060bcd61228fdf78da4f2d290a7a17546c46 (diff)
downloadforums-8121f87f084c0e1790dd59105a00de8d4b3c7cdb.tar
forums-8121f87f084c0e1790dd59105a00de8d4b3c7cdb.tar.gz
forums-8121f87f084c0e1790dd59105a00de8d4b3c7cdb.tar.bz2
forums-8121f87f084c0e1790dd59105a00de8d4b3c7cdb.tar.xz
forums-8121f87f084c0e1790dd59105a00de8d4b3c7cdb.zip
Merge branch 'develop-ascraeus' of github.com:phpbb/phpbb into ticket/12407
* 'develop-ascraeus' of github.com:phpbb/phpbb: (424 commits) [ticket/12428] Use the database to store the original version number [ticket/12493] Add functional test [ticket/12493] Fix sql query for selection of users that have disabled PM [ticket/12513] Add asset include support to simple header/footer in ACP [ticket/12513] Add simple_header head event with support for CSS assets calls [ticket/12511] Add missing titles for profile fields in members group view [ticket/12428] Incorrect from version in database update log entry [ticket/12510] Convert & to &amp; in build_url() when no params are stripped. [ticket/12402] CAPTCHA plugin migration fails to detect missing plugins [ticket/12440] Use a more generic approach for replacing the URL. [ticket/12507] Move the 'require' statement [ticket/12507] Add console command to purge the cache [ticket/12421] Rebase and enable tests [ticket/12421] Don't parse [attachment] tags if user can't view them [ticket/12325] Use \RecursiveDirectoryIterator [ticket/12325] Doc blocks [ticket/12440] Set browser URL to point to specific post when using view=unread [ticket/12357] Support routes in generate_smilies() function. [ticket/12459] Change language strings [ticket/12504] Use local variables where possible ... Conflicts: phpBB/posting.php
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r--phpBB/posting.php52
1 files changed, 46 insertions, 6 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index cac0aa30c0..bdb4d21924 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -80,9 +80,24 @@ $current_time = time();
* form submission.
* NOTE: Should be actual language strings, NOT
* language keys.
-* @since 3.1-A1
+* @since 3.1.0-a1
*/
-$vars = array('post_id', 'topic_id', 'forum_id', 'draft_id', 'lastclick', 'submit', 'preview', 'save', 'load', 'delete', 'cancel', 'refresh', 'mode', 'error');
+$vars = array(
+ 'post_id',
+ 'topic_id',
+ 'forum_id',
+ 'draft_id',
+ 'lastclick',
+ 'submit',
+ 'preview',
+ 'save',
+ 'load',
+ 'delete',
+ 'cancel',
+ 'refresh',
+ 'mode',
+ 'error',
+);
extract($phpbb_dispatcher->trigger_event('core.modify_posting_parameters', compact($vars)));
// Was cancel pressed? If so then redirect to the appropriate page
@@ -879,10 +894,13 @@ if ($submit || $preview || $refresh)
$message_parser->warn_msg = array();
}
- $message_parser->parse($post_data['enable_bbcode'], ($config['allow_post_links']) ? $post_data['enable_urls'] : false, $post_data['enable_smilies'], $img_status, $flash_status, $quote_status, $config['allow_post_links']);
+ if (!$preview || !empty($message_parser->message))
+ {
+ $message_parser->parse($post_data['enable_bbcode'], ($config['allow_post_links']) ? $post_data['enable_urls'] : false, $post_data['enable_smilies'], $img_status, $flash_status, $quote_status, $config['allow_post_links']);
+ }
// On a refresh we do not care about message parsing errors
- if (sizeof($message_parser->warn_msg) && $refresh)
+ if (sizeof($message_parser->warn_msg) && $refresh && !$preview)
{
$message_parser->warn_msg = array();
}
@@ -1554,6 +1572,7 @@ $page_data = array(
* post|reply|quote|edit|delete|bump|smilies|popup
* @var string page_title Title of the mode page
* @var bool s_topic_icons Whether or not to show the topic icons
+<<<<<<< HEAD
* @var string form_enctype If attachments are allowed for this form
* "multipart/form-data" or empty string
* @var string s_action The URL to submit the POST data to
@@ -1583,8 +1602,29 @@ $page_data = array(
* post_id, topic_id, forum_id, submit, preview, save, load,
* delete, cancel, refresh, error, page_data, message_parser
*/
-$vars = array('post_data', 'moderators', 'mode', 'page_title', 's_topic_icons', 'form_enctype', 's_action', 's_hidden_fields', 'post_id');
-$vars += array('topic_id', 'forum_id', 'submit', 'preview', 'save', 'load', 'delete', 'cancel', 'refresh', 'error', 'page_data', 'message_parser');
+$vars = array(
+ 'post_data',
+ 'moderators',
+ 'mode',
+ 'page_title',
+ 's_topic_icons',
+ 'form_enctype',
+ 's_action',
+ 's_hidden_fields',
+ 'post_id',
+ 'topic_id',
+ 'forum_id',
+ 'submit',
+ 'preview',
+ 'save',
+ 'load',
+ 'delete',
+ 'cancel',
+ 'refresh',
+ 'error',
+ 'page_data',
+ 'message_parser',
+);
extract($phpbb_dispatcher->trigger_event('core.posting_modify_template_vars', compact($vars)));
// Start assigning vars for main posting page ...