static function hasObjectLinkList($urlID) { return eZURLObjectLink::fetchObjectVersionCount($urlID) > 0; }
} $link = $url->attribute('url'); if (preg_match("/^(http:)/i", $link) or preg_match("/^(ftp:)/i", $link) or preg_match("/^(https:)/i", $link) or preg_match("/^(file:)/i", $link) or preg_match("/^(mailto:)/i", $link)) { // No changes } else { $domain = getenv('HTTP_HOST'); $protocol = eZSys::serverProtocol(); $preFix = $protocol . "://" . $domain; $preFix .= eZSys::wwwDir(); $link = preg_replace("/^\\//e", "", $link); $link = $preFix . "/" . $link; } $viewParameters = array('offset' => $offset, 'limit' => $limit); $http = eZHTTPTool::instance(); $objectList = eZURLObjectLink::fetchObjectVersionList($urlID, $viewParameters); $urlViewCount = eZURLObjectLink::fetchObjectVersionCount($urlID); if ($Module->isCurrentAction('EditObject')) { if ($http->hasPostVariable('ObjectList')) { $versionID = $http->postVariable('ObjectList'); $version = eZContentObjectVersion::fetch($versionID); $contentObjectID = $version->attribute('contentobject_id'); $versionNr = $version->attribute('version'); $Module->redirect('content', 'edit', array($contentObjectID, $versionNr)); } } $tpl = eZTemplate::factory(); $tpl->setVariable('Module', $Module); $tpl->setVariable('url_object', $url); $tpl->setVariable('full_url', $link); $tpl->setVariable('object_list', $objectList); $tpl->setVariable('view_parameters', $viewParameters);