* Fix bug #17362.
This commit is contained in:
+25
-15
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user