From dfc34f44bcb87444b5fc2c80a05e344647ced9db Mon Sep 17 00:00:00 2001 From: Chenjianyu Date: Tue, 29 Mar 2022 10:23:27 +0800 Subject: [PATCH 1/7] * Fix bug #18041, discard xuanxuan login actions from getDynamic. --- module/action/model.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/action/model.php b/module/action/model.php index f70bef05bf..e42123e86a 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -917,6 +917,7 @@ class actionModel extends model ->beginIF($docs and !$this->app->user->admin)->andWhere("IF(objectType != 'doc' || (objectType = 'doc' && (action = 'approved' || action = 'removed')), '1=1', objectID " . helper::dbIN($docs) . ")")->fi() ->beginIF($libs and !$this->app->user->admin)->andWhere("IF(objectType != 'doclib', '1=1', objectID " . helper::dbIN(array_keys($libs)) . ') ')->fi() ->beginIF($actionCondition)->andWhere("($actionCondition)")->fi() + ->andWhere('action')->notIN('disconnectxuanxuan,loginxuanxuan') ->orderBy($orderBy) ->page($pager) ->fetchAll(); From 4e8cab4b66a35a610821db776d088c3b99bc9594 Mon Sep 17 00:00:00 2001 From: qixinzhi Date: Tue, 29 Mar 2022 10:55:19 +0800 Subject: [PATCH 2/7] * hide zentao client tutorial menu, task# 17992. --- module/common/model.php | 2 +- module/common/view/header.html.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/module/common/model.php b/module/common/model.php index 8991412729..44d5d6c281 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -413,7 +413,7 @@ class commonModel extends model { if(!commonModel::isTutorialMode()) { - echo '
  • ' . html::a(helper::createLink('tutorial', 'start'), " " . $lang->tutorialAB, '', "class='iframe' data-class-name='modal-inverse' data-width='800' data-headerless='true' data-backdrop='true' data-keyboard='true'") . '
  • '; + echo '
  • ' . html::a(helper::createLink('tutorial', 'start'), " " . $lang->tutorialAB, '', "class='iframe' data-class-name='modal-inverse' data-width='800' data-headerless='true' data-backdrop='true' data-keyboard='true'") . '
  • '; } echo '
  • ' . html::a(helper::createLink('my', 'preference', '', '', true), " " . $lang->preference, '', "class='iframe' data-width='700'") . '
  • '; diff --git a/module/common/view/header.html.php b/module/common/view/header.html.php index c0e95a884d..00854ff965 100755 --- a/module/common/view/header.html.php +++ b/module/common/view/header.html.php @@ -48,6 +48,10 @@ include 'chosen.html.php';
    sso->redirect)) echo "class='ranzhiFixedTfootAction'";?> >
    From 670db9a3340e55f7fd3abc7eb86ec7aaef8d6144 Mon Sep 17 00:00:00 2001 From: Chenjianyu Date: Tue, 29 Mar 2022 14:38:14 +0800 Subject: [PATCH 3/7] * Fix bug #18299, remove download xxd button for the user who has no rights to download xxd. --- xuanxuan/extension/xuan/setting/ext/view/xuanxuan.html.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xuanxuan/extension/xuan/setting/ext/view/xuanxuan.html.php b/xuanxuan/extension/xuan/setting/ext/view/xuanxuan.html.php index b612a25dfc..c71cccd05b 100644 --- a/xuanxuan/extension/xuan/setting/ext/view/xuanxuan.html.php +++ b/xuanxuan/extension/xuan/setting/ext/view/xuanxuan.html.php @@ -136,7 +136,9 @@ goback, '', 'class="btn" style="min-width: 120px"');?> xuanxuan->turnon ? '' : 'disabled';?> - im->downloadXXD, 'hiddenwin', "class='btn btn-primary download download-package $disabled'");?> + im->downloadXXD, 'hiddenwin', "class='btn btn-primary download download-package $disabled'"); + }?> im->downloadConfig, 'hiddenwin', "class='btn btn-primary download $disabled'");?> im->changeSetting, '', "class='btn'");?> im->viewDebug, '', "class='btn viewDebug iframe' data-height=220");?> From d1b1cb38c5e6b559df37dda0e389ce1f3c85b1c8 Mon Sep 17 00:00:00 2001 From: Wenrui LI Date: Tue, 29 Mar 2022 16:10:28 +0800 Subject: [PATCH 4/7] * fix xuan header hook not loaded. --- module/common/view/header.lite.html.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/common/view/header.lite.html.php b/module/common/view/header.lite.html.php index 0f5771a23c..807b39b71c 100755 --- a/module/common/view/header.lite.html.php +++ b/module/common/view/header.lite.html.php @@ -77,6 +77,8 @@ if($this->config->vision == 'lite') $extHookFiles = glob($extHookRule); if($extHookFiles) foreach($extHookFiles as $extHookFile) include $extHookFile; } +$xuanExtFile = $extensionRoot . 'xuan/common/ext/view/header.xuanxuan.html.hook.php'; +if(file_exists($xuanExtFile)) include $xuanExtFile; ?> app->getViewType() == 'xhtml' ? 'allow-self-open' : '';?> From 7ecc17b836bb7801db2f11552d1fc42f00fed58e Mon Sep 17 00:00:00 2001 From: Wenrui LI Date: Fri, 1 Apr 2022 08:57:12 +0800 Subject: [PATCH 5/7] * format code. --- module/common/view/header.html.php | 2 +- xuanxuan/extension/xuan/setting/ext/view/xuanxuan.html.php | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/module/common/view/header.html.php b/module/common/view/header.html.php index 00854ff965..e294df8a85 100755 --- a/module/common/view/header.html.php +++ b/module/common/view/header.html.php @@ -50,7 +50,7 @@ include 'chosen.html.php'; adjustMenuWidth(); if(window.navigator.userAgent.indexOf('xuanxuan') > 0) { - $('li.user-tutorial').addClass('hide'); + $('li.user-tutorial').addClass('hide'); }
    sso->redirect)) echo "class='ranzhiFixedTfootAction'";?> > diff --git a/xuanxuan/extension/xuan/setting/ext/view/xuanxuan.html.php b/xuanxuan/extension/xuan/setting/ext/view/xuanxuan.html.php index c71cccd05b..af63fb354a 100644 --- a/xuanxuan/extension/xuan/setting/ext/view/xuanxuan.html.php +++ b/xuanxuan/extension/xuan/setting/ext/view/xuanxuan.html.php @@ -136,9 +136,7 @@ goback, '', 'class="btn" style="min-width: 120px"');?> xuanxuan->turnon ? '' : 'disabled';?> - im->downloadXXD, 'hiddenwin', "class='btn btn-primary download download-package $disabled'"); - }?> + im->downloadXXD, 'hiddenwin', "class='btn btn-primary download download-package $disabled'");?> im->downloadConfig, 'hiddenwin', "class='btn btn-primary download $disabled'");?> im->changeSetting, '', "class='btn'");?> im->viewDebug, '', "class='btn viewDebug iframe' data-height=220");?> From 0a843861bfed9034719dd908ad8ad04d4a7352a4 Mon Sep 17 00:00:00 2001 From: Wenrui LI Date: Fri, 1 Apr 2022 08:58:35 +0800 Subject: [PATCH 6/7] * fix case. --- module/action/model.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/module/action/model.php b/module/action/model.php index e42123e86a..df5f58b7ef 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -917,7 +917,7 @@ class actionModel extends model ->beginIF($docs and !$this->app->user->admin)->andWhere("IF(objectType != 'doc' || (objectType = 'doc' && (action = 'approved' || action = 'removed')), '1=1', objectID " . helper::dbIN($docs) . ")")->fi() ->beginIF($libs and !$this->app->user->admin)->andWhere("IF(objectType != 'doclib', '1=1', objectID " . helper::dbIN(array_keys($libs)) . ') ')->fi() ->beginIF($actionCondition)->andWhere("($actionCondition)")->fi() - ->andWhere('action')->notIN('disconnectxuanxuan,loginxuanxuan') + ->andWhere('action')->notin('disconnectxuanxuan,loginxuanxuan') ->orderBy($orderBy) ->page($pager) ->fetchAll(); @@ -1009,13 +1009,13 @@ class actionModel extends model $actionQuery = str_replace("`product` = '$productID'", "`product` LIKE '%,$productID,%'", $actionQuery); if($date) $actionQuery = "($actionQuery) AND " . ('date' . ($direction == 'next' ? '<' : '>') . "'{$date}'"); - + /* If this vision is lite, delete product actions. */ if($this->config->vision == 'lite') $actionQuery .= " AND objectType != 'product'"; - + $actionQuery .= " AND vision = '" . $this->config->vision . "'"; $actions = $this->getBySQL($actionQuery, $orderBy, $pager); - + $this->loadModel('common')->saveQueryCondition($this->dao->get(), 'action'); if(!$actions) return array(); return $this->transformActions($actions); From c96c0140a525a4a21af4a082e4d1c88f9ff2c93d Mon Sep 17 00:00:00 2001 From: Wenrui LI Date: Fri, 1 Apr 2022 08:59:44 +0800 Subject: [PATCH 7/7] * add comment. --- module/action/model.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/action/model.php b/module/action/model.php index df5f58b7ef..40c55ee22d 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -917,6 +917,7 @@ class actionModel extends model ->beginIF($docs and !$this->app->user->admin)->andWhere("IF(objectType != 'doc' || (objectType = 'doc' && (action = 'approved' || action = 'removed')), '1=1', objectID " . helper::dbIN($docs) . ")")->fi() ->beginIF($libs and !$this->app->user->admin)->andWhere("IF(objectType != 'doclib', '1=1', objectID " . helper::dbIN(array_keys($libs)) . ') ')->fi() ->beginIF($actionCondition)->andWhere("($actionCondition)")->fi() + /* Filter out client login/logout actions. */ ->andWhere('action')->notin('disconnectxuanxuan,loginxuanxuan') ->orderBy($orderBy) ->page($pager)