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
|
2015-11-28 15:47:03 +01:00
|
|
|
// ============================================================================
|
2017-09-09 00:33:14 +02:00
|
|
|
|
2021-01-12 21:46:42 +01:00
|
|
|
$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'];
|