fix check if hooks should be emited in runHooks

This commit is contained in:
Robin Appelman 2015-06-15 15:07:48 +02:00
parent 4b48dd424f
commit 567df226e5

View file

@ -1074,10 +1074,11 @@ class View {
* @return bool * @return bool
*/ */
private function runHooks($hooks, $path, $post = false) { private function runHooks($hooks, $path, $post = false) {
$relativePath = $path;
$path = $this->getHookPath($path); $path = $this->getHookPath($path);
$prefix = ($post) ? 'post_' : ''; $prefix = ($post) ? 'post_' : '';
$run = true; $run = true;
if ($this->shouldEmitHooks($path)) { if ($this->shouldEmitHooks($relativePath)) {
foreach ($hooks as $hook) { foreach ($hooks as $hook) {
if ($hook != 'read') { if ($hook != 'read') {
\OC_Hook::emit( \OC_Hook::emit(