mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-19 09:48:53 +00:00
Merge branch 'develop-ascraeus' into develop
* develop-ascraeus: [ticket/12476] Label the constructor as public [ticket/12476] Increase assets also from acp_styles and phpbbcli [ticket/12476] Increase asset version on cache purge
This commit is contained in:
commit
ce73ffae16
4 changed files with 9 additions and 2 deletions
|
@ -7,6 +7,7 @@ services:
|
|||
- @auth
|
||||
- @log
|
||||
- @user
|
||||
- @config
|
||||
tags:
|
||||
- { name: console.command }
|
||||
|
||||
|
|
|
@ -349,7 +349,7 @@ class acp_main
|
|||
break;
|
||||
|
||||
case 'purge_cache':
|
||||
global $cache;
|
||||
$config->increment('assets_version', 1);
|
||||
$cache->purge();
|
||||
|
||||
// Clear permissions
|
||||
|
|
|
@ -146,6 +146,7 @@ class acp_styles
|
|||
{
|
||||
global $db, $cache, $auth;
|
||||
|
||||
$this->config->increment('assets_version', 1);
|
||||
$this->cache->purge();
|
||||
|
||||
// Clear permissions
|
||||
|
|
7
phpBB/phpbb/console/command/cache/purge.php
vendored
7
phpBB/phpbb/console/command/cache/purge.php
vendored
|
@ -28,13 +28,17 @@ class purge extends \phpbb\console\command\command
|
|||
/** @var \phpbb\user */
|
||||
protected $user;
|
||||
|
||||
function __construct(\phpbb\cache\driver\driver_interface $cache, \phpbb\db\driver\driver_interface $db, \phpbb\auth\auth $auth, \phpbb\log\log $log, \phpbb\user $user)
|
||||
/** @var \phpbb\config\config */
|
||||
protected $config;
|
||||
|
||||
public function __construct(\phpbb\cache\driver\driver_interface $cache, \phpbb\db\driver\driver_interface $db, \phpbb\auth\auth $auth, \phpbb\log\log $log, \phpbb\user $user, \phpbb\config\config $config)
|
||||
{
|
||||
$this->cache = $cache;
|
||||
$this->db = $db;
|
||||
$this->auth = $auth;
|
||||
$this->log = $log;
|
||||
$this->user = $user;
|
||||
$this->config = $config;
|
||||
$this->user->add_lang(array('acp/common'));
|
||||
parent::__construct();
|
||||
}
|
||||
|
@ -49,6 +53,7 @@ class purge extends \phpbb\console\command\command
|
|||
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$this->config->increment('assets_version', 1);
|
||||
$this->cache->purge();
|
||||
|
||||
// Clear permissions
|
||||
|
|
Loading…
Add table
Reference in a new issue