[ticket/12476] Increase assets also from acp_styles and phpbbcli

Increase assets also from "ACP > Styles > Purge Cache" and phpbbcli

PHPBB3-12476
This commit is contained in:
n-aleha 2014-05-09 00:30:09 +03:00
parent cfc0c9bcf9
commit f2471878a6
3 changed files with 8 additions and 1 deletions

View file

@ -7,6 +7,7 @@ services:
- @auth
- @log
- @user
- @config
tags:
- { name: console.command }

View file

@ -146,6 +146,7 @@ class acp_styles
{
global $db, $cache, $auth;
$this->config->increment('assets_version', 1);
$this->cache->purge();
// Clear permissions

View file

@ -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;
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