Skip to content

Commit c90ced2

Browse files
authored
Merge pull request #311 from Leinad4Mind/who-is-online-fix
Fix who is online and circular reference - thks to galex3
2 parents 13cf440 + c890ba8 commit c90ced2

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

core/config/services.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,8 @@ services:
249249
- '%core.root_path%'
250250
- '%core.php_ext%'
251251
- '%tables.phpbbgallery.watch%'
252+
calls:
253+
- [set_image, ['@phpbbgallery.core.image']]
252254
phpbbgallery.core.log:
253255
class: phpbbgallery\core\log
254256
arguments:

core/controller/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ public function base()
237237
'U_VIEW_FORUM' => $this->helper->route('phpbbgallery_core_index'),
238238
));
239239

240-
return $this->helper->render('gallery/index_body.html', $this->language->lang('GALLERY'));
240+
return $this->helper->render('gallery/index_body.html', $this->language->lang('GALLERY'), 200, $this->gallery_config->get('disp_whoisonline'));
241241
}
242242

243243
/**

core/notification/helper.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class helper
2828
protected $image;
2929
public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user,
3030
\phpbbgallery\core\auth\auth $gallery_auth, \phpbbgallery\core\album\loader $album_load, \phpbb\controller\helper $helper, \phpbbgallery\core\url $url,
31-
Container $phpbb_container, $root_path, $php_ext, $watch_table, \phpbbgallery\core\image\image $image)
31+
Container $phpbb_container, $root_path, $php_ext, $watch_table)
3232
{
3333
$this->config = $config;
3434
$this->db = $db;
@@ -43,7 +43,6 @@ public function __construct(\phpbb\config\config $config, \phpbb\db\driver\drive
4343
$this->root_path = $root_path;
4444
$this->php_ext = $php_ext;
4545
$this->watch_table = $watch_table;
46-
$this->image = $image;
4746
}
4847

4948
/**
@@ -299,4 +298,9 @@ public function new_image($data)
299298
$data['targets'] = $targets;
300299
$this->notify('new_image', $data);
301300
}
301+
302+
public function set_image(\phpbbgallery\core\image\image $image)
303+
{
304+
$this->image = $image;
305+
}
302306
}

0 commit comments

Comments
 (0)