diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-06-14 22:09:09 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-06-14 22:09:09 +0000 |
commit | 75b3410e836ec9ed525a8cc287b4d49ee7e33d14 (patch) | |
tree | 10c9a743f1e1b2ec531d93bacd7bc931780b7976 /phpBB/includes/bbcode.php | |
parent | Improved i18n of default date format on new installs (diff) | |
download | phpbb-75b3410e836ec9ed525a8cc287b4d49ee7e33d14.tar.gz phpbb-75b3410e836ec9ed525a8cc287b4d49ee7e33d14.tar.bz2 phpbb-75b3410e836ec9ed525a8cc287b4d49ee7e33d14.zip |
erm, ok, my fault. :/
git-svn-id: file:///svn/phpbb/trunk@6067 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/bbcode.php')
-rw-r--r-- | phpBB/includes/bbcode.php | 94 |
1 files changed, 46 insertions, 48 deletions
diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index eb440cab24..f39c004747 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -459,55 +459,53 @@ class bbcode */ function bbcode_list($type) { - switch ($type) + if ($type == '') { - case '': - $tpl = 'ulist_open_default'; - $type = 'default'; - $start = 0; - break; - - case 'i': - $tpl = 'olist_open'; - $type = 'lower-roman'; - $start = 1; - break; - - case 'I': - $tpl = 'olist_open'; - $type = 'upper-roman'; - $start = 1; - break; - - case (preg_match('#^(disc|circle|square)$#i', $type)): - $tpl = 'ulist_open'; - $type = strtolower($type); - $start = 1; - break; - - case (preg_match('#^[a-z]$#', $type)): - $tpl = 'olist_open'; - $type = 'lower-alpha'; - $start = ord($type) - 96; - break; - - case (preg_match('#[A-Z]#', $type)): - $tpl = 'olist_open'; - $type = 'upper-alpha'; - $start = ord($type) - 64; - break; - - case (is_numeric($type)): - $tpl = 'olist_open'; - $type = 'arabic-numbers'; - $start = intval($type); - break; - - default: - $tpl = 'olist_open'; - $type = 'arabic-numbers'; - $start = 1; - break; + $tpl = 'ulist_open_default'; + $type = 'default'; + $start = 0; + } + else if ($type == 'i') + { + $tpl = 'olist_open'; + $type = 'lower-roman'; + $start = 1; + } + else if ($type == 'I') + { + $tpl = 'olist_open'; + $type = 'upper-roman'; + $start = 1; + } + else if (preg_match('#^(disc|circle|square)$#i', $type)) + { + $tpl = 'ulist_open'; + $type = strtolower($type); + $start = 1; + } + else if (preg_match('#^[a-z]$#', $type)) + { + $tpl = 'olist_open'; + $type = 'lower-alpha'; + $start = ord($type) - 96; + } + else if (preg_match('#[A-Z]#', $type)) + { + $tpl = 'olist_open'; + $type = 'upper-alpha'; + $start = ord($type) - 64; + } + else if (is_numeric($type)) + { + $tpl = 'olist_open'; + $type = 'arabic-numbers'; + $start = intval($type); + } + else + { + $tpl = 'olist_open'; + $type = 'arabic-numbers'; + $start = 1; } return str_replace('{LIST_TYPE}', $type, $this->bbcode_tpl($tpl)); |