diff --git a/var/Widget/Contents/Page/Edit.php b/var/Widget/Contents/Page/Edit.php index 490b5552..d3ce3c1d 100644 --- a/var/Widget/Contents/Page/Edit.php +++ b/var/Widget/Contents/Page/Edit.php @@ -85,6 +85,9 @@ class Widget_Contents_Page_Edit extends Widget_Contents_Post_Edit implements Wid $contents['type'] = 'page'; $this->publish($contents); + // 完成发布插件接口 + $this->pluginHandle()->finishPublish($contents, $this); + /** 发送ping */ $this->widget('Widget_Service')->sendPing($this->cid); @@ -101,6 +104,9 @@ class Widget_Contents_Page_Edit extends Widget_Contents_Post_Edit implements Wid $contents['type'] = 'page_draft'; $this->save($contents); + // 完成发布插件接口 + $this->pluginHandle()->finishSave($contents, $this); + if ($this->request->isAjax()) { $created = new Typecho_Date($this->options->gmtTime); $this->response->throwJson(array( @@ -133,6 +139,9 @@ class Widget_Contents_Page_Edit extends Widget_Contents_Post_Edit implements Wid /** 格式化页面主键 */ $pages = is_array($cid) ? $cid : array($cid); foreach ($pages as $page) { + // 删除插件接口 + $this->pluginHandle->delete($page, $this); + if ($this->delete($this->db->sql()->where('cid = ?', $page))) { /** 删除评论 */ $this->db->query($this->db->delete('table.comments') @@ -163,6 +172,9 @@ class Widget_Contents_Page_Edit extends Widget_Contents_Post_Edit implements Wid $this->deleteFields($draft['cid']); } + // 完成删除插件接口 + $this->pluginHandle()->finishDelete($page, $this); + $deleteCount ++; } } diff --git a/var/Widget/Contents/Post/Edit.php b/var/Widget/Contents/Post/Edit.php index 04117c5c..0826915e 100644 --- a/var/Widget/Contents/Post/Edit.php +++ b/var/Widget/Contents/Post/Edit.php @@ -716,6 +716,9 @@ class Widget_Contents_Post_Edit extends Widget_Abstract_Contents implements Widg $contents['type'] = 'post'; $this->publish($contents); + // 完成发布插件接口 + $this->pluginHandle()->finishPublish($contents, $this); + /** 发送ping */ $trackback = array_unique(preg_split("/(\r|\n|\r\n)/", trim($this->request->trackback))); $this->widget('Widget_Service')->sendPing($this->cid, $trackback); @@ -738,6 +741,9 @@ class Widget_Contents_Post_Edit extends Widget_Abstract_Contents implements Widg $contents['type'] = 'post_draft'; $this->save($contents); + // 完成保存插件接口 + $this->pluginHandle()->finishSave($contents, $this); + if ($this->request->isAjax()) { $created = new Typecho_Date($this->options->gmtTime); $this->response->throwJson(array( @@ -770,6 +776,8 @@ class Widget_Contents_Post_Edit extends Widget_Abstract_Contents implements Widg /** 格式化文章主键 */ $posts = is_array($cid) ? $cid : array($cid); foreach ($posts as $post) { + // 删除插件接口 + $this->pluginHandle->delete($post, $this); $condition = $this->db->sql()->where('cid = ?', $post); $postObject = $this->db->fetchObject($this->db->select('status', 'type') @@ -809,6 +817,9 @@ class Widget_Contents_Post_Edit extends Widget_Abstract_Contents implements Widg $this->deleteFields($draft['cid']); } + // 完成删除插件接口 + $this->pluginHandle()->finishDelete($post, $this); + $deleteCount ++; }