diff --git a/db/update18.3.sql b/db/update18.3.sql
index 661e964dff..cf9c51a501 100644
--- a/db/update18.3.sql
+++ b/db/update18.3.sql
@@ -274,6 +274,9 @@ SELECT t1.`group`, t1.`module`, 'myCollection' FROM `zt_grouppriv` AS t1 WHERE t
INSERT IGNORE INTO `zt_grouppriv` (`group`, `module`, `method`)
SELECT t1.`group`, t1.`module`, 'myCreation' FROM `zt_grouppriv` AS t1 WHERE t1.`module` = 'doc' AND t1.`method` = 'browse';
+INSERT IGNORE INTO `zt_grouppriv` (`group`, `module`, `method`)
+SELECT t1.`group`, t1.`module`, 'myEdited' FROM `zt_grouppriv` AS t1 WHERE t1.`module` = 'doc' AND t1.`method` = 'browse';
+
INSERT IGNORE INTO `zt_grouppriv` (`group`, `module`, `method`)
SELECT t1.`group`, t1.`module`, 'productSpace' FROM `zt_grouppriv` AS t1 WHERE t1.`module` = 'doc' AND t1.`method` = 'tableContents';
@@ -484,6 +487,10 @@ ALTER TABLE `zt_entry`
CHANGE `editedBy` `editedBy` varchar(30) NOT NULL DEFAULT '',
CHANGE `editedDate` `editedDate` datetime NULL;
+ALTER TABLE `zt_extension`
+CHANGE `dirs` `dirs` mediumtext NULL,
+CHANGE `files` `files` mediumtext NULL;
+
ALTER TABLE `zt_feedback`
CHANGE `reviewedBy` `reviewedBy` varchar(255) NOT NULL DEFAULT '',
CHANGE `reviewedDate` `reviewedDate` datetime NULL,
diff --git a/db/zentao.sql b/db/zentao.sql
index 11cc19830d..597de86cd7 100755
--- a/db/zentao.sql
+++ b/db/zentao.sql
@@ -806,8 +806,8 @@ CREATE TABLE IF NOT EXISTS `zt_extension` (
`zentaoCompatible` varchar(100) NOT NULL,
`installedTime` datetime NOT NULL,
`depends` varchar(100) NOT NULL,
- `dirs` mediumtext NOT NULL,
- `files` mediumtext NOT NULL,
+ `dirs` mediumtext NULL,
+ `files` mediumtext NULL,
`status` varchar(20) NOT NULL,
PRIMARY KEY (`id`),
KEY `name` (`name`),
@@ -1754,7 +1754,7 @@ CREATE TABLE `zt_taskteam` (
`estimate` decimal(12,2) NOT NULL,
`consumed` decimal(12,2) NOT NULL,
`left` decimal(12,2) NOT NULL,
- `transfer` char(30) NOT NULL DEFAUT '',
+ `transfer` char(30) NOT NULL DEFAULT '',
`status` enum('wait','doing','done') NOT NULL DEFAULT 'wait',
`order` tinyint(3) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
@@ -3426,6 +3426,7 @@ REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(1, 'doc', 'manageBook'),
(1, 'doc', 'myCollection'),
(1, 'doc', 'myCreation'),
+(1, 'doc', 'myEdited'),
(1, 'doc', 'mySpace'),
(1, 'doc', 'myView'),
(1, 'doc', 'productSpace'),
@@ -4780,6 +4781,7 @@ REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(2, 'doc', 'index'),
(2, 'doc', 'myCollection'),
(2, 'doc', 'myCreation'),
+(2, 'doc', 'myEdited'),
(2, 'doc', 'mySpace'),
(2, 'doc', 'myView'),
(2, 'doc', 'productSpace'),
@@ -5508,6 +5510,7 @@ REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(3, 'doc', 'index'),
(3, 'doc', 'myCollection'),
(3, 'doc', 'myCreation'),
+(3, 'doc', 'myEdited'),
(3, 'doc', 'mySpace'),
(3, 'doc', 'myView'),
(3, 'doc', 'productSpace'),
@@ -6188,6 +6191,7 @@ REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(4, 'doc', 'manageBook'),
(4, 'doc', 'myCollection'),
(4, 'doc', 'myCreation'),
+(4, 'doc', 'myEdited'),
(4, 'doc', 'mySpace'),
(4, 'doc', 'myView'),
(4, 'doc', 'productSpace'),
@@ -7223,6 +7227,7 @@ REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(5, 'doc', 'index'),
(5, 'doc', 'myCollection'),
(5, 'doc', 'myCreation'),
+(5, 'doc', 'myEdited'),
(5, 'doc', 'mySpace'),
(5, 'doc', 'myView'),
(5, 'doc', 'productSpace'),
@@ -8142,6 +8147,7 @@ REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(6, 'doc', 'index'),
(6, 'doc', 'myCollection'),
(6, 'doc', 'myCreation'),
+(6, 'doc', 'myEdited'),
(6, 'doc', 'mySpace'),
(6, 'doc', 'myView'),
(6, 'doc', 'productSpace'),
@@ -8939,6 +8945,7 @@ REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(7, 'doc', 'index'),
(7, 'doc', 'myCollection'),
(7, 'doc', 'myCreation'),
+(7, 'doc', 'myEdited'),
(7, 'doc', 'mySpace'),
(7, 'doc', 'myView'),
(7, 'doc', 'productSpace'),
@@ -9751,6 +9758,7 @@ REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(8, 'doc', 'index'),
(8, 'doc', 'myCollection'),
(8, 'doc', 'myCreation'),
+(8, 'doc', 'myEdited'),
(8, 'doc', 'mySpace'),
(8, 'doc', 'myView'),
(8, 'doc', 'productSpace'),
@@ -10592,6 +10600,7 @@ REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(9, 'doc', 'index'),
(9, 'doc', 'myCollection'),
(9, 'doc', 'myCreation'),
+(9, 'doc', 'myEdited'),
(9, 'doc', 'mySpace'),
(9, 'doc', 'myView'),
(9, 'doc', 'productSpace'),
@@ -11259,6 +11268,7 @@ REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(10, 'doc', 'index'),
(10, 'doc', 'myCollection'),
(10, 'doc', 'myCreation'),
+(10, 'doc', 'myEdited'),
(10, 'doc', 'mySpace'),
(10, 'doc', 'myView'),
(10, 'doc', 'productSpace'),
@@ -11762,6 +11772,7 @@ REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(11, 'doc', 'index'),
(11, 'doc', 'myCollection'),
(11, 'doc', 'myCreation'),
+(11, 'doc', 'myEdited'),
(11, 'doc', 'mySpace'),
(11, 'doc', 'myView'),
(11, 'doc', 'productSpace'),
diff --git a/lib/base/dao/dao.class.php b/lib/base/dao/dao.class.php
index f3d8a24333..6339b93455 100644
--- a/lib/base/dao/dao.class.php
+++ b/lib/base/dao/dao.class.php
@@ -619,7 +619,7 @@ class baseDAO
{
if(strpos($skipFields, ",$field,") !== false) continue;
$fields .= "`{$field}`,";
- if(is_string($value)) $value = $this->sqlobj->quote($value);
+ if(is_string($value) or $value === null) $value = $this->sqlobj->quote($value);
$values .= $value . ',';
}
$fields = substr($fields, 0, -1);
diff --git a/lib/dao/dm.class.php b/lib/dao/dm.class.php
index 9c2f015f0a..379fef2cdf 100644
--- a/lib/dao/dm.class.php
+++ b/lib/dao/dm.class.php
@@ -311,7 +311,11 @@ class dm extends dao
{
$sql = "SELECT * from dba_ind_columns WHERE index_owner = '{$this->config->db->name}' AND index_name IN (SELECT index_name FROM dba_indexes WHERE table_name='{$this->table}' AND INDEX_TYPE = 'NORMAL' AND UNIQUENESS = 'UNIQUE' AND INDEX_NAME NOT IN (SELECT INDEX_NAME FROM DBA_CONSTRAINTS WHERE CONSTRAINT_TYPE = 'P'))";
- return $this->dbh->query($sql)->fetchAll();
+ $columns = $this->dbh->query($sql)->fetchAll();
+
+ $cols = array();
+ foreach($columns as $col) $cols[$col->COLUMN_NAME] = $col;
+ return $cols;
}
/**
@@ -345,7 +349,7 @@ class dm extends dao
foreach($this->sqlobj->data as $field => $value)
{
$fields .= "`{$field}`,";
- if(is_string($value)) $value = $this->sqlobj->quote($value);
+ if(is_string($value) or $value === null) $value = $this->sqlobj->quote($value);
$values .= $value . ',';
}
$fields = substr($fields, 0, -1);
@@ -361,10 +365,9 @@ class dm extends dao
if(empty($cols)) return false;
$conditions = array();
- foreach($cols as $col)
+ foreach($cols as $colName => $col)
{
- $pk = $col->COLUMN_NAME;
- if(isset($this->sqlobj->data->{$pk})) $conditions[] = " \"{$pk}\" = '{$this->sqlobj->data->{$pk}}'";
+ if(isset($this->sqlobj->data->{$colName})) $conditions[] = " \"{$colName}\" = '{$this->sqlobj->data->{$colName}}'";
}
if(!empty($conditions)) $updateSql .= ' WHERE ' . implode(' AND ', $conditions);
@@ -374,6 +377,7 @@ class dm extends dao
foreach($this->sqlobj->data as $field => $value)
{
if(isset($ingore[$this->table]) and in_array($field, $ingore[$this->table])) continue;
+ if(!isset($cols[$field])) continue;
$deleteSql .= "`{$field}` = ";
$deleteSql .= is_string($value) ? "'{$value}'" : $value;
$deleteSql .= ' AND ';
diff --git a/module/admin/lang/menu.php b/module/admin/lang/menu.php
index 48d69fff0f..bf0448e0e7 100644
--- a/module/admin/lang/menu.php
+++ b/module/admin/lang/menu.php
@@ -45,16 +45,16 @@ $lang->admin->menuList->convert['link'] = 'convert|convertjira';
$lang->admin->menuList->convert['order'] = 50;
$lang->admin->menuList->system['subMenu']['mode'] = array('link' => "{$lang->custom->mode}|custom|mode|");
-$lang->admin->menuList->system['subMenu']['backup'] = array('link' => "{$lang->backup->common}|backup|index|");
$lang->admin->menuList->system['subMenu']['trash'] = array('link' => "{$lang->action->trash}|action|trash|");
$lang->admin->menuList->system['subMenu']['safe'] = array('link' => "{$lang->security}|admin|safe|", 'alias' => 'checkweak,resetpwdsetting', 'links' => array('admin|resetpwdsetting|', 'admin|checkweak|'));
$lang->admin->menuList->system['subMenu']['cron'] = array('link' => "{$lang->admin->cron}|cron|index|", 'subModule' => 'cron');
$lang->admin->menuList->system['subMenu']['timezone'] = array('link' => "{$lang->timezone}|custom|timezone|");
$lang->admin->menuList->system['subMenu']['buildindex'] = array('link' => "{$lang->admin->buildIndex}|search|buildindex|");
$lang->admin->menuList->system['subMenu']['tableengine'] = array('link' => "{$lang->admin->tableEngine}|admin|tableengine|");
+if($this->config->db->driver == 'mysql') $lang->admin->menuList->system['subMenu']['backup'] = array('link' => "{$lang->backup->common}|backup|index|");
$lang->admin->menuList->system['menuOrder']['5'] = 'mode';
-$lang->admin->menuList->system['menuOrder']['10'] = 'backup';
+if($this->config->db->driver == 'mysql') $lang->admin->menuList->system['menuOrder']['10'] = 'backup';
$lang->admin->menuList->system['menuOrder']['15'] = 'trash';
$lang->admin->menuList->system['menuOrder']['30'] = 'safe';
$lang->admin->menuList->system['menuOrder']['35'] = 'cron';
diff --git a/module/block/config.php b/module/block/config.php
index a87632c071..15dd685cb6 100644
--- a/module/block/config.php
+++ b/module/block/config.php
@@ -84,3 +84,4 @@ $config->block->modules['common']->moreLinkList->dynamic = 'company|dynamic|';
$config->block->modules['doc'] = new stdclass();
$config->block->modules['doc']->moreLinkList = new stdclass();
$config->block->modules['doc']->moreLinkList->docmycollection = 'doc|myspace|type=collect&libID=0&moduleID=0&browseType=all¶m=0&orderBy=editedDate_desc';
+$config->block->modules['doc']->moreLinkList->productdoc = 'doc|productspace|';
diff --git a/module/block/control.php b/module/block/control.php
index 2f9f3742b6..c31d135b24 100755
--- a/module/block/control.php
+++ b/module/block/control.php
@@ -2149,6 +2149,31 @@ class block extends control
*/
public function printProductDocBlock()
{
+ $this->loadModel('doc');
+
+ /* Set project status and count. */
+ $count = isset($this->params->count) ? (int)$this->params->count : 15;
+ $products = $this->loadModel('product')->getList(0, 'all');
+ $involveds = $this->product->getList(0, 'involved');
+ $productIdList = array_merge(array_keys($products), array_keys($involveds));
+
+ $stmt = $this->dao->select('*')->from(TABLE_DOC)
+ ->where('deleted')->eq(0)
+ ->andWhere('product')->in($productIdList)
+ ->orderBy('product,editedDate_desc')
+ ->query();
+ $docGroup = array();
+ while($doc = $stmt->fetch())
+ {
+ if(!isset($docGroup[$doc->product])) $docGroup[$doc->product] = array();
+ if(count($docGroup[$doc->product]) > $count) break;
+ if($this->doc->checkPrivDoc($doc)) $docGroup[$doc->product][$doc->id] = $doc;
+ }
+
+ $this->view->users = $this->loadModel('user')->getPairs('noletter');
+ $this->view->products = $products;
+ $this->view->involveds = $involveds;
+ $this->view->docGroup = $docGroup;
}
/**
diff --git a/module/block/lang/zh-cn.php b/module/block/lang/zh-cn.php
index 434c0fe58e..2ccca59c7e 100644
--- a/module/block/lang/zh-cn.php
+++ b/module/block/lang/zh-cn.php
@@ -357,6 +357,7 @@ if($config->vision == 'rnd')
{
$lang->block->default['doc']['6']['title'] = $lang->productCommon . '文档';
$lang->block->default['doc']['6']['block'] = 'productdoc';
+ $lang->block->default['doc']['6']['params']['count'] = '20';
$lang->block->default['doc']['6']['grid'] = 8;
}
@@ -366,6 +367,7 @@ $lang->block->default['doc']['7']['grid'] = 4;
$lang->block->default['doc']['8']['title'] = $lang->projectCommon . '文档';
$lang->block->default['doc']['8']['block'] = 'projectdoc';
+$lang->block->default['doc']['8']['params']['count'] = '20';
$lang->block->default['doc']['8']['grid'] = 8;
$lang->block->count = '数量';
diff --git a/module/block/model.php b/module/block/model.php
index afca3fbe66..150d9a0188 100644
--- a/module/block/model.php
+++ b/module/block/model.php
@@ -1125,7 +1125,8 @@ class blockModel extends model
*/
public function getProductDocParams()
{
- return false;
+ $params = $this->appendCountParams();
+ return json_encode($params);
}
/**
diff --git a/module/block/view/productdocblock.html.php b/module/block/view/productdocblock.html.php
index e69de29bb2..d4ea3b926c 100644
--- a/module/block/view/productdocblock.html.php
+++ b/module/block/view/productdocblock.html.php
@@ -0,0 +1,190 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id])):?>
+
+
+
+
+ | doc->title?> |
+ doc->addedBy?> |
+ doc->addedDate?> |
+ doc->editedDate?> |
+
+
+
+ id] as $doc):?>
+
+ |
+ doc->iconList, $doc->type);
+ $icon = html::image("static/svg/{$docType}.svg", "class='file-icon'");
+ if(common::hasPriv('doc', 'view'))
+ {
+ echo html::a($this->createLink('doc', 'view', "docID=$doc->id"), $icon . $doc->title, '', "title='{$doc->title}' class='doc-title' data-app='{$this->app->tab}'");
+ }
+ else
+ {
+ echo "$icon {$doc->title}";
+ }
+ ?>
+ |
+ addedBy);?> |
+ addedDate, 0, 10);?> |
+ editedDate, 0, 10);?> |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/module/chart/js/common.js b/module/chart/js/common.js
index f7d9bf587c..715932d691 100644
--- a/module/chart/js/common.js
+++ b/module/chart/js/common.js
@@ -87,3 +87,17 @@ function initDatepicker($obj, callback)
if(typeof callback == 'function') callback($obj);
}
+
+/**
+ * Attr date check.
+ *
+ * @param object $obj
+ * @access public
+ * @return void
+ */
+function attrDateCheck($obj)
+{
+ $obj.find('.form-date').attr('onchange', 'checkDate(this, this.value)');
+ $obj.find('.form-datetime').attr('onchange', 'checkDate(this, this.value)');
+}
+
diff --git a/module/chart/js/preview.js b/module/chart/js/preview.js
index 44955b951e..48b48de670 100644
--- a/module/chart/js/preview.js
+++ b/module/chart/js/preview.js
@@ -1,10 +1,8 @@
$(function()
{
initCheckBox();
- initQueryBtn();
$('#exportchart').modalTrigger();
- chartMap = new Map();
if(charts.length > 0)
{
var chartPros = charts.map(function(chart)
@@ -12,7 +10,6 @@ $(function()
var echartDom = $('#chartDraw' + chart.currentGroup + '_' + chart.id).get(0);
var echart = echarts.init(echartDom);
ajaxGetChart(false, chart, echart);
- chartMap.set(chart.cudrrentGroup + chart.id, chart);
return renderFilters(chart);
});
@@ -21,9 +18,14 @@ $(function()
calcPreviewGrowFilter();
$('body').resize(() => {calcPreviewGrowFilter(true);});
});
-
}
+ chartMap = new Map();
+ charts.forEach(function(chart)
+ {
+ chartMap.set(chart.currentGroup + '_' + chart.id, chart);
+ });
+
$('[data-toggle="tooltip"]').tooltip();
})
@@ -73,53 +75,53 @@ function initCheckBox()
/**
* Init query button.
*
+ * @param object $obj
* @access public
* @return void
*/
-function initQueryBtn()
+function queryData(obj)
{
- $('.btn-query').click(function()
+ var chartID = $(obj).parents('.filterBox').attr('data-chart');
+ var chartInfo = chartMap.get(chartID);
+ chartInfo.searchFilters = JSON.parse(JSON.stringify(chartInfo.filters));
+
+ // Foreach filters and set current value in searchFilters. */
+ $('#filterItems' + chartID + ' .filter-items').children().each(function(index)
{
- var chartID = $(this).attr('data-chart');
- var chartInfo = chartMap.get(chartID);
- chartInfo.searchFilters = JSON.parse(JSON.stringify(chartInfo.filters));
+ var $child = $(this);
+ if(!$child.hasClass('filter-item')) return;
- // Foreach filters and set current value in searchFilters. */
- $('#filterItems' + chartID + ' .filter-items').children().each(function(index)
+ var filter = chartInfo.searchFilters[index];
+ var type = filter.type;
+ var value = null;
+
+ if(type == 'input' || type == 'select')
{
- var $child = $(this);
- var filter = chartInfo.searchFilters[index];
- var type = filter.type;
- var value = null;
+ var value = $child.find('#default').val();
+ chartInfo.searchFilters[index].default = value;
+ }
+ else if(type == 'date' || type == 'datetime')
+ {
+ var begin = $child.find('input').first().val();
+ var end = $child.find('input').last().val();
- if(type == 'input' || type == 'select')
- {
- var value = $child.find('#default').val();
- chartInfo.searchFilters[index].default = value;
- }
- else if(type == 'date' || type == 'datetime')
- {
- var begin = $child.find('input').first().val();
- var end = $child.find('input').last().val();
+ var value = {"begin":begin, "end":end};
+ chartInfo.searchFilters[index].default = value;
+ }
+ else if(type == 'condition')
+ {
+ var operator = $child.find('#operator').data('zui.picker').getValue();
+ var value = $child.find('#value').val();
- var value = {"begin":begin, "end":end};
- chartInfo.searchFilters[index].default = value;
- }
- else if(type == 'condition')
- {
- var operator = $child.find('#operator').data('zui.picker').getValue();
- var value = $child.find('#value').val();
-
- chartInfo.searchFilters[index].operator = operator;
- chartInfo.searchFilters[index].value = value;
- }
- });
-
- //* Reload echart. */
- var echartDom = $('#chartDraw' + chartID).get(0);
- var echartInfo = echarts.init(echartDom);
- ajaxGetChart(false, chartInfo, echartInfo);
+ chartInfo.searchFilters[index].operator = operator;
+ chartInfo.searchFilters[index].value = value;
+ }
});
+
+ //* Reload echart. */
+ var echartDom = $('#chartDraw' + chartID).get(0);
+ var echartInfo = echarts.init(echartDom);
+ ajaxGetChart(false, chartInfo, echartInfo);
}
function calcPreviewGrowFilter(resize = false)
@@ -247,6 +249,6 @@ function renderFilterItem(filter, resp, index, step)
};
var html = $($.zui.formatString(tpl, data))
initPicker(html, 'picker-select', true);
- initDatepicker(html);
+ initDatepicker(html, attrDateCheck);
return html;
}
diff --git a/module/chart/view/preview.html.php b/module/chart/view/preview.html.php
index 758931353d..e007da1ad6 100644
--- a/module/chart/view/preview.html.php
+++ b/module/chart/view/preview.html.php
@@ -20,7 +20,7 @@
chart->widthInput);?>
chart->widthDate);?>
bi->pickerHeight);?>
- ";?>
+ ";?>
@@ -36,7 +36,7 @@
config->edition == 'biz' or $this->config->edition == 'max'):?>
- " . $lang->export, '', "class='btn btn-link btn-export' id='exportchart'");?>
+ " . $lang->export, '', "class='btn btn-link btn-export' id='exportchart'");?>
chart->toDesign, '', "class='btn btn-primary '");?>
@@ -94,10 +94,10 @@
-
+
filters)):?>
-
chart->query, "data-chart={$chart->currentGroup}{$chart->id}", 'btn btn-primary btn-query');?>
+
chart->query, "onclick='queryData(this)'", 'btn btn-primary btn-query');?>
diff --git a/module/doc/config.php b/module/doc/config.php
index 509dfaa28c..7b2f96b2ec 100644
--- a/module/doc/config.php
+++ b/module/doc/config.php
@@ -50,6 +50,7 @@ $config->doc->spaceMethod['mine'] = 'myspace';
$config->doc->spaceMethod['view'] = 'myspace';
$config->doc->spaceMethod['collect'] = 'myspace';
$config->doc->spaceMethod['createdby'] = 'myspace';
+$config->doc->spaceMethod['editedby'] = 'myspace';
$config->doc->spaceMethod['product'] = 'productspace';
$config->doc->spaceMethod['project'] = 'projectspace';
$config->doc->spaceMethod['execution'] = 'projectspace';
diff --git a/module/doc/model.php b/module/doc/model.php
index c0903b064f..72e6af41cc 100644
--- a/module/doc/model.php
+++ b/module/doc/model.php
@@ -411,6 +411,7 @@ class docModel extends model
}
$query = $this->getDocQuery($this->session->contributeDocQuery);
+ $query = preg_replace('/(`\w+`)/', 't1.$1', $query);
$docIDList = $this->dao->select('objectID')->from(TABLE_ACTION)
->where('objectType')->eq('doc')
->andWhere('objectID')->in($hasPrivDocIdList)
@@ -737,7 +738,7 @@ class docModel extends model
->query();
$docIdList = array();
- while ($doc = $stmt->fetch())
+ while($doc = $stmt->fetch())
{
if($this->checkPrivDoc($doc)) $docIdList[$doc->id] = $doc->id;
}
@@ -1126,7 +1127,7 @@ class docModel extends model
unset($this->config->doc->search['fields']['execution']);
}
- if(in_array($type, array('view', 'collect', 'createdby'))) $libPairs = array('' => '') + $this->getLibs('all', 'withObject');
+ if(in_array($type, array('view', 'collect', 'createdby', 'editedby'))) $libPairs = array('' => '') + $this->getLibs('all', 'withObject');
$this->config->doc->search['module'] = $queryName;
$this->config->doc->search['params']['lib']['values'] = $libPairs + array('all' => $this->lang->doclib->all);
@@ -3147,21 +3148,23 @@ class docModel extends model
$myCreation->hasAction = false;
$myCreation->active = $libType == 'createdby' ? 1 : 0;
- $myCreation = new stdclass();
- $myCreation->id = 0;
- $myCreation->name = $this->lang->doc->myEdited;
- $myCreation->type = 'editedBy';
- $myCreation->objectType = 'doc';
- $myCreation->objectID = 0;
- $myCreation->hasAction = false;
- $myCreation->active = $libType == 'editedby' ? 1 : 0;
+ $myEdited = new stdclass();
+ $myEdited->id = 0;
+ $myEdited->name = $this->lang->doc->myEdited;
+ $myEdited->type = 'editedBy';
+ $myEdited->objectType = 'doc';
+ $myEdited->objectID = 0;
+ $myEdited->hasAction = false;
+ $myEdited->active = $libType == 'editedby' ? 1 : 0;
$libTree = array();
$libTree[] = $myLib;
if(common::hasPriv('doc', 'myView')) $libTree[] = $myView;
if(common::hasPriv('doc', 'myCollection')) $libTree[] = $myCollection;
if(common::hasPriv('doc', 'myCreation')) $libTree[] = $myCreation;
+ if(common::hasPriv('doc', 'myEdited')) $libTree[] = $myEdited;
}
+
return $libTree;
}
diff --git a/module/extension/model.php b/module/extension/model.php
index 9febd91df6..2166b4d169 100644
--- a/module/extension/model.php
+++ b/module/extension/model.php
@@ -778,9 +778,10 @@ class extensionModel extends model
{
$code = $extension;
$extension = $this->getInfoFromPackage($extension);
- $extension->status = 'available';
- $extension->code = $code;
- $extension->type = empty($type) ? $extension->type : $type;
+ $extension->status = 'available';
+ $extension->code = $code;
+ $extension->type = empty($type) ? $extension->type : $type;
+ $extension->installedTime = helper::now();
$this->dao->replace(TABLE_EXTENSION)->data($extension)->exec();
}
diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php
index 4c948337ec..54c7b77d5f 100644
--- a/module/group/lang/resource.php
+++ b/module/group/lang/resource.php
@@ -1401,6 +1401,7 @@ $lang->resource->doc->mySpace = 'mySpace';
$lang->resource->doc->myView = 'myView';
$lang->resource->doc->myCollection = 'myCollection';
$lang->resource->doc->myCreation = 'myCreation';
+$lang->resource->doc->myEdited = 'myEdited';
$lang->resource->doc->createLib = 'createLib';
$lang->resource->doc->editLib = 'editLib';
$lang->resource->doc->deleteLib = 'deleteLib';
@@ -1425,24 +1426,25 @@ $lang->doc->methodOrder[10] = 'mySpace';
$lang->doc->methodOrder[15] = 'myView';
$lang->doc->methodOrder[20] = 'myCollection';
$lang->doc->methodOrder[25] = 'myCreation';
-$lang->doc->methodOrder[30] = 'createLib';
-$lang->doc->methodOrder[35] = 'editLib';
-$lang->doc->methodOrder[40] = 'deleteLib';
-$lang->doc->methodOrder[45] = 'create';
-$lang->doc->methodOrder[50] = 'edit';
-$lang->doc->methodOrder[55] = 'view';
-$lang->doc->methodOrder[60] = 'delete';
-$lang->doc->methodOrder[65] = 'deleteFile';
-$lang->doc->methodOrder[70] = 'collect';
-$lang->doc->methodOrder[75] = 'productSpace';
-$lang->doc->methodOrder[80] = 'projectSpace';
-$lang->doc->methodOrder[85] = 'teamSpace';
-$lang->doc->methodOrder[90] = 'showFiles';
-$lang->doc->methodOrder[95] = 'addCatalog';
-$lang->doc->methodOrder[100] = 'editCatalog';
-$lang->doc->methodOrder[105] = 'sortCatalog';
-$lang->doc->methodOrder[110] = 'deleteCatalog';
-$lang->doc->methodOrder[115] = 'displaySetting';
+$lang->doc->methodOrder[30] = 'myEdited';
+$lang->doc->methodOrder[35] = 'createLib';
+$lang->doc->methodOrder[40] = 'editLib';
+$lang->doc->methodOrder[45] = 'deleteLib';
+$lang->doc->methodOrder[50] = 'create';
+$lang->doc->methodOrder[55] = 'edit';
+$lang->doc->methodOrder[60] = 'view';
+$lang->doc->methodOrder[65] = 'delete';
+$lang->doc->methodOrder[70] = 'deleteFile';
+$lang->doc->methodOrder[75] = 'collect';
+$lang->doc->methodOrder[80] = 'productSpace';
+$lang->doc->methodOrder[85] = 'projectSpace';
+$lang->doc->methodOrder[90] = 'teamSpace';
+$lang->doc->methodOrder[95] = 'showFiles';
+$lang->doc->methodOrder[100] = 'addCatalog';
+$lang->doc->methodOrder[105] = 'editCatalog';
+$lang->doc->methodOrder[110] = 'sortCatalog';
+$lang->doc->methodOrder[115] = 'deleteCatalog';
+$lang->doc->methodOrder[120] = 'displaySetting';
/* Mail. */
$lang->resource->mail = new stdclass();
diff --git a/module/my/view/doc.html.php b/module/my/view/doc.html.php
index eaa037a4f3..3d7d676a4d 100644
--- a/module/my/view/doc.html.php
+++ b/module/my/view/doc.html.php
@@ -90,8 +90,8 @@
editedDate, 'Y-m-d');?> |
- id&comment=false&from={$lang->navGroup->doc}", "", '', "title='{$lang->edit}' class='btn btn-link' data-app='doc'", true, false)?>
- id&confirm=no&from={$lang->navGroup->doc}", "", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?>
+ id&comment=false&from={$lang->navGroup->doc}", "", '', "title='{$lang->edit}' class='btn' data-app='doc'", true, false)?>
+ id&confirm=no&from={$lang->navGroup->doc}", "", 'hiddenwin', "title='{$lang->delete}' class='btn'")?>
|
diff --git a/module/product/lang/zh-cn.php b/module/product/lang/zh-cn.php
index 6c9180c31c..5776fc9e24 100644
--- a/module/product/lang/zh-cn.php
+++ b/module/product/lang/zh-cn.php
@@ -27,6 +27,7 @@ $lang->product->closed = '已关闭';
$lang->product->closedProduct = "已关闭的{$lang->productCommon}";
$lang->product->updateOrder = '排序';
$lang->product->all = "所有{$lang->productCommon}";
+$lang->product->involved = "我参与的{$lang->productCommon}";
$lang->product->manageLine = "维护产品线";
$lang->product->newLine = "新建产品线";
$lang->product->export = '导出数据';
diff --git a/module/product/model.php b/module/product/model.php
index f2546bd56f..aee7b9455a 100755
--- a/module/product/model.php
+++ b/module/product/model.php
@@ -276,8 +276,10 @@ class productModel extends model
*/
public function getList($programID = 0, $status = 'all', $limit = 0, $line = 0, $shadow = 0)
{
- $products = $this->dao->select('t1.*')->from(TABLE_PRODUCT)->alias('t1')
+ $products = $this->dao->select('DISTINCT t1.*')->from(TABLE_PRODUCT)->alias('t1')
->leftJoin(TABLE_PROGRAM)->alias('t2')->on('t1.program = t2.id')
+ ->leftJoin(TABLE_PROJECTPRODUCT)->alias('t3')->on('t3.product = t1.id')
+ ->leftJoin(TABLE_TEAM)->alias('t4')->on("t4.root = t3.project && t4.type='project'")
->where('t1.deleted')->eq(0)
->beginIF($shadow !== 'all')->andWhere('t1.shadow')->eq((int)$shadow)->fi()
->beginIF($programID)->andWhere('t1.program')->eq($programID)->fi()
@@ -291,6 +293,7 @@ class productModel extends model
->orWhere('t1.QD')->eq($this->app->user->account)
->orWhere('t1.RD')->eq($this->app->user->account)
->orWhere('t1.createdBy')->eq($this->app->user->account)
+ ->orWhere('t4.account')->eq($this->app->user->account)
->markRight(1)
->fi()
->beginIF($status == 'review')