Merge branch 'sprint/fixbug_hufangzhou_17362' into 'master'

* Fix bug #17362.

See merge request easycorp/zentaopms!2740
This commit is contained in:
王怡栋
2022-04-02 08:05:56 +00:00
4 changed files with 34 additions and 11 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 autoloaded.
*
* @param object $doc
* @access public
* @return bool
*/
public function checkAutoloadPage($doc)
{
$autoloadPage = 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']) $autoloadPage = false;
}
return $autoloadPage;
}
}