From 2befa7a8ba403b2a122e4fc55fe51d3733ad7a51 Mon Sep 17 00:00:00 2001 From: mayue Date: Thu, 23 Jun 2022 08:46:13 +0800 Subject: [PATCH] * Add upgrade script. --- module/upgrade/model.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/module/upgrade/model.php b/module/upgrade/model.php index 6dbbf121ac..5cbf184e6b 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -6449,7 +6449,17 @@ class upgradeModel extends model */ public function addStoryViewPriv() { - $groupIdList = $this->dao->select('id')->from(TABLE_GROUPPRIV)->where() - + $groupIdList = $this->dao->select('id')->from(TABLE_GROUPPRIV) + ->where('module')->eq('story') + ->andWhere('method')->eq('view') + ->fetchPairs('id'); + foreach($groupIdList as $groupID) + { + $this->dao->insert(TABLE_GROUPPRIV) + ->set('group')->eq($groupID) + ->set('module')->eq('execution') + ->set('method')->eq('storyView') + ->exec(); + } } }