From 7a2887d0923cea18f560ec5e9f93da737a61d967 Mon Sep 17 00:00:00 2001 From: DiscuzX <153619335@qq.com> Date: Wed, 29 Dec 2021 11:24:31 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BB=98=E8=B4=B9=E4=B8=BB?= =?UTF-8?q?=E9=A2=98=E5=A4=A7=E5=9B=BE=E6=A8=A1=E5=BC=8F=E5=8F=AF=E7=9C=8B?= =?UTF-8?q?=E6=89=80=E6=9C=89=E5=9B=BE=E7=89=87=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- upload/source/include/thread/thread_album.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/upload/source/include/thread/thread_album.php b/upload/source/include/thread/thread_album.php index d68ef2de3..fd30506ec 100644 --- a/upload/source/include/thread/thread_album.php +++ b/upload/source/include/thread/thread_album.php @@ -11,8 +11,17 @@ if(!defined('IN_DISCUZ')) { exit('Access Denied'); } require_once libfile('function/attachment'); -$imglist = $albumpayaids = $attachmentlist = array(); +$imglist = $albumpayaids = $attachmentlist = $freeattachids = array(); +if($_G['forum_threadpay'] && $_G['thread']['freemessage']) { + preg_match_all('/id="aimg_(\d+)"/i', $_G['thread']['freemessage'], $matches); + if(!empty($matches[1]) && is_array($matches[1])) { + $freeattachids = $matches[1]; + } +} foreach(C::t('forum_attachment_n')->fetch_all_by_id('tid:'.$_G['tid'], 'tid', $_G['tid'], 'aid') as $attach) { + if($_G['forum_threadpay'] && !in_array($attach['aid'], $freeattachids)) { + continue; + } if($attach['uid'] != $_G['forum_thread']['authorid'] && IN_MOBILE != 2) { continue; } -- Gitee