mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/11768] Updated merge_templates(). No functional change intended
PHPBB3-11768
This commit is contained in:
parent
709d502332
commit
b46bf9f02f
1 changed files with 3 additions and 3 deletions
|
@ -480,7 +480,7 @@ class factory implements \phpbb\textformatter\cache_interface
|
||||||
$grouped_templates = array();
|
$grouped_templates = array();
|
||||||
foreach ($style_templates as $style_id => $style_template)
|
foreach ($style_templates as $style_id => $style_template)
|
||||||
{
|
{
|
||||||
$grouped_templates[$style_template][] = $style_id;
|
$grouped_templates[$style_template][] = '$STYLE_ID=' . $style_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($grouped_templates) === 1)
|
if (count($grouped_templates) === 1)
|
||||||
|
@ -499,9 +499,9 @@ class factory implements \phpbb\textformatter\cache_interface
|
||||||
|
|
||||||
// Build an xsl:choose switch
|
// Build an xsl:choose switch
|
||||||
$template = '<xsl:choose>';
|
$template = '<xsl:choose>';
|
||||||
foreach ($grouped_templates as $style_template => $style_ids)
|
foreach ($grouped_templates as $style_template => $exprs)
|
||||||
{
|
{
|
||||||
$template .= '<xsl:when test="$STYLE_ID=' . implode(' or $STYLE_ID=', $style_ids) . '">' . $style_template . '</xsl:when>';
|
$template .= '<xsl:when test="' . implode(' or ', $exprs) . '">' . $style_template . '</xsl:when>';
|
||||||
}
|
}
|
||||||
$template .= '<xsl:otherwise>' . $default_template . '</xsl:otherwise></xsl:choose>';
|
$template .= '<xsl:otherwise>' . $default_template . '</xsl:otherwise></xsl:choose>';
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue