* [task#145540,done,0.2h,0h] Fix execution template create doclib error.
This commit is contained in:
@@ -289,6 +289,7 @@ class doc extends control
|
||||
public function createLib(string $type = '', int $objectID = 0, int $libID = 0)
|
||||
{
|
||||
$this->app->loadLang('api');
|
||||
$this->doc->setMenuByType($type, (int)$objectID, (int)$libID);
|
||||
|
||||
if(!empty($_POST))
|
||||
{
|
||||
@@ -319,6 +320,7 @@ class doc extends control
|
||||
$objects = $this->execution->getPairs(0, 'all', 'multiple,leaf,noprefix,withobject');
|
||||
$execution = $this->execution->getByID($objectID);
|
||||
if($execution->type == 'stage') $this->lang->doc->execution = str_replace($this->lang->executionCommon, $this->lang->project->stage, $this->lang->doc->execution);
|
||||
$this->view->execution = $this->doc->fetchByID($objectID, 'execution');
|
||||
}
|
||||
|
||||
if($type == 'custom' || $type == 'mine' || $type == 'doctemplate')
|
||||
|
||||
@@ -26,7 +26,7 @@ if($type === 'project')
|
||||
* Define the privs of doc app.
|
||||
*/
|
||||
$hasCustomSpace = $type == 'mine' || $type == 'custom';
|
||||
$projectTemplate = $type === 'project' && !empty($project->isTpl);
|
||||
$projectTemplate = ($type === 'project' && !empty($project->isTpl)) || ($type == 'execution' && !empty($execution->isTpl));
|
||||
$privs = array();
|
||||
$privs['create'] = hasPriv('doc', 'create') && !$projectTemplate;
|
||||
$privs['edit'] = hasPriv('doc', 'edit') && !$projectTemplate;
|
||||
|
||||
Reference in New Issue
Block a user