diff --git a/acp/portal_module.php b/acp/portal_module.php index b1f46d5b..2e9d3994 100644 --- a/acp/portal_module.php +++ b/acp/portal_module.php @@ -296,7 +296,7 @@ class portal_module WHERE module_id = ' . (int) $module_id; $this->db->sql_query($sql); - $this->cache->destroy('portal_modules'); + $this->cache->destroy('sql', PORTAL_MODULES_TABLE); $this->cache->destroy('sql', CONFIG_TABLE); if(isset($module_name)) diff --git a/includes/functions.php b/includes/functions.php index 6b6f8f14..e699193f 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -71,6 +71,8 @@ function set_portal_config($config_name, $config_value) /** * Get portal modules + * + * @return array Portal modules array */ function obtain_portal_modules() { diff --git a/portal/modules/manager.php b/portal/modules/manager.php index b72a7848..aff87999 100644 --- a/portal/modules/manager.php +++ b/portal/modules/manager.php @@ -215,7 +215,7 @@ class manager trigger_error($this->user->lang['UNABLE_TO_MOVE' . (($is_row) ? '_ROW' : '')] . adm_back_link($this->u_action)); } - $this->cache->destroy('portal_modules'); + $this->cache->destroy('sql', PORTAL_MODULES_TABLE); // Handle ajax requests $this->handle_ajax_request(array('success' => true)); @@ -375,7 +375,7 @@ class manager } } - $this->cache->destroy('portal_modules'); + $this->cache->destroy('sql', PORTAL_MODULES_TABLE); } /** diff --git a/tests/unit/acp/move_module_test.php b/tests/unit/acp/move_module_test.php index 5da8b65c..25e9b0ef 100644 --- a/tests/unit/acp/move_module_test.php +++ b/tests/unit/acp/move_module_test.php @@ -64,7 +64,7 @@ class phpbb_acp_move_module_test extends \board3\portal\tests\testframework\data $cache = $this->getMock('\phpbb\cache\cache', array('destroy', 'sql_exists', 'get', 'put', 'sql_load', 'sql_save')); $cache->expects($this->any()) ->method('destroy') - ->with($this->equalTo('portal_modules')); + ->with($this->equalTo('sql')); $cache->expects($this->any()) ->method('get') ->with($this->anything()) diff --git a/tests/unit/portal/modules_manager_confirm_box_test.php b/tests/unit/portal/modules_manager_confirm_box_test.php index aed718de..021446d3 100644 --- a/tests/unit/portal/modules_manager_confirm_box_test.php +++ b/tests/unit/portal/modules_manager_confirm_box_test.php @@ -112,7 +112,7 @@ class modules_manager_confirm_box_test extends \board3\portal\tests\testframewor $this->cache = $this->getMock('\phpbb\cache\cache', array('destroy', 'sql_exists', 'get', 'put', 'purge')); $this->cache->expects($this->any()) ->method('destroy') - ->with($this->equalTo('portal_modules')); + ->with($this->equalTo('sql')); $this->cache->expects($this->any()) ->method('get') ->with($this->anything())