Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/kernel/application.php
Show First 20 Lines • Show All 1027 Lines • ▼ Show 20 Line(s) | |||||
$this->LinkVar('dst_field'); // field to set value choosed in selector | $this->LinkVar('dst_field'); // field to set value choosed in selector | ||||
} | } | ||||
if ( $this->GetVar('ajax') == 'yes' && !$this->GetVar('debug_ajax') ) { | if ( $this->GetVar('ajax') == 'yes' && !$this->GetVar('debug_ajax') ) { | ||||
// hide debug output from ajax requests automatically | // hide debug output from ajax requests automatically | ||||
kUtil::safeDefine('DBG_SKIP_REPORTING', 1); // safeDefine, because debugger also defines it | kUtil::safeDefine('DBG_SKIP_REPORTING', 1); // safeDefine, because debugger also defines it | ||||
} | } | ||||
} | } | ||||
elseif ( $this->GetVar('admin') ) { | |||||
/** @var Session $admin_session */ | |||||
$admin_session = $this->recallObject('Session.admin'); | |||||
// store Admin Console User's ID to Front-End's session for cross-session permission checks | |||||
$this->StoreVar('admin_user_id', (int)$admin_session->RecallVar('user_id')); | |||||
if ( $this->CheckAdminPermission('CATEGORY.MODIFY', 0, $this->getBaseCategory()) ) { | |||||
// user can edit cms blocks (when viewing front-end through admin's frame) | |||||
$editing_mode = $this->GetVar('editing_mode'); | |||||
define('EDITING_MODE', $editing_mode ? $editing_mode : EDITING_MODE_BROWSE); | |||||
} | |||||
} | |||||
kUtil::safeDefine('EDITING_MODE', ''); // user can't edit anything | |||||
$this->Phrases->setPhraseEditing(); | $this->Phrases->setPhraseEditing(); | ||||
$this->EventManager->ProcessRequest(); | $this->EventManager->ProcessRequest(); | ||||
$this->InitParser(); | $this->InitParser(); | ||||
$t = $this->GetVar('render_template', $this->GetVar('t')); | $t = $this->GetVar('render_template', $this->GetVar('t')); | ||||
if ( !$this->TemplatesCache->TemplateExists($t) && !$this->isAdmin ) { | if ( !$this->TemplatesCache->TemplateExists($t) && !$this->isAdmin ) { | ||||
▲ Show 20 Lines • Show All 2058 Lines • Show Last 20 Lines |