Check for attachment ACP option.
This commit is contained in:
@@ -73,7 +73,7 @@ include($phpbb_root_path . 'includes/message_parser.'.$phpEx);
|
||||
// fetch post for news & announce
|
||||
function phpbb_fetch_posts($forum_from, $permissions, $number_of_posts, $text_length, $time, $type, $start = 0)
|
||||
{
|
||||
global $db, $phpbb_root_path, $auth, $user, $bbcode_bitfield, $bbcode, $portal_config;
|
||||
global $db, $phpbb_root_path, $auth, $user, $bbcode_bitfield, $bbcode, $portal_config, $config;
|
||||
|
||||
$posts = array();
|
||||
|
||||
@@ -254,6 +254,8 @@ function phpbb_fetch_posts($forum_from, $permissions, $number_of_posts, $text_le
|
||||
while ( $row = $db->sql_fetchrow($result) )
|
||||
{
|
||||
|
||||
if( $config['allow_attachments'] )
|
||||
{
|
||||
// Pull attachment data
|
||||
$sql2 = 'SELECT *
|
||||
FROM ' . ATTACHMENTS_TABLE . '
|
||||
@@ -268,6 +270,7 @@ function phpbb_fetch_posts($forum_from, $permissions, $number_of_posts, $text_le
|
||||
$attachments[] = $row2;
|
||||
}
|
||||
$db->sql_freeresult($result2);
|
||||
}
|
||||
|
||||
$posts[$i]['bbcode_uid'] = $row['bbcode_uid'];
|
||||
$len_check = $row['post_text'];
|
||||
|
||||
Reference in New Issue
Block a user