1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-08 16:45:19 +02:00

re-enable posting. ;)

git-svn-id: file:///svn/phpbb/trunk@4006 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2003-05-11 16:38:43 +00:00
parent 4d1def879a
commit 6b7f90de27

View File

@ -594,7 +594,7 @@ function upload_attachment($filename)
} }
// Check Image Size, if it is an image // Check Image Size, if it is an image
if (!$acl->gets('m_', 'a_') && $cat_id == IMAGE_CAT) if (!$auth->acl_gets('m_', 'a_') && $cat_id == IMAGE_CAT)
{ {
list($width, $height) = getimagesize($file); list($width, $height) = getimagesize($file);
@ -1229,42 +1229,45 @@ function user_notification($mode, $subject, $forum_id, $topic_id, $post_id)
} }
$db->sql_freeresult($result); $db->sql_freeresult($result);
$sql = "SELECT a.user_id if ($ids != '')
{
$sql = "SELECT a.user_id
FROM " . ACL_OPTIONS_TABLE . " ao, " . ACL_USERS_TABLE . " a FROM " . ACL_OPTIONS_TABLE . " ao, " . ACL_USERS_TABLE . " a
WHERE a.user_id IN (" . $ids . ") WHERE a.user_id IN (" . $ids . ")
AND ao.auth_option_id = a.auth_option_id AND ao.auth_option_id = a.auth_option_id
AND ao.auth_option = 'f_read' AND ao.auth_option = 'f_read'
AND a.forum_id = " . $forum_id; AND a.forum_id = " . $forum_id;
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) while ($row = $db->sql_fetchrow($result))
{
$allowed_users[] = $row['user_id'];
}
$db->sql_freeresult($result);
// Now grab group settings ... users can belong to multiple groups so we grab
// the minimum setting for all options. ACL_NO overrides ACL_YES so act appropriatley
$sql = "SELECT ug.user_id, MIN(a.auth_setting) as min_setting
FROM " . USER_GROUP_TABLE . " ug, " . ACL_OPTIONS_TABLE . " ao, " . ACL_GROUPS_TABLE . " a
WHERE ug.user_id IN (" . $ids . ")
AND a.group_id = ug.group_id
AND ao.auth_option_id = a.auth_option_id
AND ao.auth_option = 'f_read'
AND a.forum_id = " . $forum_id . "
GROUP BY ao.auth_option, a.forum_id";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
if ($row['min_setting'] == 1)
{ {
$allowed_users[] = $row['user_id']; $allowed_users[] = $row['user_id'];
} }
} $db->sql_freeresult($result);
$db->sql_freeresult($result);
$allowed_users = array_unique($allowed_users); // Now grab group settings ... users can belong to multiple groups so we grab
// the minimum setting for all options. ACL_NO overrides ACL_YES so act appropriatley
$sql = "SELECT ug.user_id, MIN(a.auth_setting) as min_setting
FROM " . USER_GROUP_TABLE . " ug, " . ACL_OPTIONS_TABLE . " ao, " . ACL_GROUPS_TABLE . " a
WHERE ug.user_id IN (" . $ids . ")
AND a.group_id = ug.group_id
AND ao.auth_option_id = a.auth_option_id
AND ao.auth_option = 'f_read'
AND a.forum_id = " . $forum_id . "
GROUP BY ao.auth_option, a.forum_id";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
if ($row['min_setting'] == 1)
{
$allowed_users[] = $row['user_id'];
}
}
$db->sql_freeresult($result);
$allowed_users = array_unique($allowed_users);
}
// //
if ($topic_notification) if ($topic_notification)