bludit/bl-kernel/admin/controllers/install-theme.php

41 lines
1.3 KiB
PHP
Raw Normal View History

2015-08-03 00:05:20 +02:00
<?php defined('BLUDIT') or die('Bludit CMS.');
// ============================================================================
// Check role
// ============================================================================
2018-05-20 21:48:43 +02:00
checkRole(array('admin'));
2015-08-03 00:05:20 +02:00
// ============================================================================
// Functions
// ============================================================================
2015-08-03 02:49:12 +02:00
// ============================================================================
// Main before POST
// ============================================================================
2015-08-03 00:05:20 +02:00
// ============================================================================
// POST Method
// ============================================================================
// ============================================================================
2015-08-03 02:49:12 +02:00
// Main after POST
2015-08-03 00:05:20 +02:00
// ============================================================================
$themeDirname = $layout['parameters'];
2018-07-28 21:00:12 +02:00
if (Sanitize::pathFile(PATH_THEMES.$themeDirname)) {
$site->set(array('theme'=>$themeDirname));
// Add to syslog
$syslog->add(array(
'dictionaryKey'=>'new-theme-configured',
'notes'=>$themeDirname
));
// Create an alert
Alert::set( $Language->g('The changes have been saved') );
2015-08-03 00:05:20 +02:00
}
// Redirect
Redirect::page('themes');