mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-29 06:38:52 +00:00
[ticket/16730] Don't do additional sorting or output without any tickets
PHPBB3-16730
This commit is contained in:
parent
f6b4031a96
commit
4721007c02
1 changed files with 14 additions and 10 deletions
|
@ -38,6 +38,7 @@ else
|
|||
$xml = simplexml_load_string(file_get_contents($url));
|
||||
}
|
||||
|
||||
$types = [];
|
||||
foreach ($xml->xpath('//item') as $item)
|
||||
{
|
||||
$key = (string) $item->key;
|
||||
|
@ -51,6 +52,8 @@ foreach ($xml->xpath('//item') as $item)
|
|||
$types[(string) $item->type][$key] = $value;
|
||||
}
|
||||
|
||||
if (count($types))
|
||||
{
|
||||
ksort($types);
|
||||
foreach ($types as $type => $tickets)
|
||||
{
|
||||
|
@ -65,3 +68,4 @@ foreach ($types as $type => $tickets)
|
|||
}
|
||||
echo "</ul>\n";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue