mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-14 20:50:30 +01:00
Merge pull request #6163 from marc1706/ticket/16730
[ticket/16730] Don't do additional sorting or output without any tickets
This commit is contained in:
commit
7d48254cc9
@ -38,6 +38,7 @@ else
|
|||||||
$xml = simplexml_load_string(file_get_contents($url));
|
$xml = simplexml_load_string(file_get_contents($url));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$types = [];
|
||||||
foreach ($xml->xpath('//item') as $item)
|
foreach ($xml->xpath('//item') as $item)
|
||||||
{
|
{
|
||||||
$key = (string) $item->key;
|
$key = (string) $item->key;
|
||||||
@ -51,9 +52,11 @@ foreach ($xml->xpath('//item') as $item)
|
|||||||
$types[(string) $item->type][$key] = $value;
|
$types[(string) $item->type][$key] = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
ksort($types);
|
if (count($types))
|
||||||
foreach ($types as $type => $tickets)
|
|
||||||
{
|
{
|
||||||
|
ksort($types);
|
||||||
|
foreach ($types as $type => $tickets)
|
||||||
|
{
|
||||||
echo "<h4>$type</h4>\n";
|
echo "<h4>$type</h4>\n";
|
||||||
echo "<ul>\n";
|
echo "<ul>\n";
|
||||||
|
|
||||||
@ -64,4 +67,5 @@ foreach ($types as $type => $tickets)
|
|||||||
echo "<li>$ticket</li>\n";
|
echo "<li>$ticket</li>\n";
|
||||||
}
|
}
|
||||||
echo "</ul>\n";
|
echo "</ul>\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user