2017-04-17 12:49:03 +02:00
|
|
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
|
|
|
|
|
|
|
// ============================================================================
|
2021-01-16 13:03:16 +01:00
|
|
|
// Authorization
|
2017-04-17 12:49:03 +02:00
|
|
|
// ============================================================================
|
|
|
|
|
2018-05-20 21:48:43 +02:00
|
|
|
checkRole(array('admin'));
|
2017-04-17 12:49:03 +02:00
|
|
|
|
|
|
|
// ============================================================================
|
|
|
|
// Functions
|
|
|
|
// ============================================================================
|
|
|
|
|
|
|
|
// ============================================================================
|
2021-01-16 13:03:16 +01:00
|
|
|
// Main
|
2017-04-17 12:49:03 +02:00
|
|
|
// ============================================================================
|
|
|
|
|
2017-04-17 13:23:43 +02:00
|
|
|
$categoryKey = $layout['parameters'];
|
|
|
|
|
2018-08-02 22:33:53 +02:00
|
|
|
if (!$categories->exists($categoryKey)) {
|
2017-04-17 13:23:43 +02:00
|
|
|
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to get the category: '.$categoryKey);
|
2017-05-16 00:46:20 +02:00
|
|
|
Redirect::page('categories');
|
2017-04-17 12:49:03 +02:00
|
|
|
}
|
|
|
|
|
2018-08-02 22:33:53 +02:00
|
|
|
$categoryMap = $categories->getMap($categoryKey);
|
2017-04-17 12:49:03 +02:00
|
|
|
|
2021-01-16 13:03:16 +01:00
|
|
|
// HTML <title>
|
|
|
|
$layout['title'] = $L->g('Edit Category') . ' [ ' . $categoryMap['name'] . ' ] ' . ' - ' . $layout['title'];
|