function __construct(&$plugin, $pluginPath, $themePath, $request) { parent::__construct($plugin, $pluginPath, $themePath, $request); $event_manager =& $this->_getEventManager(); $event_manager->addListener('plugin_docman_event_wikipage_update', $this->logger, 'log', true, 0); $event_manager->addListener('plugin_docman_event_wikipage_update', $this->notificationsManager, 'somethingHappen', true, 0); }
function _dispatch($view, $item, $root, $get_show_view) { switch ($view) { case 'permissions': if (!$this->userCanManage($item->getId())) { $this->feedback->log('error', $GLOBALS['Language']->getText('plugin_docman', 'error_perms_perms')); } else { $this->action = $view; $this->_setView(''); } break; case 'appendFileChunk': case 'new_version': case 'update': if (!$this->userCanWrite($item->getId())) { $this->feedback->log('error', $GLOBALS['Language']->getText('plugin_docman', 'error_perms_edit')); } else { $this->action = $view; $this->_setView(''); } break; case 'getFileMD5sum': case 'getMetadataListOfValues': case 'getProjectMetadata': case 'getTreeInfo': case 'getFileContents': case 'getFileChunk': if (!$this->userCanRead($item->getId())) { $this->feedback->log('error', $GLOBALS['Language']->getText('plugin_docman', 'error_perms_view')); } else { $this->action = $view; $this->_setView(''); } break; case 'search': $this->view = 'Search'; break; default: parent::_dispatch($view, $item, $root, $get_show_view); } }
public function __construct(DocmanPlugin $plugin, WebDAV_Request $request) { parent::__construct($plugin, $plugin->getPluginPath(), $plugin->getThemePath(), $request); }