mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 05:38:52 +00:00
[ticket/13961] Allow the collection to be modified runtime
PHPBB3-13961
This commit is contained in:
parent
b09293d5ff
commit
c80cf87b90
1 changed files with 2 additions and 6 deletions
|
@ -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…
Add table
Reference in a new issue