Merge branch 'Fixbug'
This commit is contained in:
+3
-2
@@ -1,10 +1,11 @@
|
||||
ALTER TABLE `zt_kanbanspace` ADD `type` varchar(50) NOT NULL AFTER `name`;
|
||||
UPDATE `zt_kanbanspace` SET `type` = 'cooperation', `whitelist` = '' WHERE `type` = '';
|
||||
UPDATE `zt_kanbanspace` SET `type` = 'cooperation' WHERE `type` = '';
|
||||
UPDATE `zt_kanban` SET `team` = CONCAT(team, ',', whitelist) where `whitelist` != '';
|
||||
|
||||
ALTER TABLE `zt_kanban` ADD `object` varchar(255) NOT NULL AFTER `displayCards`;
|
||||
ALTER TABLE `zt_kanban` ADD `performable` enum ('0', '1') NOT NULL DEFAULT '0' AFTER `archived`;
|
||||
ALTER TABLE `zt_kanban` ADD `fluidBoard` enum('0','1') NOT NULL DEFAULT '0' AFTER `displayCards`;
|
||||
ALTER TABLE `zt_kanbancard` ADD `status` varchar(30) NOT NULL AFTER `name`;
|
||||
ALTER TABLE `zt_kanbancard` ADD `status` varchar(30) NOT NULL DEFAULT 'doing' AFTER `name`;
|
||||
|
||||
ALTER TABLE `zt_kanbancard` ADD `fromID` mediumint(8) unsigned NOT NULL AFTER `group`;
|
||||
ALTER TABLE `zt_kanbancard` ADD `fromType` varchar(30) NOT NULL AFTER `fromID`;
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
$width = $this->app->getClientLang() == 'en' ? '70%' : '60%';
|
||||
echo '<li>' .html::a($this->createLink('kanban', 'setLaneHeight', "executionID=$executionID&from=execution", '', true), "<i class='icon icon-size-height'></i> " . $lang->kanban->laneHeight, '', "class='iframe btn btn-link' title='{$lang->kanban->laneHeight}' data-width=$width") . '</li>';
|
||||
}
|
||||
if(common::hasPriv('kanban', 'setColumnWidth')) echo '<li>' .html::a($this->createLink('kanban', 'setColumnWidth', "executionID=$executionID&from=execution", '', true), "<i class='icon icon-size-width'></i> " . $lang->kanban->columnWidth, '', "class='iframe btn btn-link' title='{$lang->kanban->laneHeight}' data-width=30%") . '</li>';
|
||||
if(common::hasPriv('kanban', 'setColumnWidth')) echo '<li>' .html::a($this->createLink('kanban', 'setColumnWidth', "executionID=$executionID&from=execution", '', true), "<i class='icon icon-size-width'></i> " . $lang->kanban->columnWidth, '', "class='iframe btn btn-link' title='{$lang->kanban->columnWidth}' data-width=30%") . '</li>';
|
||||
if(common::hasPriv('execution', 'printKanban')) echo '<li>' .html::a($this->createLink('execution', 'printKanban', "executionID=$executionID"), "<i class='icon icon-printer muted'></i> " . $lang->execution->printKanban, '', "class='iframe btn btn-link' id='printKanban' title='{$lang->execution->printKanban}' data-width='500'") . '</li>';
|
||||
echo '<li>' .html::a('javascript:fullScreen()', "<i class='icon icon-fullscreen muted'></i> " . $lang->execution->fullScreen, '', "class='btn btn-link' title='{$lang->execution->fullScreen}' data-width='500'") . '</li>';
|
||||
echo '</ul></div>';
|
||||
|
||||
@@ -669,8 +669,6 @@ $lang->resource->kanban->assigntoCard = 'assigntoCard';
|
||||
//$lang->resource->kanban->copyCard = 'copyCard';
|
||||
$lang->resource->kanban->deleteCard = 'deleteCard';
|
||||
$lang->resource->kanban->moveCard = 'moveCard';
|
||||
$lang->resource->kanban->finishCard = 'finishCard';
|
||||
$lang->resource->kanban->activateCard = 'activateCard';
|
||||
$lang->resource->kanban->setCardColor = 'setCardColor';
|
||||
$lang->resource->kanban->laneMove = 'laneMove';
|
||||
$lang->resource->kanban->viewArchivedColumn = 'viewArchivedColumn';
|
||||
|
||||
@@ -168,7 +168,7 @@ class kanban extends control
|
||||
unset($this->lang->kanbanspace->featureBar['involved']);
|
||||
|
||||
$space = $this->kanban->getSpaceById($spaceID);
|
||||
$spaceUsers = $spaceID == 0 ? ',' : trim($space->owner) . ',' . trim($space->team) . ',' . trim($space->whitelist);
|
||||
$spaceUsers = $spaceID == 0 ? ',' : trim($space->owner) . ',' . trim($space->team);
|
||||
$users = $this->loadModel('user')->getPairs('noclosed|nodeleted', '', 0, $spaceUsers);
|
||||
|
||||
$this->view->users = $users;
|
||||
@@ -204,7 +204,7 @@ class kanban extends control
|
||||
|
||||
$kanban = $this->kanban->getByID($kanbanID);
|
||||
$space = $this->kanban->getSpaceById($kanban->space);
|
||||
$spaceUsers = trim($space->owner) . ',' . trim($space->team) . ',' . trim($space->whitelist);
|
||||
$spaceUsers = trim($space->owner) . ',' . trim($space->team);
|
||||
$users = $this->loadModel('user')->getPairs('noclosed|nodeleted', '', 0, $spaceUsers);
|
||||
|
||||
$this->view->users = $users;
|
||||
@@ -801,7 +801,11 @@ class kanban extends control
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $backLink));
|
||||
}
|
||||
|
||||
$users = $this->loadModel('user')->getPairs('noclosed|nodeleted');
|
||||
$kanban = $this->kanban->getByID($kanbanID);
|
||||
$space = $this->kanban->getSpaceById($kanban->space);
|
||||
$spaceUsers = $kanban->space == 0 ? ',' : trim($space->owner) . ',' . trim($space->team);
|
||||
$users = $this->loadModel('user')->getPairs('noclosed|nodeleted', '', 0, $spaceUsers);
|
||||
|
||||
$lanePairs = $this->kanban->getLanePairsByGroup($groupID);
|
||||
|
||||
$lanePairs['ditto'] = $this->lang->kanbancard->ditto;
|
||||
|
||||
@@ -3,3 +3,5 @@
|
||||
.checked > .icon {display: inline-block;}
|
||||
.p-10px {padding: 10px}
|
||||
#kanbanActionMenu li a {text-align: left}
|
||||
|
||||
.importModal {min-height: 300px;}
|
||||
|
||||
@@ -115,4 +115,5 @@
|
||||
.region .kanban-item > .kanban-card > .execInfo > .user, .region .kanban-item > .kanban-card > .releaseInfo > .user, .region .kanban-item > .kanban-card > .productplanInfo > .user {position: absolute; right: 13px; bottom: 1px}
|
||||
.region .kanban-item > .kanban-card > .execInfo > .user > .avatar, .region .kanban-item > .kanban-card > .releaseInfo > .user > .avatar, .region .kanban-item > .kanban-card > .productplanInfo > .user > .avatar {display: inline-block; width: 24px; height: 24px; line-height: 24px; margin-right: 0px; margin-left: 2px}
|
||||
.kanban-card .releaseTitle .icon, .kanban-card .title .icon, .kanban-card .productplanTitle .icon, .kanban-card .title .icon, .kanban-card .buildTitle .icon{padding-right: 5px;}
|
||||
.kanban-card .label{margin-right: 7px; float: left; background-color:#2a5f29;}
|
||||
.kanban-card .releaseTitle, .kanban-card .productplanTitle {width: 100%; float: left;}
|
||||
|
||||
@@ -79,6 +79,9 @@ function setTargetLane(targetLaneID)
|
||||
*/
|
||||
function locateView(module, objectID)
|
||||
{
|
||||
var dataApp = module == 'productplan' || module == 'release' ? 'product' : 'execution';
|
||||
var dataApp = 'kanban';
|
||||
if(module == 'productplan' || module == 'release') dataApp = 'product';
|
||||
if(module == 'execution') dataApp = 'execution';
|
||||
if(module == 'build') dataApp = 'project';
|
||||
parent.$.apps.open(createLink(module, 'view', 'objectID=' + objectID), dataApp);
|
||||
}
|
||||
|
||||
+26
-14
@@ -279,7 +279,7 @@ function renderUsersAvatar(users, itemID, size)
|
||||
function renderKanbanItem(item, $item)
|
||||
{
|
||||
var whiteStyle = null;
|
||||
if(item.color == '#2a5f29' || item.color == '#b10b0b') whiteStyle = 'style="color:#FFFFFF"';
|
||||
if(item.color == '#2a5f29' || item.color == '#b10b0b' || item.color == '#cfa227') whiteStyle = 'style="color:#FFFFFF"';
|
||||
|
||||
if(item.fromType == 'execution')
|
||||
{
|
||||
@@ -303,24 +303,36 @@ function renderKanbanItem(item, $item)
|
||||
var privs = item.actions;
|
||||
var printMoreBtn = (privs.includes('editCard') || privs.includes('archiveCard') || privs.includes('copyCard') || privs.includes('deleteCard') || privs.includes('moveCard') || privs.includes('setCardColor'));
|
||||
|
||||
if(kanban.performable == 1 && item.status == 'done' )
|
||||
{
|
||||
$item.closest('.kanban-card').css({'filter' : 'opacity(0.5)', 'text-decoration' : 'line-through'});
|
||||
}
|
||||
else
|
||||
{
|
||||
$item.closest('.kanban-card').css({'filter' : '', 'text-decoration' : ''});
|
||||
}
|
||||
|
||||
if(privs.includes('sortCard')) $item.parent().addClass('sort');
|
||||
if(!$title.length)
|
||||
{
|
||||
$('<div class="label">' + kanbanLang.finished + '</div>').appendTo($item);
|
||||
if(privs.includes('viewCard')) $title = $('<a class="title iframe" data-toggle="modal" data-width="80%"></a>').appendTo($item).attr('href', createLink('kanban', 'viewCard', 'cardID=' + item.id, '', true));
|
||||
if(!privs.includes('viewCard')) $title = $('<p class="title"></p>').appendTo($item);
|
||||
}
|
||||
|
||||
$title.text(item.name).attr('title', item.name);
|
||||
|
||||
if(kanban.performable == 1 && item.status == 'done' )
|
||||
{
|
||||
var finishColor = '#2a5f29';
|
||||
if(item.color == '#2a5f29') finishColor = '#FFFFFF';
|
||||
$title.text(item.name).css('color', finishColor);
|
||||
$item.children('.label').show();
|
||||
if(item.color == '#2a5f29')
|
||||
{
|
||||
$item.children('.label').css({'background-color':'#FFFFFF','color':'#2a5f29'});
|
||||
}
|
||||
else
|
||||
{
|
||||
$item.children('.label').css({'background-color':'','color':''});
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$title.text(item.name).css('color', '');
|
||||
$item.children('.label').hide();
|
||||
}
|
||||
|
||||
var $actions = $item.children('.actions');
|
||||
if(printMoreBtn && !$actions.length)
|
||||
{
|
||||
@@ -591,7 +603,7 @@ function renderProductplanItem(item, $item)
|
||||
var begin = $.zui.createDate(item.begin);
|
||||
var end = $.zui.createDate(item.end);
|
||||
var today = new Date();
|
||||
var labelType = begin.getTime() <= today.getTime() && end.getTime() >= today.getTime() ? 'danger' : 'wait';
|
||||
var labelType = (item.begin <= $.zui.formatDate(today, 'yyyy-MM-dd') && item.end >= $.zui.formatDate(today, 'yyyy-MM-dd')) ? 'danger' : 'wait';
|
||||
var labelTitle = $.zui.formatDate(begin, 'MM-dd') + ' ' + productplanLang.to + ' ' + $.zui.formatDate(end, 'MM-dd');
|
||||
|
||||
if((item.begin == '2030-01-01' || item.end == '2030-01-01'))
|
||||
@@ -1073,9 +1085,9 @@ function createCardMenu(options)
|
||||
|
||||
var items = [];
|
||||
if(privs.includes('editCard')) items.push({label: kanbanLang.editCard, icon: 'edit', url: createLink('kanban', 'editCard', 'cardID=' + card.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
|
||||
if(kanban.performable == 1)
|
||||
if(privs.includes('performable') && kanban.performable == 1)
|
||||
{
|
||||
if(privs.includes('activateCard') && card.status != 'doing')
|
||||
if(card.status != 'doing')
|
||||
{
|
||||
items.push({label: kanbanLang.activateCard, icon: 'magic', onClick: function(){activateCard(card.id, card.kanban, card.region);}});
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ $lang->kanban->sortColumn = 'Sort Column';
|
||||
$lang->kanban->deleteColumn = 'Delete Column';
|
||||
$lang->kanban->createCard = 'Create Card';
|
||||
$lang->kanban->editCard = 'Edit Card';
|
||||
$lang->kanban->finished = 'Finished';
|
||||
$lang->kanban->finishCard = 'Finish Card';
|
||||
$lang->kanban->activateCard = 'Activate Card';
|
||||
$lang->kanban->viewCard = 'View Card';
|
||||
|
||||
@@ -29,6 +29,7 @@ $lang->kanban->sortColumn = '看板列排序';
|
||||
$lang->kanban->deleteColumn = '删除看板列';
|
||||
$lang->kanban->createCard = '创建卡片';
|
||||
$lang->kanban->editCard = '编辑卡片';
|
||||
$lang->kanban->finished = '已完成';
|
||||
$lang->kanban->finishCard = '完成卡片';
|
||||
$lang->kanban->activateCard = '激活卡片';
|
||||
$lang->kanban->viewCard = '查看卡片';
|
||||
|
||||
@@ -1036,7 +1036,7 @@ class kanbanModel extends model
|
||||
->andWhere('type')->eq('common')
|
||||
->fetchAll();
|
||||
|
||||
$actions = array('editCard', 'finishCard', 'activateCard', 'archiveCard', 'deleteCard', 'moveCard', 'setCardColor', 'viewCard', 'sortCard', 'viewExecution', 'viewPlan', 'viewRelease', 'viewBuild');
|
||||
$actions = array('editCard', 'performable', 'archiveCard', 'deleteCard', 'moveCard', 'setCardColor', 'viewCard', 'sortCard', 'viewExecution', 'viewPlan', 'viewRelease', 'viewBuild');
|
||||
$cardGroup = array();
|
||||
foreach($cellList as $cell)
|
||||
{
|
||||
@@ -2876,7 +2876,7 @@ class kanbanModel extends model
|
||||
if(common::hasPriv('kanban', 'delete')) $kanbanActions .= '<li>' . html::a(helper::createLink('kanban', 'delete', "kanbanID=$kanban->id"), '<i class="icon icon-trash"></i>' . $this->lang->kanban->delete, 'hiddenwin', "class='btn btn-link'") . '</li>';
|
||||
if($kanbanActions)
|
||||
{
|
||||
$actions .= ((common::hasPriv('kanban', 'createRegion') or $printSetHeightBtn or common::hasPriv('kanban', 'performable') or common::hasPriv('kanban', 'setColumnWidth')) and (common::hasPriv('kanban', 'edit') or common::hasPriv('kanban', 'close') or common::hasPriv('kanban', 'enableArchived') or common::hasPriv('kanban', 'delete'))) ? "<div class='divider'></div>" . $kanbanActions : $kanbanActions;
|
||||
$actions .= ((common::hasPriv('kanban', 'createRegion') or $printSetHeightBtn or common::hasPriv('kanban', 'performable') or common::hasPriv('kanban', 'setColumnWidth')) and (common::hasPriv('kanban', 'edit') or common::hasPriv('kanban', 'close') or common::hasPriv('kanban', 'enableArchived') or common::hasPriv('kanban', 'delete'))) ? "<li class='divider'></li>" . $kanbanActions : $kanbanActions;
|
||||
}
|
||||
$actions .= "</ul>";
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php $width = $this->app->getClientLang() == 'en' ? 'w-120px' : 'w-80px';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
@@ -19,7 +20,7 @@
|
||||
<form class='main-form form-ajax' method='post' enctype='multipart/form-data' id='dataform'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-120px'><?php echo $lang->kanban->columnWidth;?></th>
|
||||
<th class='<?php echo $width;?>'><?php echo $lang->kanban->columnWidth;?></th>
|
||||
<td><?php echo nl2br(html::radio('fluidBoard', $lang->kanbancolumn->fluidBoardList, $kanban->fluidBoard));?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#archivedCards .card-item .red {background-color: #b10b0b;}
|
||||
#archivedCards .card-item .yellow {background-color: #cfa227;}
|
||||
#archivedCards .card-item .green {background-color: #2a5f29;}
|
||||
#archivedCards .card-item .green-name .cardName {color: #2a5f29 !important;}
|
||||
#archivedCards .card-item .has-color .cardName,
|
||||
#archivedCards .card-item .has-color .actions .icon-more-v,
|
||||
#archivedCards .card-item .has-color .info > .label-pri,
|
||||
@@ -61,10 +62,17 @@
|
||||
if($card->color == '#2a5f29') $color = 'has-color green';
|
||||
?>
|
||||
<?php
|
||||
$style = '';
|
||||
if($card->status == 'done') $style = 'filter: opacity(0.5); text-decoration: line-through';
|
||||
$nameColor = '';
|
||||
if($card->status == 'done' and $card->color != '#2a5f29') $nameColor = 'green-name';
|
||||
?>
|
||||
<div class="kanban-item <?php echo $color;?>" data-id="<?php echo $card->id;?>" style="<?php echo $style;?>">
|
||||
<?php
|
||||
$labelColor = 'background-color: #2a5f29';
|
||||
if($card->color == '#2a5f29') $labelColor = 'background-color: #FFFFFF; color: #2a5f29';
|
||||
?>
|
||||
<div class="kanban-item <?php echo $nameColor;?> <?php echo $color;?>" data-id="<?php echo $card->id;?>">
|
||||
<?php if($card->status == 'done'):?>
|
||||
<div class="label" style="<?php echo $labelColor;?>"><?php echo $lang->kanban->finished;?></div>
|
||||
<?php endif;?>
|
||||
<?php echo html::a($this->createLink('kanban', 'viewCard', "cardID=$card->id", '', true), $card->name, '', "class='cardName iframe' data-toggle='modal' data-width='80%' title='$card->name'");?>
|
||||
<div class="info">
|
||||
<span class="pri label-pri label-pri-<?php echo $card->pri;?>"><?php echo $card->pri;?></span>
|
||||
|
||||
+10
-2
@@ -247,6 +247,13 @@ class mr extends control
|
||||
$sourceBranch = $this->gitlab->apiGetSingleBranch($MR->gitlabID, $MR->sourceProject, $MR->sourceBranch);
|
||||
$targetBranch = $this->gitlab->apiGetSingleBranch($MR->gitlabID, $MR->targetProject, $MR->targetBranch);
|
||||
|
||||
$projectOwner = true;
|
||||
if(isset($MR->gitlabID) and !$this->app->user->admin)
|
||||
{
|
||||
$openID = $this->gitlab->getUserIDByZentaoAccount($MR->gitlabID, $this->app->user->account);
|
||||
if(!$projectOwner and isset($sourceProject->owner->id) and $sourceProject->owner->id == $openID) $projectOwner = true;
|
||||
}
|
||||
|
||||
$this->view->sourceProjectName = $sourceProject->name_with_namespace;
|
||||
$this->view->targetProjectName = $targetProject->name_with_namespace;
|
||||
$this->view->sourceProjectURL = isset($sourceBranch->web_url) ? $sourceBranch->web_url : '';
|
||||
@@ -260,8 +267,9 @@ class mr extends control
|
||||
$this->app->loadLang('productplan');
|
||||
$product = $this->mr->getMRProduct($MR);
|
||||
|
||||
$this->view->compile = $this->loadModel('compile')->getById($MR->compileID);
|
||||
$this->view->compileJob = $MR->jobID ? $this->job->getById($MR->jobID) : false;
|
||||
$this->view->compile = $this->loadModel('compile')->getById($MR->compileID);
|
||||
$this->view->compileJob = $MR->jobID ? $this->job->getById($MR->jobID) : false;
|
||||
$this->view->projectOwner = $projectOwner;
|
||||
|
||||
$this->view->title = $this->lang->mr->view;
|
||||
$this->view->MR = $MR;
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ class mrModel extends model
|
||||
foreach($filterProjects as $gitlabID => $projects)
|
||||
{
|
||||
$projectIDList = array_keys($projects);
|
||||
if(!empty($projectIDList)) $filterProjectSql .= "(gitlabID = {$gitlabID} and sourceProject ".helper::dbIN($projectIDList).") or ";
|
||||
if(!empty($projectIDList)) $filterProjectSql .= "(gitlabID = {$gitlabID} and sourceProject " . helper::dbIN($projectIDList) . ") or ";
|
||||
}
|
||||
|
||||
if($filterProjectSql) $filterProjectSql = '(' . substr($filterProjectSql, 0, -3) . ')'; // Remove last or.
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
<?php common::printIcon('mr', 'edit', "mr=$MR->id", $MR, 'button', 'edit');?>
|
||||
<?php endif;?>
|
||||
<?php if($MR->synced and $rawMR->state == 'closed') common::printIcon('mr', 'reopen', "mr=$MR->id", $MR, 'button', 'restart', 'hiddenwin', 'mergeButton'); ?>
|
||||
<?php common::printIcon('mr', 'delete', "mr=$MR->id", $MR, 'button', 'trash', 'hiddenwin');?>
|
||||
<?php if($projectOwner) common::printIcon('mr', 'delete', "mr=$MR->id", $MR, 'button', 'trash', 'hiddenwin');?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1668,7 +1668,13 @@ class treeModel extends model
|
||||
{
|
||||
$this->dao->update(TABLE_MODULE)->set('root')->eq($module->root)->where('id')->in($childs)->exec();
|
||||
$this->dao->update(TABLE_MODULE)->set('branch')->eq($module->branch)->where('id')->in($childs)->exec();
|
||||
if($self->type == 'doc') $this->dao->update(TABLE_DOC)->set('`lib`')->eq($module->root)->where('module')->eq($moduleID)->exec();
|
||||
if($self->type == 'doc')
|
||||
{
|
||||
$this->dao->update(TABLE_DOC)->set('`lib`')->eq($module->root)
|
||||
->where('module')->eq($moduleID)
|
||||
->orWhere('module')->in($childs)
|
||||
->exec();
|
||||
}
|
||||
}
|
||||
$this->fixModulePath(isset($module->root) ? $module->root : $self->root, $self->type);
|
||||
if(isset($module->root) and $module->root != $self->root) $this->changeRoot($moduleID, $self->root, $module->root, $self->type);
|
||||
|
||||
@@ -754,6 +754,7 @@ class upgradeModel extends model
|
||||
$this->saveLogs('Execute 16_2');
|
||||
$this->execSQL($this->getUpgradeFile('16.2'));
|
||||
$this->updateSpaceTeam();
|
||||
$this->updateDocField();
|
||||
$this->appendExec('16_2');
|
||||
}
|
||||
|
||||
@@ -5459,8 +5460,8 @@ class upgradeModel extends model
|
||||
*/
|
||||
public function updateSpaceTeam()
|
||||
{
|
||||
$kanbanUsers = $this->dao->select("space, CONCAT(owner, ',', team) as users") ->from(TABLE_KANBAN)->fetchAll('space');
|
||||
$spaceUsers = $this->dao->select("id, CONCAT(owner, ',', team) as users")->from(TABLE_KANBANSPACE)->fetchAll('id');
|
||||
$kanbanUsers = $this->dao->select("space, CONCAT(owner, ',', team, ',', whitelist) as users") ->from(TABLE_KANBAN)->fetchAll('space');
|
||||
$spaceUsers = $this->dao->select("id, CONCAT(owner, ',', team, ',', whitelist) as users")->from(TABLE_KANBANSPACE)->fetchAll('id');
|
||||
|
||||
foreach($kanbanUsers as $spaceID => $kanban)
|
||||
{
|
||||
@@ -5474,6 +5475,8 @@ class upgradeModel extends model
|
||||
|
||||
$this->dao->update(TABLE_KANBANSPACE)->set('`team`')->eq($team)->where('id')->eq($spaceID)->exec();
|
||||
}
|
||||
$this->dao->update(TABLE_KANBANSPACE)->set('`whitelist`')->eq('')->exec();
|
||||
$this->dao->update(TABLE_KANBAN)->set('`whitelist`')->eq('')->exec();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -5581,4 +5584,23 @@ class upgradeModel extends model
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Document library for updating documents.
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function updateDocField()
|
||||
{
|
||||
$hasModuleDocs = $this->dao->select('*')->from(TABLE_DOC)->where('module')->ne(0)->fetchAll('id');
|
||||
$docModules = $this->dao->select('*')->from(TABLE_MODULE)->where('type')->eq('doc')->fetchAll('id');
|
||||
foreach($hasModuleDocs as $doc)
|
||||
{
|
||||
$libID = isset($docModules[$doc->module]->root) ? $docModules[$doc->module]->root : 0;
|
||||
if(!$libID or $libID == $doc->lib) continue;
|
||||
$this->dao->update(TABLE_DOC)->set('lib')->eq($libID)->where('id')->eq($doc->id)->exec();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user