aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/posting.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2003-09-09 07:02:57 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2003-09-09 07:02:57 +0000
commita363e8dcdb52558366d6242caf3d22b93cb8ce09 (patch)
treeb5fed98e5b7e96c019073b70b38fa55d3945ef71 /phpBB/posting.php
parent08161e09e21b0e002325550db8bf653a72c8d362 (diff)
downloadforums-a363e8dcdb52558366d6242caf3d22b93cb8ce09.tar
forums-a363e8dcdb52558366d6242caf3d22b93cb8ce09.tar.gz
forums-a363e8dcdb52558366d6242caf3d22b93cb8ce09.tar.bz2
forums-a363e8dcdb52558366d6242caf3d22b93cb8ce09.tar.xz
forums-a363e8dcdb52558366d6242caf3d22b93cb8ce09.zip
fixed censoring (quote post, word boundaries, attachment comments)
git-svn-id: file:///svn/phpbb/trunk@4492 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r--phpBB/posting.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index c79edcebc1..fdabc7cb08 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -119,6 +119,12 @@ switch ($mode)
trigger_error($user->lang['NO_MODE']);
}
+if (empty($censors))
+{
+ $censors = array();
+ obtain_word_list($censors);
+}
+
if ($sql != '')
{
$result = $db->sql_query($sql);
@@ -749,12 +755,6 @@ if ($submit || $preview || $refresh)
// Preview
if (!sizeof($error) && $preview)
{
- if (empty($censors))
- {
- $censors = array();
- obtain_word_list($censors);
- }
-
$post_time = ($mode == 'edit') ? $post_time : $current_time;
$preview_subject = (sizeof($censors)) ? preg_replace($censors['match'], $censors['replace'], $subject) : $subject;
@@ -824,13 +824,13 @@ if (count($poll_options))
if ($mode == 'quote' && !$preview && !$refresh)
{
- $post_text = '[quote="' . $quote_username . '"]' . trim($post_text) . "[/quote]\n";
+ $post_text = '[quote="' . $quote_username . '"]' . ((sizeof($censors)) ? preg_replace($censors['match'], $censors['replace'], trim($post_text)) : trim($post_text)) . "[/quote]\n";
}
if (($mode == 'reply' || $mode == 'quote') && !$preview && !$refresh)
{
- $post_subject = ((!preg_match('/^Re:/', $post_subject)) ? 'Re: ' : '') . $post_subject;
+ $post_subject = ((!preg_match('/^Re:/', $post_subject)) ? 'Re: ' : '') . ((sizeof($censors)) ? preg_replace($censors['match'], $censors['replace'], $post_subject) : $post_subject);
}