From ea779aab36514cb00dfc97184847a35b19564f1f Mon Sep 17 00:00:00 2001 From: wangzemei Date: Thu, 15 Sep 2022 09:07:39 +0000 Subject: [PATCH] * modify count --- module/story/model.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/module/story/model.php b/module/story/model.php index 6bfdde65fc..4d5a36d2d5 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -4256,11 +4256,7 @@ class storyModel extends model $title = $isClick ? $title : $this->lang->story->recallTip['actived']; $storyPriv = array(common::hasPriv('story', 'processStoryChange'), common::hasPriv('story', 'change'), common::hasPriv('story', 'submitReview'), common::hasPriv('story', 'review'), common::hasPriv('story', 'close')); - $storyPrivCount = 0; - foreach($storyPriv as $value) - { - if($value == 1) $storyPrivCount ++; - } + $storyPrivCount = array_sum($storyPriv); if(common::hasPriv('story', 'recall') && ($storyPrivCount > 1)) { $menu .= "
";