Skip to content

Commit

Permalink
sitelink fix for related object visibility - 10459
Browse files Browse the repository at this point in the history
  • Loading branch information
root authored and root committed Dec 6, 2011
1 parent af19caf commit 07cda1f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions classes/sitelink.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,10 @@ function debug($message, $label, $level=eZDebug::LEVEL_DEBUG){

function findObjectNode($object){
if(get_class($object)=='eZContentObject'){
foreach($object->assignedNodes() as $node){
if(in_array($this->rootNodeID,$node->pathArray())){return $node;}
$assigned_nodes = $object->assignedNodes();
array_unshift($assigned_nodes, $object->mainNode());
foreach($loopme as $node){
if($node->hiddenStatusString() != "Hidden" && in_array($this->rootNodeID,$node->pathArray())){return $node;}
}
return $object->mainNode();
}
Expand Down
2 changes: 1 addition & 1 deletion operators/sitelinkoperator.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ static function sitelink(&$operatorValue, &$namedParameters){
$HostMatchMapItems=SiteLink::hostMatchMapItems($SiteLink);
//match domain from current siteaccess if no server vars exist, ie if this is run from script
if (!$SiteLink->currentHost && $GLOBALS['eZCurrentAccess']) {
$SiteLink->currentHost = $HostMatchMapItems[$GLOBALS['eZCurrentAccess'][name]];
$SiteLink->currentHost = $HostMatchMapItems[$GLOBALS['eZCurrentAccess']["name"]];
}
$PathArray = $SiteLink->objectNode->pathArray();
foreach($HostMatchMapItems as $Name=>$Host){
Expand Down

0 comments on commit 07cda1f

Please sign in to comment.