From d469c7d05b806d94d9a677a294ceccf5a458b834 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=91=A8=E9=83=A8=E8=90=BD?= Date: Sun, 16 Jan 2022 15:10:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E8=AE=BA=E5=9D=9B?= =?UTF-8?q?=E9=99=84=E4=BB=B6=E3=80=81=E8=AE=BA=E5=9D=9B=E5=87=BA=E5=94=AE?= =?UTF-8?q?=E4=B8=BB=E9=A2=98=E6=B3=84=E9=9C=B2=E5=8C=BF=E5=90=8D=E7=9A=84?= =?UTF-8?q?=20Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- upload/source/module/forum/forum_misc.php | 14 ++++++++++++++ upload/template/default/forum/attachpay.htm | 2 +- upload/template/default/forum/pay.htm | 2 +- upload/template/default/touch/forum/pay.htm | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/upload/source/module/forum/forum_misc.php b/upload/source/module/forum/forum_misc.php index 3fde22ecf..1234ac6f7 100644 --- a/upload/source/module/forum/forum_misc.php +++ b/upload/source/module/forum/forum_misc.php @@ -105,6 +105,11 @@ if($_GET['action'] == 'paysucceed') { $attach['netprice'] = $status != 2 ? round($attach['price'] * (1 - $_G['setting']['creditstax'])) : 0; $lockid = 'attachpay_'.$_G['uid']; if(!submitcheck('paysubmit')) { + $post = C::t('forum_post')->fetch('tid:'.$attach['tid'], $attach['pid']); + if($post['anonymous'] && !$_G['forum']['ismoderator']) { + $attach['uid'] = 0; + $attach['author'] = $_G['setting']['anonymoustext']; + } include template('forum/attachpay'); } elseif(!discuz_process::islocked($lockid)) { if(!empty($_GET['buyall'])) { @@ -950,6 +955,15 @@ if($_GET['action'] == 'votepoll' && submitcheck('pollsubmit', 1)) { if(!submitcheck('paysubmit')) { + if(empty($thread['author'])) { + if($_G['forum']['ismoderator']) { + $authorinfo = getuserbyuid($thread['authorid']); + $thread['author'] = $authorinfo['username']; + } else { + $thread['authorid'] = 0; + $thread['author'] = $_G['setting']['anonymoustext']; + } + } include template('forum/pay'); } else { diff --git a/upload/template/default/forum/attachpay.htm b/upload/template/default/forum/attachpay.htm index 5483fbb25..742a811f9 100644 --- a/upload/template/default/forum/attachpay.htm +++ b/upload/template/default/forum/attachpay.htm @@ -24,7 +24,7 @@ - + diff --git a/upload/template/default/forum/pay.htm b/upload/template/default/forum/pay.htm index 66397b1db..37e754aa1 100644 --- a/upload/template/default/forum/pay.htm +++ b/upload/template/default/forum/pay.htm @@ -24,7 +24,7 @@
{lang author}$attach[author]$attach['author']$attach['author']
{lang attachment}
- + diff --git a/upload/template/default/touch/forum/pay.htm b/upload/template/default/touch/forum/pay.htm index 5a37bf2a5..b71a98c0f 100644 --- a/upload/template/default/touch/forum/pay.htm +++ b/upload/template/default/touch/forum/pay.htm @@ -17,7 +17,7 @@
{lang author}$thread[author]$thread['author']$thread['author']
{lang price}({$_G['setting']['extcredits'][$_G['setting']['creditstransextra'][1]][title]})
- + -- Gitee
{lang author}$thread[author]$thread['author']$thread['author']
{lang price}({$_G['setting']['extcredits'][$_G['setting']['creditstransextra'][1]][title]})