aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2003-05-11 16:38:43 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2003-05-11 16:38:43 +0000
commit6b7f90de270c53f6dbea7e3de47901ba2ade79a7 (patch)
tree916f9d7c629b218d9435b51af952a6183a7c6778 /phpBB/includes/functions_posting.php
parent4d1def879aef2b97a2dfe65c13f2c3c8e6b53aff (diff)
downloadforums-6b7f90de270c53f6dbea7e3de47901ba2ade79a7.tar
forums-6b7f90de270c53f6dbea7e3de47901ba2ade79a7.tar.gz
forums-6b7f90de270c53f6dbea7e3de47901ba2ade79a7.tar.bz2
forums-6b7f90de270c53f6dbea7e3de47901ba2ade79a7.tar.xz
forums-6b7f90de270c53f6dbea7e3de47901ba2ade79a7.zip
re-enable posting. ;)
git-svn-id: file:///svn/phpbb/trunk@4006 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php55
1 files changed, 29 insertions, 26 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 3e0f0af014..34cf8a48f9 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -594,7 +594,7 @@ function upload_attachment($filename)
}
// 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);
@@ -1229,42 +1229,45 @@ function user_notification($mode, $subject, $forum_id, $topic_id, $post_id)
}
$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
WHERE a.user_id IN (" . $ids . ")
AND ao.auth_option_id = a.auth_option_id
AND ao.auth_option = 'f_read'
AND a.forum_id = " . $forum_id;
- $result = $db->sql_query($sql);
+ $result = $db->sql_query($sql);
- while ($row = $db->sql_fetchrow($result))
- {
- $allowed_users[] = $row['user_id'];
- }
- $db->sql_freeresult($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);
+ // 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)
+ while ($row = $db->sql_fetchrow($result))
{
- $allowed_users[] = $row['user_id'];
+ if ($row['min_setting'] == 1)
+ {
+ $allowed_users[] = $row['user_id'];
+ }
}
- }
- $db->sql_freeresult($result);
+ $db->sql_freeresult($result);
- $allowed_users = array_unique($allowed_users);
+ $allowed_users = array_unique($allowed_users);
+ }
//
if ($topic_notification)