Ejemplo n.º 1
0
$Offset = $Params['Offset'];
if (!is_numeric($Offset)) {
    $Offset = 0;
}
$parents = array();
// Make sure user has session (if not, then this can't possible be a valid browse request)
if (!eZSession::userHasSessionCookie()) {
    return $Module->handleError(eZError::KERNEL_ACCESS_DENIED, 'kernel');
}
// Check that Browse parameters exists
if (!$http->hasSessionVariable('BrowseParameters')) {
    return $Module->handleError(eZError::KERNEL_NOT_FOUND, 'kernel');
}
// Check if node parameters exist
$browse = new eZContentBrowse();
if (!isset($Params['NodeID']) && !isset($Params['NodeList']) && !$browse->hasAttribute('start_node')) {
    return $Module->handleError(eZError::KERNEL_NOT_FOUND, 'kernel');
}
// We get node list when browse is execiuted from search engine ( "search in browse" functionality )
if (isset($Params['NodeList'])) {
    $nodeList = $Params['NodeList']['SearchResult'];
    $nodeListCount = $Params['NodeList']['SearchCount'];
    $requestedURI = $Params['NodeList']['RequestedURI'];
    $requestedURISuffix = $Params['NodeList']['RequestedURISuffix'];
    if (isset($Params['NodeID']) && is_numeric($Params['NodeID'])) {
        $NodeID = $Params['NodeID'];
    }
} else {
    if (isset($Params['NodeID']) && is_numeric($Params['NodeID'])) {
        $NodeID = $Params['NodeID'];
        $browse->setStartNode($NodeID);