2015-06-11 04:27:04 +02:00
|
|
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
|
|
|
|
|
|
|
// ============================================================================
|
|
|
|
// Check role
|
|
|
|
// ============================================================================
|
|
|
|
|
2018-05-20 21:48:43 +02:00
|
|
|
checkRole(array('admin'));
|
2015-06-11 04:27:04 +02:00
|
|
|
|
|
|
|
// ============================================================================
|
|
|
|
// Functions
|
|
|
|
// ============================================================================
|
|
|
|
|
2015-08-03 02:49:12 +02:00
|
|
|
// ============================================================================
|
|
|
|
// Main before POST
|
|
|
|
// ============================================================================
|
|
|
|
|
2015-06-11 04:27:04 +02:00
|
|
|
// ============================================================================
|
|
|
|
// POST Method
|
|
|
|
// ============================================================================
|
|
|
|
|
|
|
|
// ============================================================================
|
2015-08-03 02:49:12 +02:00
|
|
|
// Main after POST
|
2015-06-11 04:27:04 +02:00
|
|
|
// ============================================================================
|
2015-06-12 06:00:04 +02:00
|
|
|
$pluginClassName = $layout['parameters'];
|
2018-08-09 23:15:52 +02:00
|
|
|
if (activatePlugin($pluginClassName)===false) {
|
|
|
|
Log::set('Fail when try to activate the plugin.', LOG_TYPE_ERROR);
|
|
|
|
}
|
2018-07-17 23:58:01 +02:00
|
|
|
|
|
|
|
if (isset($plugins['all'][$pluginClassName])) {
|
|
|
|
$plugin = $plugins['all'][$pluginClassName];
|
|
|
|
} else {
|
|
|
|
Redirect::page('plugins');
|
|
|
|
}
|
|
|
|
|
|
|
|
if (method_exists($plugin, 'form')) {
|
|
|
|
Redirect::page('configure-plugin/'.$pluginClassName);
|
|
|
|
}
|
|
|
|
|
2018-03-09 12:26:32 +01:00
|
|
|
Redirect::page('plugins#'.$pluginClassName);
|