diff options
| author | 2014-12-08 12:01:47 +0100 | |
|---|---|---|
| committer | 2014-12-08 12:01:47 +0100 | |
| commit | c6dfec3ad351ee3b828c6a2c0a273bad5d9ac0df (patch) | |
| tree | 53a8881481b44c4bddeacf81c77ff8fbc5798fdc /app/Controllers/extensionController.php | |
| parent | 2232d1e02a4bc9dbaa99cdbd22efad116ec01403 (diff) | |
Add behaviour to configure action (extensions)
- Put extension configure view in dir_ext/configure.phtml
- Handle POST action in Extension->handleConfigureAction() method
See https://github.com/FreshRSS/FreshRSS/issues/252
Diffstat (limited to 'app/Controllers/extensionController.php')
| -rw-r--r-- | app/Controllers/extensionController.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/Controllers/extensionController.php b/app/Controllers/extensionController.php index a1e39af37..73b8070cb 100644 --- a/app/Controllers/extensionController.php +++ b/app/Controllers/extensionController.php @@ -27,6 +27,22 @@ class FreshRSS_extension_Controller extends Minz_ActionController { if (Minz_Request::param('ajax')) { $this->view->_useLayout(false); } + + $ext_name = urldecode(Minz_Request::param('e')); + $ext = Minz_ExtensionManager::find_extension($ext_name); + + if (is_null($ext)) { + Minz_Error::error(404); + } + if ($ext->getType() === 'system' && !FreshRSS_Auth::hasAccess('admin')) { + Minz_Error::error(403); + } + + $this->view->extension = $ext; + + if (Minz_Request::isPost()) { + $this->view->extension->handleConfigureAction(); + } } /** |
