aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/bbcode.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2004-11-06 14:22:04 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2004-11-06 14:22:04 +0000
commit541a04972584cb95b349fe182e164c9629d5f360 (patch)
treeb1088ab098cbda085ac2e47b68f156f1294c7a77 /phpBB/includes/bbcode.php
parent836771cfb872215c9fa43c91f532382006ad25bf (diff)
downloadforums-541a04972584cb95b349fe182e164c9629d5f360.tar
forums-541a04972584cb95b349fe182e164c9629d5f360.tar.gz
forums-541a04972584cb95b349fe182e164c9629d5f360.tar.bz2
forums-541a04972584cb95b349fe182e164c9629d5f360.tar.xz
forums-541a04972584cb95b349fe182e164c9629d5f360.zip
- a bunch of updates, most of them bbcode related
git-svn-id: file:///svn/phpbb/trunk@5023 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/bbcode.php')
-rw-r--r--phpBB/includes/bbcode.php31
1 files changed, 18 insertions, 13 deletions
diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php
index 4e56a2be77..1e4183109d 100644
--- a/phpBB/includes/bbcode.php
+++ b/phpBB/includes/bbcode.php
@@ -71,20 +71,23 @@ class bbcode
${$type}['search'][] = str_replace('$uid', $this->bbcode_uid, $search);
${$type}['replace'][] = $replace;
}
+
+ if (sizeof($str['search']))
+ {
+ $message = str_replace($str['search'], $str['replace'], $message);
+ $str = array('search' => array(), 'replace' => array());
+ }
+
+ if (sizeof($preg['search']))
+ {
+ $message = preg_replace($preg['search'], $preg['replace'], $message);
+ $preg = array('search' => array(), 'replace' => array());
+ }
}
}
}
}
- if (count($str['search']))
- {
- $message = str_replace($str['search'], $str['replace'], $message);
- }
- if (count($preg['search']))
- {
- $message = preg_replace($preg['search'], $preg['replace'], $message);
- }
-
// Remove the uid from tags that have not been transformed into HTML
$message = str_replace(':' . $this->bbcode_uid, '', $message);
}
@@ -223,6 +226,11 @@ class bbcode
break;
case 9:
$this->bbcode_cache[$bbcode_id] = array(
+ 'preg' => array(
+ '#(\[\/?(list|\*):[mou]?:?$uid\])[\n]{1}#' => "\$1",
+ '#(\[list=([^\[]+):$uid\])[\n]{1}#' => "\$1",
+ '#\[list=([^\[]+):$uid\]#e' => "\$this->bbcode_list('\$1')",
+ ),
'str' => array(
'[list:$uid]' => $this->bbcode_tpl('ulist_open_default', $bbcode_id),
'[/list:u:$uid]' => $this->bbcode_tpl('ulist_close', $bbcode_id),
@@ -231,9 +239,6 @@ class bbcode
'[/*:$uid]' => $this->bbcode_tpl('listitem_close', $bbcode_id),
'[/*:m:$uid]' => $this->bbcode_tpl('listitem_close', $bbcode_id)
),
- 'preg' => array(
- '#\[list=([^\[]+):$uid\]#e' => "\$this->bbcode_list('\$1')",
- )
);
break;
case 10:
@@ -442,7 +447,7 @@ class bbcode
{
$tpl = 'olist_open';
$type = 'arabic-numbers';
- $start = intval($chr);
+ $start = intval($type);
}
else
{