This commit is contained in:
joyqi
2021-10-30 00:02:41 +08:00
parent ceaa545c7d
commit 0dcf45a152
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ class Edit extends PostEdit implements ActionInterface
$this->user->pass('editor');
/** 获取文章内容 */
if (!empty($this->request->cid) && 'delete' != $this->request->do && 'sort' != $this->request->do) {
if (!empty($this->request->cid) && in_array($this->request->do, ['save', 'publish'])) {
$this->db->fetchRow($this->select()
->where('table.contents.type = ? OR table.contents.type = ?', 'page', 'page_draft')
->where('table.contents.cid = ?', $this->request->filter('int')->cid)
+1 -1
View File
@@ -45,7 +45,7 @@ class Edit extends Contents implements ActionInterface
$this->user->pass('contributor');
/** 获取文章内容 */
if (!empty($this->request->cid) && 'delete' != $this->request->do) {
if (!empty($this->request->cid) && in_array($this->request->do, ['save', 'publish'])) {
$this->db->fetchRow($this->select()
->where('table.contents.type = ? OR table.contents.type = ?', 'post', 'post_draft')
->where('table.contents.cid = ?', $this->request->filter('int')->cid)