aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_modules.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-05-06 15:31:39 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-05-06 15:31:39 +0000
commit6205be1e746dd51dface756fbeb8b7fc702e1d80 (patch)
tree5f6fc8a6fa8bc8f13d5511a3f8ac4bb148d60b5e /phpBB/includes/acp/acp_modules.php
parent1e74ea85c5eebf9de7d29b1816ed5f8d9a02d638 (diff)
downloadforums-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.php18
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 . '&amp;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 . '&amp;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;