diff --git a/plugins/ktcore/admin/plugins.php b/plugins/ktcore/admin/plugins.php new file mode 100755 index 0000000..7110ae8 --- /dev/null +++ b/plugins/ktcore/admin/plugins.php @@ -0,0 +1,55 @@ +aBreadcrumbs[] = array( + 'url' => $_SERVER['PHP_SELF'], + 'name' => _('Plugins'), + ); + return parent::check(); + } + + function do_main() { + $aPlugins = KTPluginEntity::getList(); + $aEnabledPluginIds = KTPluginEntity::getEnabledPlugins(); + + $oTemplating =& KTTemplating::getSingleton(); + $oTemplate =& $oTemplating->loadTemplate('ktcore/plugins/list'); + $oTemplate->setData(array( + 'context' => $this, + 'plugins' => $aPlugins, + 'enabled_plugins' => $aEnabledPluginIds, + )); + return $oTemplate; + } + + function do_update() { + $sTable = KTUtil::getTableName('plugins'); + $aIds = KTUtil::arrayGet($_REQUEST, 'pluginids'); + $sIds = DBUtil::paramArray($aIds); + $sQuery = sprintf('UPDATE %s SET disabled = true WHERE id NOT IN (%s)', $sTable, $sIds); + DBUtil::runQuery(array($sQuery, $aIds)); + $sQuery = sprintf('UPDATE %s SET disabled = false WHERE id IN (%s)', $sTable, $sIds); + DBUtil::runQuery(array($sQuery, $aIds)); + $this->successRedirectToMain('Plugins updated'); + } + + function do_reread() { + KTPluginUtil::registerPlugins(); + $this->successRedirectToMain('Plugins read from the filesystem'); + } +} + +?> diff --git a/templates/ktcore/plugins/list.smarty b/templates/ktcore/plugins/list.smarty new file mode 100644 index 0000000..cf2cb71 --- /dev/null +++ b/templates/ktcore/plugins/list.smarty @@ -0,0 +1,26 @@ +
If you have moved your document management +system on the filesystem, or installed or removed plugins, the plugins +must be re-read from the filesystem
+ + +