aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_prune.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-08-12 13:14:39 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-08-12 13:14:39 +0000
commit8405f0d324fd42bec2f775986e69e5d8cf548ebf (patch)
treeefa8caf14f78d67ece434c39e294532adbd20a8b /phpBB/includes/acp/acp_prune.php
parent0c6bfcf4c715b64d8c971adb6077018994fe5ce9 (diff)
downloadforums-8405f0d324fd42bec2f775986e69e5d8cf548ebf.tar
forums-8405f0d324fd42bec2f775986e69e5d8cf548ebf.tar.gz
forums-8405f0d324fd42bec2f775986e69e5d8cf548ebf.tar.bz2
forums-8405f0d324fd42bec2f775986e69e5d8cf548ebf.tar.xz
forums-8405f0d324fd42bec2f775986e69e5d8cf548ebf.zip
sql_in_set changes
git-svn-id: file:///svn/phpbb/trunk@6271 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/acp_prune.php')
-rw-r--r--phpBB/includes/acp/acp_prune.php14
1 files changed, 3 insertions, 11 deletions
diff --git a/phpBB/includes/acp/acp_prune.php b/phpBB/includes/acp/acp_prune.php
index 3fa99b6727..4752e7bafe 100644
--- a/phpBB/includes/acp/acp_prune.php
+++ b/phpBB/includes/acp/acp_prune.php
@@ -68,7 +68,7 @@ class acp_prune
'S_PRUNED' => true)
);
- $sql_forum = (sizeof($forum_id)) ? ' AND forum_id IN (' . implode(', ', $forum_id) . ')' : '';
+ $sql_forum = (sizeof($forum_id)) ? ' AND ' . $db->sql_in_set('forum_id', $forum_id) : '';
// Get a list of forum's or the data for the forum that we are pruning.
$sql = 'SELECT forum_id, forum_name
@@ -148,7 +148,7 @@ class acp_prune
{
$sql = 'SELECT forum_id, forum_name
FROM ' . FORUMS_TABLE . '
- WHERE forum_id IN (' . implode(', ', $forum_id) . ')';
+ WHERE ' . $db->sql_in_set('forum_id', $forum_id);
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
@@ -202,15 +202,7 @@ class acp_prune
if ($users)
{
- $users = explode("\n", $users);
-
- $where_sql = '';
-
- foreach ($users as $username)
- {
- $where_sql .= (($where_sql != '') ? ', ' : '') . "'" . $db->sql_escape($username) . "'";
- }
- $where_sql = " AND username IN ($where_sql)";
+ $where_sql = ' AND ' . $db->sql_in_set('username', explode("\n", $users));
}
else
{