koblog/bl-kernel/admin/controllers/editor.php

30 lines
998 B
PHP
Raw Normal View History

2015-05-05 03:00:01 +02:00
<?php defined('BLUDIT') or die('Bludit CMS.');
2015-08-03 02:49:12 +02:00
// ============================================================================
2020-11-30 22:00:54 +01:00
// Authorization
2015-08-03 02:49:12 +02:00
// ============================================================================
2019-05-13 18:26:35 +02:00
checkRole(array('admin', 'editor', 'author'));
2018-07-25 23:42:00 +02:00
2015-07-14 06:41:32 +02:00
// ============================================================================
// Functions
// ============================================================================
2015-08-03 02:49:12 +02:00
// ============================================================================
2020-11-30 22:00:54 +01:00
// Main
// ============================================================================
$pageKey = false;
if (!empty($layout['parameters'])) {
try {
$pageKey = $layout['parameters'];
$page = new Page($pageKey);
} catch (Exception $e) {
Log::set(__METHOD__.LOG_SEP.'An error occurred while trying to get the page: '.$pageKey, LOG_TYPE_ERROR);
Redirect::page('content');
}
}
// HTML <title>
2020-11-30 22:00:54 +01:00
$layout['title'] = $L->g('New content') . ' - ' . $layout['title'];