aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/mcp.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-12-18 17:29:39 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-12-18 17:29:39 +0000
commit7ca8a4a6626345fa7444cbbbb36b678e31688258 (patch)
treeadffc2d5616682519b544b1a97058f919d169ae3 /phpBB/mcp.php
parent4e5466d276a4c8bb24172b2dc888c8d1a715a04a (diff)
downloadforums-7ca8a4a6626345fa7444cbbbb36b678e31688258.tar
forums-7ca8a4a6626345fa7444cbbbb36b678e31688258.tar.gz
forums-7ca8a4a6626345fa7444cbbbb36b678e31688258.tar.bz2
forums-7ca8a4a6626345fa7444cbbbb36b678e31688258.tar.xz
forums-7ca8a4a6626345fa7444cbbbb36b678e31688258.zip
- Modules are not added correctly [#6370]
- Minor bug in ucp_prefs_personal.html (Opera) [#6348] - MCP-Warnings section colspan problem in Opera [#6338] - Loading extensions on install [#6332] - Adjust PM rules if folder removed [#6326] - #6318 - Coppa registration [#6306] - Quick-Mod Topic Type Changes Fail when Topic == Global [#6228] - added the possibility to change topic type for more than one topic (within mcp) git-svn-id: file:///svn/phpbb/trunk@6781 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/mcp.php')
-rw-r--r--phpBB/mcp.php28
1 files changed, 20 insertions, 8 deletions
diff --git a/phpBB/mcp.php b/phpBB/mcp.php
index 98a59a73ed..7886091081 100644
--- a/phpBB/mcp.php
+++ b/phpBB/mcp.php
@@ -632,6 +632,7 @@ function check_ids(&$ids, $table, $sql_id, $acl_list = false, $single_forum = fa
$ids = array();
$forum_id = false;
+
while ($row = $db->sql_fetchrow($result))
{
if ($acl_list && $row['forum_id'] && !$auth->acl_gets($acl_list, $row['forum_id']))
@@ -652,17 +653,26 @@ function check_ids(&$ids, $table, $sql_id, $acl_list = false, $single_forum = fa
}
// Limit forum to a specific forum id?
- if ($single_forum !== true && $row['forum_id'] == (int) $single_forum)
- {
- $forum_id = (int) $single_forum;
- }
- else if ($forum_id === false)
+ // This can get really tricky, because we do not want to create a failure on global topics. :)
+ if ($row['forum_id'])
{
- $forum_id = $row['forum_id'];
- }
+ if ($single_forum !== true && $row['forum_id'] == (int) $single_forum)
+ {
+ $forum_id = (int) $single_forum;
+ }
+ else if ($forum_id === false)
+ {
+ $forum_id = $row['forum_id'];
+ }
- if ($row['forum_id'] == $forum_id)
+ if ($row['forum_id'] == $forum_id)
+ {
+ $ids[] = $row[$sql_id];
+ }
+ }
+ else
{
+ // Always add a global topic
$ids[] = $row[$sql_id];
}
}
@@ -673,6 +683,8 @@ function check_ids(&$ids, $table, $sql_id, $acl_list = false, $single_forum = fa
return false;
}
+ // If forum id is false and ids populated we may have only global announcements selected (returning 0 because of (int) $forum_id)
+
return ($single_forum === false) ? true : (int) $forum_id;
}