action_url && ! $object->notes_url) { return; } $links = array(); $linkText = '%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'); } } } ?> Foreign URLs