%s ', $this->translate('opens in new window')); $linkText = '%s ' . $newTabInfo . ''; $localLinkText = '%s'; if ($object->notes_url) { if (strpos($object->notes_url, "' ") === false) { $links[] = sprintf($linkText, $this->resolveMacros($object->notes_url, $object), 'Notes'); } else { // TODO: We should find out document what's going on here. Looks strange :p foreach(explode("' ", $object->notes_url) as $url) { $url = strpos($url, "'") === 0 ? substr($url, 1) : $url; $url = strrpos($url, "'") === strlen($url) - 1 ? substr($url, 0, strlen($url) - 1) : $url; $links[] = sprintf($linkText, $this->resolveMacros($url, $object), 'Notes'); } } } if ($object->action_url) { if (strpos($object->action_url, "' ") === false) { $links[] = sprintf($linkText, $this->resolveMacros($object->action_url, $object), 'Action'); } else { // TODO: We should find out document what's going on here. Looks strange :p foreach(explode("' ", $object->action_url) as $url) { $url = strpos($url, "'") === 0 ? substr($url, 1) : $url; $url = strrpos($url, "'") === strlen($url) - 1 ? substr($url, 0, strlen($url) - 1) : $url; $links[] = sprintf($linkText, $this->resolveMacros($url, $object), 'Action'); } } } if (isset($this->hostActions)) { foreach ($this->hostActions as $id => $action) { $links[] = sprintf($localLinkText, $action, $id); } } if (empty($links)) { return; } ?> translate('Actions') ?>