mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-27 11:04:15 +02:00
[ticket/13961] Allow the collection to be modified runtime
PHPBB3-13961
This commit is contained in:
parent
b09293d5ff
commit
c80cf87b90
@ -90,14 +90,9 @@ class ordered_service_collection extends service_collection
|
||||
*/
|
||||
public function add($service_id, $order = 0)
|
||||
{
|
||||
if ($this->is_ordered)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$order = (int) $order;
|
||||
|
||||
$this->service_ids[$order][] = $service_id;
|
||||
$this->is_ordered = false;
|
||||
}
|
||||
|
||||
protected function sort_services()
|
||||
@ -107,6 +102,7 @@ class ordered_service_collection extends service_collection
|
||||
return;
|
||||
}
|
||||
|
||||
$this->exchangeArray(array());
|
||||
ksort($this->service_ids);
|
||||
foreach ($this->service_ids as $service_order_group)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user