Files
2024-11-20 09:09:44 +01:00

28 lines
863 B
PHP

<?php
/**
* Creative Elements - live Theme & Page Builder
*
* @author WebshopWorks
* @copyright 2019-2023 WebshopWorks.com
* @license One domain support license
*/
defined('_PS_VERSION_') or exit;
class CMSCategory extends CMSCategoryCore
{
const CE_OVERRIDE = true;
public function __construct($id = null, $idLang = null)
{
parent::__construct($id, $idLang);
$ctrl = Context::getContext()->controller;
if ($ctrl instanceof CmsController && !CmsController::$initialized && !$this->active && Tools::getIsset('id_employee') && Tools::getIsset('adtoken')) {
$tab = 'AdminCmsContent';
if (Tools::getAdminToken($tab . (int) Tab::getIdFromClassName($tab) . (int) Tools::getValue('id_employee')) == Tools::getValue('adtoken')) {
$this->active = 1;
}
}
}
}