Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/units/categories/categories_event_handler.php
Show First 20 Lines • Show All 599 Lines • ▼ Show 20 Line(s) | |||||
if ( ($event->Special == 'page') || $this->_isVirtual($event) || ($event->Prefix == 'st') ) { | if ( ($event->Special == 'page') || $this->_isVirtual($event) || ($event->Prefix == 'st') ) { | ||||
return $this->_getPassedStructureID($event); | return $this->_getPassedStructureID($event); | ||||
} | } | ||||
if ( $this->Application->isAdmin ) { | if ( $this->Application->isAdmin ) { | ||||
return parent::getPassedID($event); | return parent::getPassedID($event); | ||||
} | } | ||||
$event->setEventParam(kEvent::FLAG_ID_FROM_REQUEST, true); | |||||
return $this->Application->GetVar('m_cat_id'); | return $this->Application->GetVar('m_cat_id'); | ||||
} | } | ||||
/** | /** | ||||
* Enter description here... | * Enter description here... | ||||
* | * | ||||
* @param kEvent $event | * @param kEvent $event | ||||
* @return int | * @return int | ||||
*/ | */ | ||||
function _getPassedStructureID($event) | function _getPassedStructureID($event) | ||||
{ | { | ||||
static $page_by_template = Array (); | static $page_by_template = Array (); | ||||
if ( $event->Special == 'current' ) { | if ( $event->Special == 'current' ) { | ||||
$event->setEventParam(kEvent::FLAG_ID_FROM_REQUEST, true); | |||||
return $this->Application->GetVar('m_cat_id'); | return $this->Application->GetVar('m_cat_id'); | ||||
} | } | ||||
$event->setEventParam('raise_warnings', 0); | $event->setEventParam('raise_warnings', 0); | ||||
$page_id = parent::getPassedID($event); | $page_id = parent::getPassedID($event); | ||||
if ( $page_id === false ) { | if ( $page_id === false ) { | ||||
Show All 22 Lines | |||||
if ( $page_id ) { | if ( $page_id ) { | ||||
$page_by_template[$template] = $page_id; | $page_by_template[$template] = $page_id; | ||||
} | } | ||||
} | } | ||||
if ( !$page_id && !$this->Application->isAdmin ) { | if ( !$page_id && !$this->Application->isAdmin ) { | ||||
$page_id = $this->Application->GetVar('m_cat_id'); | $page_id = $this->Application->GetVar('m_cat_id'); | ||||
$event->setEventParam(kEvent::FLAG_ID_FROM_REQUEST, true); | |||||
} | } | ||||
return $page_id; | return $page_id; | ||||
} | } | ||||
function ParentGetPassedID($event) | function ParentGetPassedID($event) | ||||
{ | { | ||||
return parent::getPassedID($event); | return parent::getPassedID($event); | ||||
▲ Show 20 Lines • Show All 2478 Lines • Show Last 20 Lines |