erm, ok, my fault. :/

git-svn-id: file:///svn/phpbb/trunk@6067 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2006-06-14 22:09:09 +00:00
parent 1409df5205
commit 75b3410e83

View file

@ -459,55 +459,53 @@ class bbcode
*/ */
function bbcode_list($type) function bbcode_list($type)
{ {
switch ($type) if ($type == '')
{ {
case '':
$tpl = 'ulist_open_default'; $tpl = 'ulist_open_default';
$type = 'default'; $type = 'default';
$start = 0; $start = 0;
break; }
else if ($type == 'i')
case 'i': {
$tpl = 'olist_open'; $tpl = 'olist_open';
$type = 'lower-roman'; $type = 'lower-roman';
$start = 1; $start = 1;
break; }
else if ($type == 'I')
case 'I': {
$tpl = 'olist_open'; $tpl = 'olist_open';
$type = 'upper-roman'; $type = 'upper-roman';
$start = 1; $start = 1;
break; }
else if (preg_match('#^(disc|circle|square)$#i', $type))
case (preg_match('#^(disc|circle|square)$#i', $type)): {
$tpl = 'ulist_open'; $tpl = 'ulist_open';
$type = strtolower($type); $type = strtolower($type);
$start = 1; $start = 1;
break; }
else if (preg_match('#^[a-z]$#', $type))
case (preg_match('#^[a-z]$#', $type)): {
$tpl = 'olist_open'; $tpl = 'olist_open';
$type = 'lower-alpha'; $type = 'lower-alpha';
$start = ord($type) - 96; $start = ord($type) - 96;
break; }
else if (preg_match('#[A-Z]#', $type))
case (preg_match('#[A-Z]#', $type)): {
$tpl = 'olist_open'; $tpl = 'olist_open';
$type = 'upper-alpha'; $type = 'upper-alpha';
$start = ord($type) - 64; $start = ord($type) - 64;
break; }
else if (is_numeric($type))
case (is_numeric($type)): {
$tpl = 'olist_open'; $tpl = 'olist_open';
$type = 'arabic-numbers'; $type = 'arabic-numbers';
$start = intval($type); $start = intval($type);
break; }
else
default: {
$tpl = 'olist_open'; $tpl = 'olist_open';
$type = 'arabic-numbers'; $type = 'arabic-numbers';
$start = 1; $start = 1;
break;
} }
return str_replace('{LIST_TYPE}', $type, $this->bbcode_tpl($tpl)); return str_replace('{LIST_TYPE}', $type, $this->bbcode_tpl($tpl));