* Change judgment condition.

This commit is contained in:
Yagami
2023-05-04 18:57:45 +08:00
parent c4c20cae54
commit 5935f603f4
29 changed files with 84 additions and 84 deletions
+3 -3
View File
@@ -1912,7 +1912,7 @@ class docModel extends model
}
elseif($type == 'project')
{
if($this->config->edition== 'max' or $this->config->edition == 'ipd')
if($this->config->edition == 'max' or $this->config->edition == 'ipd')
{
$issueIdList = $this->dao->select('id')->from(TABLE_ISSUE)->where('project')->eq($objectID)->andWhere('deleted')->eq('0')->andWhere('project')->in($this->app->user->view->projects)->get();
$meetingIdList = $this->dao->select('id')->from(TABLE_MEETING)->where('project')->eq($objectID)->andWhere('deleted')->eq('0')->andWhere('project')->in($this->app->user->view->projects)->get();
@@ -3238,7 +3238,7 @@ class docModel extends model
if(!common::hasPriv('doc', 'create') or !isset($lib->id)) return null;
$objectID = zget($lib, $lib->type, 0);
$templateParam = $this->config->edition == 'max' ? '&from=template' : '';
$templateParam = ($this->config->edition == 'max' or $this->config->edition == 'ipd') ? '&from=template' : '';
$class = $from == 'list' ? 'btn-info' : 'btn-primary';
$html = "<div class='dropdown btn-group createDropdown'>";
$html .= html::a(helper::createLink('doc', 'create', "objectType={$lib->type}&objectID=$objectID&libID={$lib->id}&moduleID=$moduleID&type=html$templateParam"), "<i class='icon icon-plus'></i> {$this->lang->doc->create}", '', "class='btn $class' data-app='{$this->app->tab}'");
@@ -3252,7 +3252,7 @@ class docModel extends model
$attr = "data-app='{$this->app->tab}'";
$class = strpos($this->config->doc->officeTypes, $typeKey) !== false ? 'iframe' : '';
$params = "objectType={$lib->type}&objectID=$objectID&libID={$lib->id}&moduleID=$moduleID&type=$typeKey";
if($typeKey == 'template' and $this->config->edition == 'max') $params = "objectType={$lib->type}&objectID=$objectID&libID={$lib->id}&moduleID=$moduleID&type=html&from=template";
if($typeKey == 'template' and ($this->config->edition == 'max' or $this->config->edition == 'ipd')) $params = "objectType={$lib->type}&objectID=$objectID&libID={$lib->id}&moduleID=$moduleID&type=html&from=template";
$html .= "<li>";
$html .= html::a(helper::createLink('doc', 'create', $params, '', $class ? true : false), $icon . ' ' . $typeName, '', "class='$class' $attr");