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:
Joas Schilling 2014-05-11 10:03:53 +02:00
commit ce73ffae16
4 changed files with 9 additions and 2 deletions

View file

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

View file

@ -349,7 +349,7 @@ class acp_main
break;
case 'purge_cache':
global $cache;
$config->increment('assets_version', 1);
$cache->purge();
// Clear permissions

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