mirror of
https://github.com/moodle/moodle.git
synced 2025-04-19 07:25:30 +02:00
"MDL-23917, fixed the capability check, comment api"
This commit is contained in:
parent
cae4e0781d
commit
e6efa0cfdb
@ -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'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user