This commit is contained in:
hufangzhou
2022-04-02 14:57:33 +08:00
parent f9961cfa52
commit 9ff0537cda
2 changed files with 26 additions and 16 deletions
+25 -15
View File
@@ -1046,27 +1046,37 @@ class doc extends control
}
}
$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;
}
$this->view->customObjectLibs = $customObjectLibs;
$this->view->showLibs = $this->config->doc->custom->objectLibs;
$this->view->title = ($type == 'book' or $type == 'custom') ? $this->lang->doc->customAB : $object->name;
$this->view->position[] = ($type == 'book' or $type == 'custom') ? $this->lang->doc->customAB : $object->name;
$this->view->docID = $docID;
$this->view->doc = $docID ? $doc : '';
$this->view->type = $type;
$this->view->version = $version;
$this->view->object = $object;
$this->view->objectID = $objectID;
$this->view->objectType = $type;
$this->view->libID = $libID;
$this->view->lib = isset($libs[$libID]) ? $libs[$libID] : new stdclass();
$this->view->libs = $this->doc->getLibsByObject($type, $objectID);
$this->view->moduleTree = $moduleTree;
$this->view->canBeChanged = common::canModify($type, $object); // Determines whether an object is editable.
$this->view->actions = $docID ? $this->action->getList('doc', $docID) : array();
$this->view->users = $this->user->getPairs('noclosed,noletter');
$this->view->preAndNext = $this->doc->getPreAndNextDoc($docID, $libID);
$this->view->docID = $docID;
$this->view->doc = $docID ? $doc : '';
$this->view->type = $type;
$this->view->version = $version;
$this->view->object = $object;
$this->view->objectID = $objectID;
$this->view->objectType = $type;
$this->view->libID = $libID;
$this->view->lib = isset($libs[$libID]) ? $libs[$libID] : new stdclass();
$this->view->libs = $this->doc->getLibsByObject($type, $objectID);
$this->view->moduleTree = $moduleTree;
$this->view->canBeChanged = common::canModify($type, $object); // Determines whether an object is editable.
$this->view->actions = $docID ? $this->action->getList('doc', $docID) : array();
$this->view->users = $this->user->getPairs('noclosed,noletter');
$this->view->preAndNext = $this->doc->getPreAndNextDoc($docID, $libID);
$this->view->showPageDetails = $showPageDetails;
$this->display();
}