koblog/bl-kernel/admin/controllers/plugins-settings.php

33 lines
1 KiB
PHP
Raw Normal View History

2015-07-14 04:16:28 +02:00
<?php defined('BLUDIT') or die('Bludit CMS.');
2015-07-14 06:41:32 +02:00
// ============================================================================
2021-02-07 18:13:25 +01:00
// Authorization
2015-07-14 06:41:32 +02:00
// ============================================================================
2018-05-20 21:48:43 +02:00
checkRole(array('admin'));
2015-07-14 06:41:32 +02:00
2015-07-14 04:16:28 +02:00
// ============================================================================
// Functions
// ============================================================================
// ============================================================================
2021-02-07 18:13:25 +01:00
// Main
2015-07-14 04:16:28 +02:00
// ============================================================================
2021-02-07 18:13:25 +01:00
$plugin = false;
2015-07-28 03:01:52 +02:00
$pluginClassName = $layout['parameters'];
2015-07-14 04:16:28 +02:00
// Check if the plugin is installed/activated
if (pluginActivated($pluginClassName)) {
$plugin = $plugins['all'][$pluginClassName];
2018-05-20 21:48:43 +02:00
} else {
Redirect::page('plugins');
2015-07-14 04:16:28 +02:00
}
2015-08-01 18:28:47 +02:00
// Check if the plugin has the method form()
2018-05-20 21:48:43 +02:00
if (!method_exists($plugin, 'form')) {
Redirect::page('plugins');
2015-08-01 18:28:47 +02:00
}
2021-02-07 18:13:25 +01:00
// HTML <title>
$layout['title'] = $L->g('Plugin'). ' [ ' .$plugin->name(). ' ] ' . ' - ' . $layout['title'];