[ticket/11344] Add migration to remove acp_style_components module in 3.1

PHPBB3-11344
This commit is contained in:
Dhruv 2013-09-08 13:44:47 +05:30
parent 49ce2c13b2
commit b4682f3a72

View file

@ -0,0 +1,40 @@
<?php
/**
*
* @package migration
* @copyright (c) 2013 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
*
*/
class phpbb_db_migration_data_310_acp_style_components_module extends phpbb_db_migration
{
public function effectively_installed()
{
$sql = 'SELECT module_id
FROM ' . MODULES_TABLE . "
WHERE module_class = 'acp'
AND module_langname = 'ACP_STYLE_COMPONENTS'";
$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_310_dev');
}
public function update_data()
{
return array(
array('module.remove', array(
'acp',
false,
'ACP_STYLE_COMPONENTS',
)),
);
}
}