* Fix bug#11896.
This commit is contained in:
+32
-18
@@ -78,6 +78,8 @@ class doc extends control
|
||||
*/
|
||||
public function browse($libID = 0, $browseType = 'all', $param = 0, $orderBy = 'id_desc', $from = 'doc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$this->session->set('docList', $this->app->getURI(true), 'doc');
|
||||
|
||||
$this->from = $from;
|
||||
setcookie('from', $from, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, true);
|
||||
|
||||
@@ -116,7 +118,6 @@ class doc extends control
|
||||
{
|
||||
$menuType = (!$type && (in_array($browseType, array_keys($this->lang->doc->fastMenuList)) || $browseType == 'bysearch')) ? $browseType : $type;
|
||||
}
|
||||
$this->session->set('docList', $this->app->getURI(true), 'doc');
|
||||
|
||||
/* Set header and position. */
|
||||
$this->view->title = $this->lang->doc->common . ($libID ? $this->lang->colon . $this->libs[$libID] : '');
|
||||
@@ -302,7 +303,16 @@ class doc extends control
|
||||
unset($_GET['onlybody']);
|
||||
die(js::locate($this->createLink('doc', 'objectLibs', 'type=book'), 'parent.parent'));
|
||||
}
|
||||
die(js::locate($this->createLink('doc', 'index'), 'parent'));
|
||||
|
||||
$browseLink = $this->createLink('doc', 'index');
|
||||
if(in_array($this->app->openApp, array('product', 'project', 'execution')))
|
||||
{
|
||||
$objectType = $lib->type;
|
||||
$objectID = $lib->{$objectType};
|
||||
$browseLink = $this->createLink('doc', 'objectLibs', "type=$objectType&objectID=$objectID");
|
||||
}
|
||||
|
||||
die(js::locate($browseLink, 'parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -429,19 +439,18 @@ class doc extends control
|
||||
if(!empty($changes)) $this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
|
||||
if($objectType)
|
||||
$link = $this->session->docList ? $this->session->docList : $this->createLink('doc', 'index');
|
||||
if(!empty($objectType) and $objectType != 'doc')
|
||||
{
|
||||
$link = $this->createLink('doc', 'objectLibs', "type=$objectType&objectID=$objectID&libID=$libID&docID=$docID");
|
||||
}
|
||||
else
|
||||
{
|
||||
$link = $this->createLink('doc', 'view', "docID=$docID");
|
||||
}
|
||||
|
||||
if(isonlybody()) $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $link));
|
||||
}
|
||||
|
||||
/* Get doc and set menu. */
|
||||
$doc = $this->doc->getById($docID);
|
||||
$doc = $this->doc->getById($docID);
|
||||
$libID = $doc->lib;
|
||||
|
||||
if($doc->contentType == 'markdown') $this->config->doc->markdown->edit = array('id' => 'content', 'tools' => 'toolbar');
|
||||
@@ -449,28 +458,33 @@ class doc extends control
|
||||
$lib = $this->doc->getLibByID($libID);
|
||||
$type = $lib->type;
|
||||
|
||||
/* According the from, set menus. */
|
||||
if($this->from == 'product')
|
||||
/* set menus. */
|
||||
if($this->app->openApp == 'product')
|
||||
{
|
||||
$this->product->setMenu($lib->product);
|
||||
$this->product->setMenu($objectID);
|
||||
unset($this->lang->product->menu->doc['subMenu']);
|
||||
}
|
||||
elseif($this->from == 'project')
|
||||
else if($this->app->openApp == 'project')
|
||||
{
|
||||
$this->project->setMenu($lib->project);
|
||||
$this->project->setMenu($objectID);
|
||||
unset($this->lang->project->menu->doc['subMenu']);
|
||||
}
|
||||
else
|
||||
else if($this->app->openApp == 'execution')
|
||||
{
|
||||
$this->app->rawMethod = $objectType;
|
||||
$this->execution->setMenu($objectID);
|
||||
unset($this->lang->execution->menu->doc['subMenu']);
|
||||
}
|
||||
|
||||
/* Set my menu. */
|
||||
if($this->app->openApp == 'my')
|
||||
else if($this->app->openApp == 'my')
|
||||
{
|
||||
$this->lang->doc->menu = $this->lang->my->menu->contribute;
|
||||
$this->lang->modulePageNav = '';
|
||||
$this->lang->TRActions = '';
|
||||
$this->lang->my->menu->contribute['subModule'] = 'doc';
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->app->rawMethod = $objectType;
|
||||
}
|
||||
|
||||
$this->view->title = $lib->name . $this->lang->colon . $this->lang->doc->edit;
|
||||
$this->view->position[] = html::a($this->createLink('doc', 'browse', "libID=$libID"), $lib->name);
|
||||
|
||||
@@ -183,13 +183,15 @@ $lang->doc->noOpenedDoc = 'Sie haben kein Dokument erstellt.';
|
||||
$lang->doc->noCollectedDoc = 'Sie haben kein Dokument gesammelt.';
|
||||
$lang->doc->errorEmptyLib = 'No data in document library.';
|
||||
|
||||
$lang->doc->noticeAcl['lib']['product']['default'] = 'Users who can access the selected product can access it.';
|
||||
$lang->doc->noticeAcl['lib']['product']['custom'] = 'Users who can access the selected product or users in the whiltelist can access it.';
|
||||
$lang->doc->noticeAcl['lib']['project']['default'] = 'Users who can access the selected project can access it.';
|
||||
$lang->doc->noticeAcl['lib']['project']['custom'] = 'Users who can access the selected project or users in the whiltelist can access it.';
|
||||
$lang->doc->noticeAcl['lib']['custom']['open'] = 'All users can access it.';
|
||||
$lang->doc->noticeAcl['lib']['custom']['custom'] = 'Users in the whitelist can access it.';
|
||||
$lang->doc->noticeAcl['lib']['custom']['private'] = 'Only the one who created it can access it.';
|
||||
$lang->doc->noticeAcl['lib']['product']['default'] = 'Users who can access the selected product can access it.';
|
||||
$lang->doc->noticeAcl['lib']['product']['custom'] = 'Users who can access the selected product or users in the whiltelist can access it.';
|
||||
$lang->doc->noticeAcl['lib']['project']['default'] = 'Users who can access the selected project can access it.';
|
||||
$lang->doc->noticeAcl['lib']['project']['custom'] = 'Users who can access the selected project or users in the whiltelist can access it.';
|
||||
$lang->doc->noticeAcl['lib']['execution']['default'] = "Users who can access the selected {$lang->executionCommon} can access it.";
|
||||
$lang->doc->noticeAcl['lib']['execution']['custom'] = "Users who can access the selected {$lang->executionCommon} or users in the whiltelist can access it.";
|
||||
$lang->doc->noticeAcl['lib']['custom']['open'] = 'All users can access it.';
|
||||
$lang->doc->noticeAcl['lib']['custom']['custom'] = 'Users in the whitelist can access it.';
|
||||
$lang->doc->noticeAcl['lib']['custom']['private'] = 'Only the one who created it can access it.';
|
||||
|
||||
$lang->doc->noticeAcl['doc']['open'] = 'Users who can access the document library which the document belongs can access it.';
|
||||
$lang->doc->noticeAcl['doc']['custom'] = 'Users in the whiltelist can access it.';
|
||||
|
||||
@@ -187,13 +187,15 @@ $lang->doc->noOpenedDoc = 'You have not created any documents.';
|
||||
$lang->doc->noCollectedDoc = 'You have not favorited any documents.';
|
||||
$lang->doc->errorEmptyLib = 'No data in document library.';
|
||||
|
||||
$lang->doc->noticeAcl['lib']['product']['default'] = 'Users who can access the selected product can access it.';
|
||||
$lang->doc->noticeAcl['lib']['product']['custom'] = 'Users who can access the selected product or users in the whiltelist can access it.';
|
||||
$lang->doc->noticeAcl['lib']['project']['default'] = 'Users who can access the selected project can access it.';
|
||||
$lang->doc->noticeAcl['lib']['project']['custom'] = 'Users who can access the selected project or users in the whiltelist can access it.';
|
||||
$lang->doc->noticeAcl['lib']['custom']['open'] = 'All users can access it.';
|
||||
$lang->doc->noticeAcl['lib']['custom']['custom'] = 'Users in the whitelist can access it.';
|
||||
$lang->doc->noticeAcl['lib']['custom']['private'] = 'Only the one who created it can access it.';
|
||||
$lang->doc->noticeAcl['lib']['product']['default'] = 'Users who can access the selected product can access it.';
|
||||
$lang->doc->noticeAcl['lib']['product']['custom'] = 'Users who can access the selected product or users in the whiltelist can access it.';
|
||||
$lang->doc->noticeAcl['lib']['project']['default'] = 'Users who can access the selected project can access it.';
|
||||
$lang->doc->noticeAcl['lib']['project']['custom'] = 'Users who can access the selected project or users in the whiltelist can access it.';
|
||||
$lang->doc->noticeAcl['lib']['execution']['default'] = "Users who can access the selected {$lang->executionCommon} can access it.";
|
||||
$lang->doc->noticeAcl['lib']['execution']['custom'] = "Users who can access the selected {$lang->executionCommon} or users in the whiltelist can access it.";
|
||||
$lang->doc->noticeAcl['lib']['custom']['open'] = 'All users can access it.';
|
||||
$lang->doc->noticeAcl['lib']['custom']['custom'] = 'Users in the whitelist can access it.';
|
||||
$lang->doc->noticeAcl['lib']['custom']['private'] = 'Only the one who created it can access it.';
|
||||
|
||||
$lang->doc->noticeAcl['doc']['open'] = 'Users who can access the document library which the document belongs can access it.';
|
||||
$lang->doc->noticeAcl['doc']['custom'] = 'Users in the whiltelist can access it.';
|
||||
|
||||
@@ -183,13 +183,15 @@ $lang->doc->noOpenedDoc = "Vous n'avez pas ajouté de documents.";
|
||||
$lang->doc->noCollectedDoc = "Vous avez aucun document dans vos favoris.";
|
||||
$lang->doc->errorEmptyLib = 'No data in document library.';
|
||||
|
||||
$lang->doc->noticeAcl['lib']['product']['default'] = 'Les utilisateurs qui ont accès au Product peuvent y accéder.';
|
||||
$lang->doc->noticeAcl['lib']['product']['custom'] = 'Les utilisateurs qui ont accès au Product ou les utilisateurs de la Liste Blanche peuvent y accéder.';
|
||||
$lang->doc->noticeAcl['lib']['project']['default'] = 'Les utilisateurs qui ont accès au Projet peuvent y accéder.';
|
||||
$lang->doc->noticeAcl['lib']['project']['custom'] = 'Les utilisateurs qui ont accès au Projet ou les utilisateurs de la Liste Blanche peuvent y accéder.';
|
||||
$lang->doc->noticeAcl['lib']['custom']['open'] = 'Tous les utilisateurs peuvent y accéder.';
|
||||
$lang->doc->noticeAcl['lib']['custom']['custom'] = 'Les utilisateurs de la Liste Blanche peuvent y accéder.';
|
||||
$lang->doc->noticeAcl['lib']['custom']['private'] = 'Seulement le créateur de la Bibliothèque peut y accéder.';
|
||||
$lang->doc->noticeAcl['lib']['product']['default'] = 'Les utilisateurs qui ont accès au Product peuvent y accéder.';
|
||||
$lang->doc->noticeAcl['lib']['product']['custom'] = 'Les utilisateurs qui ont accès au Product ou les utilisateurs de la Liste Blanche peuvent y accéder.';
|
||||
$lang->doc->noticeAcl['lib']['project']['default'] = 'Les utilisateurs qui ont accès au Projet peuvent y accéder.';
|
||||
$lang->doc->noticeAcl['lib']['project']['custom'] = 'Les utilisateurs qui ont accès au Projet ou les utilisateurs de la Liste Blanche peuvent y accéder.';
|
||||
$lang->doc->noticeAcl['lib']['execution']['default'] = "Les utilisateurs qui ont accès au {$lang->executionCommon} peuvent y accéder.";
|
||||
$lang->doc->noticeAcl['lib']['execution']['custom'] = "Les utilisateurs qui ont accès au {$lang->executionCommon} ou les utilisateurs de la Liste Blanche peuvent y accéder.";
|
||||
$lang->doc->noticeAcl['lib']['custom']['open'] = 'Tous les utilisateurs peuvent y accéder.';
|
||||
$lang->doc->noticeAcl['lib']['custom']['custom'] = 'Les utilisateurs de la Liste Blanche peuvent y accéder.';
|
||||
$lang->doc->noticeAcl['lib']['custom']['private'] = 'Seulement le créateur de la Bibliothèque peut y accéder.';
|
||||
|
||||
$lang->doc->noticeAcl['doc']['open'] = 'Les utilisateurs qui ont accès à la Bibliothèque à laquelle le document appartient peuvent y accéder.';
|
||||
$lang->doc->noticeAcl['doc']['custom'] = 'Les utilisateurs de la Liste Blanche peuvent y accéder.';
|
||||
|
||||
@@ -185,8 +185,10 @@ $lang->doc->errorEmptyLib = 'No data in document library.';
|
||||
|
||||
$lang->doc->noticeAcl['lib']['product']['default'] = 'Users who can access the selected product có thể truy cập nó.';
|
||||
$lang->doc->noticeAcl['lib']['product']['custom'] = 'Users who can access the selected product or users in the whiltelist có thể truy cập nó.';
|
||||
$lang->doc->noticeAcl['lib']['project']['default'] = 'Users who can access the selected project có thể truy cập nó.';
|
||||
$lang->doc->noticeAcl['lib']['project']['custom'] = 'Users who can access the selected project or users in the whiltelist có thể truy cập nó.';
|
||||
$lang->doc->noticeAcl['lib']['project']['default'] = 'Users who can access the selected project có thể truy cập nó.';
|
||||
$lang->doc->noticeAcl['lib']['project']['custom'] = 'Users who can access the selected project or users in the whiltelist có thể truy cập nó.';
|
||||
$lang->doc->noticeAcl['lib']['execution']['default'] = "Users who can access the selected {$lang->executionCommon} có thể truy cập nó.";
|
||||
$lang->doc->noticeAcl['lib']['execution']['custom'] = "Users who can access the selected {$lang->executionCommon} or users in the whiltelist có thể truy cập nó.";
|
||||
$lang->doc->noticeAcl['lib']['custom']['open'] = 'Tất cả users có thể truy cập nó.';
|
||||
$lang->doc->noticeAcl['lib']['custom']['custom'] = 'Users in the whitelist có thể truy cập nó.';
|
||||
$lang->doc->noticeAcl['lib']['custom']['private'] = 'Chỉ the one who created it có thể truy cập nó.';
|
||||
|
||||
@@ -187,13 +187,15 @@ $lang->doc->noOpenedDoc = '您还没有创建任何文档。';
|
||||
$lang->doc->noCollectedDoc = '您还没有收藏任何文档。';
|
||||
$lang->doc->errorEmptyLib = '文档库暂无数据。';
|
||||
|
||||
$lang->doc->noticeAcl['lib']['product']['default'] = '有所选产品访问权限的用户可以访问。';
|
||||
$lang->doc->noticeAcl['lib']['product']['custom'] = '有所选产品访问权限或白名单里的用户可以访问。';
|
||||
$lang->doc->noticeAcl['lib']['project']['default'] = "有所选项目访问权限的用户可以访问。";
|
||||
$lang->doc->noticeAcl['lib']['project']['custom'] = "有所选项目访问权限或白名单里的用户可以访问。";
|
||||
$lang->doc->noticeAcl['lib']['custom']['open'] = '所有人都可以访问。';
|
||||
$lang->doc->noticeAcl['lib']['custom']['custom'] = '白名单的用户可以访问。';
|
||||
$lang->doc->noticeAcl['lib']['custom']['private'] = '只有创建者自己可以访问。';
|
||||
$lang->doc->noticeAcl['lib']['product']['default'] = '有所选产品访问权限的用户可以访问。';
|
||||
$lang->doc->noticeAcl['lib']['product']['custom'] = '有所选产品访问权限或白名单里的用户可以访问。';
|
||||
$lang->doc->noticeAcl['lib']['project']['default'] = "有所选项目访问权限的用户可以访问。";
|
||||
$lang->doc->noticeAcl['lib']['project']['custom'] = "有所选项目访问权限或白名单里的用户可以访问。";
|
||||
$lang->doc->noticeAcl['lib']['execution']['default'] = "有所选{$lang->executionCommon}访问权限的用户可以访问。";
|
||||
$lang->doc->noticeAcl['lib']['execution']['custom'] = "有所选{$lang->executionCommon}访问权限或白名单里的用户可以访问。";
|
||||
$lang->doc->noticeAcl['lib']['custom']['open'] = '所有人都可以访问。';
|
||||
$lang->doc->noticeAcl['lib']['custom']['custom'] = '白名单的用户可以访问。';
|
||||
$lang->doc->noticeAcl['lib']['custom']['private'] = '只有创建者自己可以访问。';
|
||||
|
||||
$lang->doc->noticeAcl['doc']['open'] = '有文档所属文档库访问权限的,都可以访问。';
|
||||
$lang->doc->noticeAcl['doc']['custom'] = '白名单的用户可以访问。';
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</div>
|
||||
<div class="actions">
|
||||
<?php
|
||||
if(common::hasPriv('doc', 'edit')) echo html::a(inlink('edit', "docID=$doc->id&comment=false&objectType=$objectType&objectID=$object->id&libID=$libID"), '<i class="icon-edit"></i>', '', "title='{$lang->doc->edit}' class='btn btn-link'");
|
||||
if(common::hasPriv('doc', 'edit')) echo html::a(inlink('edit', "docID=$doc->id&comment=false&objectType=$objectType&objectID=$object->id&libID=$libID"), '<i class="icon-edit"></i>', '', "title='{$lang->doc->edit}' class='btn btn-link' data-app='{$this->app->openApp}'");
|
||||
if(common::hasPriv('doc', 'delete'))
|
||||
{
|
||||
$deleteURL = $this->createLink('doc', 'delete', "docID=$doc->id&confirm=yes&from=lib");
|
||||
|
||||
Reference in New Issue
Block a user