diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2007-05-06 15:31:39 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2007-05-06 15:31:39 +0000 |
commit | 6205be1e746dd51dface756fbeb8b7fc702e1d80 (patch) | |
tree | 5f6fc8a6fa8bc8f13d5511a3f8ac4bb148d60b5e /phpBB/includes/acp/acp_modules.php | |
parent | 1e74ea85c5eebf9de7d29b1816ed5f8d9a02d638 (diff) | |
download | forums-6205be1e746dd51dface756fbeb8b7fc702e1d80.tar forums-6205be1e746dd51dface756fbeb8b7fc702e1d80.tar.gz forums-6205be1e746dd51dface756fbeb8b7fc702e1d80.tar.bz2 forums-6205be1e746dd51dface756fbeb8b7fc702e1d80.tar.xz forums-6205be1e746dd51dface756fbeb8b7fc702e1d80.zip |
#9828, #10545, #10541, #10533, #10529, #10527, #10521, #10503, #10481
- more label fixes
- simpler approach to get input cursor text
git-svn-id: file:///svn/phpbb/trunk@7485 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/acp_modules.php')
-rw-r--r-- | phpBB/includes/acp/acp_modules.php | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/phpBB/includes/acp/acp_modules.php b/phpBB/includes/acp/acp_modules.php index 8b54589707..dd67cdda87 100644 --- a/phpBB/includes/acp/acp_modules.php +++ b/phpBB/includes/acp/acp_modules.php @@ -106,12 +106,26 @@ class acp_modules trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING); } + $sql = 'SELECT * + FROM ' . MODULES_TABLE . " + WHERE module_class = '" . $db->sql_escape($this->module_class) . "' + AND module_id = $module_id"; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if (!$row) + { + trigger_error($user->lang['NO_MODULE'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING); + } + $sql = 'UPDATE ' . MODULES_TABLE . ' SET module_enabled = ' . (($action == 'enable') ? 1 : 0) . " - WHERE module_id = $module_id"; + WHERE module_class = '" . $db->sql_escape($this->module_class) . "' + AND module_id = $module_id"; $db->sql_query($sql); - add_log('admin', 'LOG_MODULE_' . strtoupper($action)); + add_log('admin', 'LOG_MODULE_' . strtoupper($action), $this->lang_name($row['module_langname'])); $this->remove_cache_file(); break; |