* Packaging method.

This commit is contained in:
hufangzhou
2022-04-02 15:58:22 +08:00
parent c155d3aa96
commit 8cd3b4eb9f
2 changed files with 24 additions and 21 deletions
+21
View File
@@ -2651,4 +2651,25 @@ EOT;
return array($libs, $libID, $object, $objectID);
}
/**
* Whether the url of link type documents needs to be displayed.
*
* @param object $doc
* @access public
* @return bool
*/
public function checkShowPageDetails($doc)
{
$showPageDetails = true;
if(!empty($doc) and $doc->type == 'url')
{
$parsedUrl = parse_url($doc->content);
$urlPort = isset($parsedUrl['port']) ? ':' . $parsedUrl['port'] : '';
$urlDomain = $parsedUrl['host'] . $urlPort;
if($urlDomain == $_SERVER['HTTP_HOST']) $showPageDetails = false;
}
return $showPageDetails;
}
}