diff --git a/extension/lite/doc/ext/view/objectlibs.lite.html.hook.php b/extension/lite/doc/ext/view/objectlibs.lite.html.hook.php index 1ac68e29da..6ebc48b5f7 100644 --- a/extension/lite/doc/ext/view/objectlibs.lite.html.hook.php +++ b/extension/lite/doc/ext/view/objectlibs.lite.html.hook.php @@ -10,7 +10,7 @@ $('#pageNav .btn-group #dropMenu .table-col .list-group a[href*="showFiles"]').r -deleted and $doc->version > 1 and common::hasPriv('doc', 'diff')):?> +deleted and $doc->version > 1 and common::hasPriv('doc', 'diff') and $config->edition != 'open'):?> $('#mainMenu .btn-toolbar > a[href*="bug"], a[href*="testtask"], a[href*="testcase"], a[href*="issue"], a[href*="risk"], a[href*="requirement"]').remove(); -config->edition != 'open'):?> -$('#mainMenu .btn-toolbar > a:first').attr('href', createLink('user', 'todocalendar', 'userID=id?>')); +config->edition != 'open' and common::hasPriv('user', 'todocalendar')):?> +$('#mainMenu .btn-toolbar > a:first[href*="todo"]').attr('href', createLink('user', 'todocalendar', 'userID=id?>')); diff --git a/module/doc/model.php b/module/doc/model.php index f9031c7f1b..ca179ac701 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -516,12 +516,15 @@ class docModel extends model /* When file change then version add one. */ $files = $this->loadModel('file')->getByObject('doc', $docID); $docFiles = array(); - foreach($files as $file) + if($docContent) { - $pathName = $this->file->getRealPathName($file->pathname); - $file->webPath = $this->file->webPath . $pathName; - $file->realPath = $this->file->savePath . $pathName; - if(strpos(",{$docContent->files},", ",{$file->id},") !== false) $docFiles[$file->id] = $file; + foreach($files as $file) + { + $pathName = $this->file->getRealPathName($file->pathname); + $file->webPath = $this->file->webPath . $pathName; + $file->realPath = $this->file->savePath . $pathName; + if(strpos(",{$docContent->files},", ",{$file->id},") !== false) $docFiles[$file->id] = $file; + } } /* Check file change. */ diff --git a/module/project/view/team.html.php b/module/project/view/team.html.php index 4e12136abe..6576b85d93 100644 --- a/module/project/view/team.html.php +++ b/module/project/view/team.html.php @@ -67,7 +67,7 @@