37 lines
1.2 KiB
PHP
37 lines
1.2 KiB
PHP
<?php defined('BLUDIT') or die('Bludit CMS.');
|
|
|
|
// ============================================================================
|
|
// Check role
|
|
// ============================================================================
|
|
|
|
if($Login->role()!=='admin') {
|
|
Alert::set($Language->g('you-do-not-have-sufficient-permissions'));
|
|
Redirect::page('dashboard');
|
|
}
|
|
|
|
// ============================================================================
|
|
// Functions
|
|
// ============================================================================
|
|
|
|
// ============================================================================
|
|
// Main before POST
|
|
// ============================================================================
|
|
|
|
// ============================================================================
|
|
// POST Method
|
|
// ============================================================================
|
|
|
|
// ============================================================================
|
|
// Main after POST
|
|
// ============================================================================
|
|
$pluginClassName = $layout['parameters'];
|
|
|
|
foreach($plugins['all'] as $P)
|
|
{
|
|
if($P->className()==$pluginClassName) {
|
|
$P->install();
|
|
}
|
|
}
|
|
|
|
Redirect::page('plugins');
|