aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/posting.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-11-15 15:35:50 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-11-15 15:35:50 +0000
commit548cc2c10b56cc9e5c71c2f87356947939abe888 (patch)
tree82a2ceac1eb474aad83281f5d5b4fe94b0ad4d92 /phpBB/posting.php
parent979e36077fa6ae9bbee81bacaaef029aa13c6df0 (diff)
downloadforums-548cc2c10b56cc9e5c71c2f87356947939abe888.tar
forums-548cc2c10b56cc9e5c71c2f87356947939abe888.tar.gz
forums-548cc2c10b56cc9e5c71c2f87356947939abe888.tar.bz2
forums-548cc2c10b56cc9e5c71c2f87356947939abe888.tar.xz
forums-548cc2c10b56cc9e5c71c2f87356947939abe888.zip
- fixes for the following bugs:
#5326 #5318 #5304 #5290 #5288 #5278 #5276 #5272 #5266 - also fixed the "Call-time pass-by-reference" bug #5252 - within this step changed the normalize calls to require references. - added captcha size variables to the class scope (suggestion was posted at area51) git-svn-id: file:///svn/phpbb/trunk@6584 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r--phpBB/posting.php24
1 files changed, 9 insertions, 15 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index d2d9ef0e27..64f99c6a7c 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -445,12 +445,10 @@ $quote_status = ($auth->acl_get('f_reply', $forum_id)) ? true : false;
// Save Draft
if ($save && $user->data['is_registered'] && $auth->acl_get('u_savedrafts'))
{
- $subject = request_var('subject', '', true);
+ $subject = utf8_normalize_nfc(request_var('subject', '', true));
$subject = (!$subject && $mode != 'post') ? $post_data['topic_title'] : $subject;
- $message = request_var('message', '', true);
+ $message = utf8_normalize_nfc(request_var('message', '', true));
- utf8_normalize_nfc(array(&$subject, &$message));
-
if ($subject && $message)
{
if (confirm_box(true))
@@ -528,15 +526,13 @@ $solved_captcha = false;
if ($submit || $preview || $refresh)
{
- $post_data['topic_cur_post_id'] = request_var('topic_cur_post_id', 0);
- $post_data['post_subject'] = request_var('subject', '', true);
- $message_parser->message = request_var('message', '', true);
+ $post_data['topic_cur_post_id'] = request_var('topic_cur_post_id', 0);
+ $post_data['post_subject'] = utf8_normalize_nfc(request_var('subject', '', true));
+ $message_parser->message = utf8_normalize_nfc(request_var('message', '', true));
- $post_data['username'] = request_var('username', $post_data['username'], true);
- $post_data['post_edit_reason'] = (!empty($_POST['edit_reason']) && $mode == 'edit' && $auth->acl_get('m_edit', $forum_id)) ? request_var('edit_reason', '', true) : '';
+ $post_data['username'] = utf8_normalize_nfc(request_var('username', $post_data['username'], true));
+ $post_data['post_edit_reason'] = (!empty($_POST['edit_reason']) && $mode == 'edit' && $auth->acl_get('m_edit', $forum_id)) ? utf8_normalize_nfc(request_var('edit_reason', '', true)) : '';
- utf8_normalize_nfc(array(&$post_data['post_subject'], &$message_parser->message, &$post_data['username'], &$post_data['post_edit_reason']));
-
$post_data['topic_type'] = request_var('topic_type', (($mode != 'post') ? (int) $post_data['topic_type'] : POST_NORMAL));
$post_data['topic_time_limit'] = request_var('topic_time_limit', (($mode != 'post') ? (int) $post_data['topic_time_limit'] : 0));
$post_data['icon_id'] = request_var('icon', 0);
@@ -603,13 +599,11 @@ if ($submit || $preview || $refresh)
}
else
{
- $post_data['poll_title'] = request_var('poll_title', '', true);
+ $post_data['poll_title'] = utf8_normalize_nfc(request_var('poll_title', '', true));
$post_data['poll_length'] = request_var('poll_length', 0);
- $post_data['poll_option_text'] = request_var('poll_option_text', '', true);
+ $post_data['poll_option_text'] = utf8_normalize_nfc(request_var('poll_option_text', '', true));
$post_data['poll_max_options'] = request_var('poll_max_options', 1);
$post_data['poll_vote_change'] = ($auth->acl_get('f_votechg', $forum_id) && isset($_POST['poll_vote_change'])) ? 1 : 0;
-
- utf8_normalize_nfc(array(&$post_data['poll_title'], &$post_data['poll_option_text']));
}
// If replying/quoting and last post id has changed