From e6efa0cfdb72f77779c3d2b2c9dc0a7e4928a683 Mon Sep 17 00:00:00 2001 From: Dongsheng Cai Date: Wed, 25 Aug 2010 08:20:46 +0000 Subject: [PATCH] "MDL-23917, fixed the capability check, comment api" --- comment/lib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/comment/lib.php b/comment/lib.php index dcf3c91e148..f8639e2320a 100644 --- a/comment/lib.php +++ b/comment/lib.php @@ -254,11 +254,11 @@ EOD; if (!empty($this->plugintype)) { $permissions = plugin_callback($this->plugintype, $this->pluginname, FEATURE_COMMENT, 'permissions', array($this->args), array('post'=>true, 'view'=>true)); if ($this->ignore_permission) { - $this->postcap = $this->postcap && $permissions['post']; - $this->viewcap = $this->viewcap && $permissions['view']; - } else { $this->postcap = $permissions['post']; $this->viewcap = $permissions['view']; + } else { + $this->postcap = $this->postcap && $permissions['post']; + $this->viewcap = $this->viewcap && $permissions['view']; } } }