From 1ee48942719500f128fd40d6ae60561174204954 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Wed, 1 Oct 2014 00:29:45 -0700 Subject: [ticket/13121] Fix migration file PHPBB3-13121 --- .../migration/data/v310/acp_style_cache_module.php | 51 ---------------------- .../data/v310/remove_acp_styles_cache.php | 51 ++++++++++++++++++++++ 2 files changed, 51 insertions(+), 51 deletions(-) delete mode 100644 phpBB/phpbb/db/migration/data/v310/acp_style_cache_module.php create mode 100644 phpBB/phpbb/db/migration/data/v310/remove_acp_styles_cache.php (limited to 'phpBB/phpbb/db/migration') diff --git a/phpBB/phpbb/db/migration/data/v310/acp_style_cache_module.php b/phpBB/phpbb/db/migration/data/v310/acp_style_cache_module.php deleted file mode 100644 index a922a7cb78..0000000000 --- a/phpBB/phpbb/db/migration/data/v310/acp_style_cache_module.php +++ /dev/null @@ -1,51 +0,0 @@ - -* @license GNU General Public License, version 2 (GPL-2.0) -* -* For full copyright and license information, please see -* the docs/CREDITS.txt file. -* -*/ - -namespace phpbb\db\migration\data\v310; - -class acp_style_cache_module extends \phpbb\db\migration\migration -{ - public function effectively_installed() - { - $sql = 'SELECT module_id - FROM ' . MODULES_TABLE . " - WHERE module_class = 'acp' - AND module_langname = 'ACP_STYLES_CACHE'"; - $result = $this->db->sql_query($sql); - $module_id = $this->db->sql_fetchfield('module_id'); - $this->db->sql_freeresult($result); - - return $module_id == false; - } - - static public function depends_on() - { - return array('\phpbb\db\migration\data\v310\dev'); - } - - public function update_data() - { - return array( - array('module.remove', array( - 'acp', - 'ACP_STYLE_MANAGEMENT', - array( - 'module_basename' => 'acp_styles', - 'module_langname' => 'ACP_STYLES_CACHE', - 'module_mode' => 'cache', - 'module_auth' => 'acl_a_styles', - ), - )), - ); - } -} diff --git a/phpBB/phpbb/db/migration/data/v310/remove_acp_styles_cache.php b/phpBB/phpbb/db/migration/data/v310/remove_acp_styles_cache.php new file mode 100644 index 0000000000..7b84539814 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/remove_acp_styles_cache.php @@ -0,0 +1,51 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +namespace phpbb\db\migration\data\v310; + +class remove_acp_styles_cache extends \phpbb\db\migration\migration +{ + public function effectively_installed() + { + $sql = 'SELECT module_id + FROM ' . MODULES_TABLE . " + WHERE module_class = 'acp' + AND module_langname = 'ACP_STYLES_CACHE'"; + $result = $this->db->sql_query($sql); + $module_id = $this->db->sql_fetchfield('module_id'); + $this->db->sql_freeresult($result); + + return !$module_id; + } + + static public function depends_on() + { + return array('\phpbb\db\migration\data\v310\rc4'); + } + + public function update_data() + { + return array( + array('module.remove', array( + 'acp', + 'ACP_STYLE_MANAGEMENT', + array( + 'module_basename' => 'acp_styles', + 'module_langname' => 'ACP_STYLES_CACHE', + 'module_mode' => 'cache', + 'module_auth' => 'acl_a_styles', + ), + )), + ); + } +} -- cgit v1.2.1