Merge branch 'master' of https://github.com/easysoft/zentaopms
This commit is contained in:
+1
-2
@@ -3,6 +3,5 @@ CREATE TABLE `zt_dinguserid` (
|
||||
`webhook` mediumint(8) unsigned NOT NULL,
|
||||
`account` varchar(30) NOT NULL,
|
||||
`userid` varchar(255) NOT NULL,
|
||||
UNIQUE KEY `webhook_account_userid` (`webhook`,`account`,`userid`)
|
||||
UNIQUE KEY `webhook_account` (`webhook`,`account`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
DROP TABLE IF EXISTS `zt_translation`;
|
||||
|
||||
@@ -33,7 +33,7 @@ class control extends baseControl
|
||||
{
|
||||
parent::__construct($moduleName, $methodName, $appName);
|
||||
|
||||
$this->setConcept();
|
||||
if(!defined('IN_INSTALL') and !defined('IN_UPGRADE')) $this->setConcept();
|
||||
|
||||
if(!isset($this->config->bizVersion)) return false;
|
||||
/* Code for task #9224. Set requiredFields for workflow. */
|
||||
@@ -57,8 +57,9 @@ class control extends baseControl
|
||||
*/
|
||||
public function setConcept()
|
||||
{
|
||||
if(isset($this->app->user) and $this->app->user->admin != 'super') return true;
|
||||
if(empty($this->app->user->admin)) return true;
|
||||
if($this->app->getModuleName() == 'user' and strpos("login,logout", $this->app->getMethodName()) !== false) return true;
|
||||
if($this->app->getModuleName() == 'my' and $this->app->getMethodName() == 'changepassword') return true;
|
||||
|
||||
if($this->app->getModuleName() == 'custom' and $this->app->getMethodName() == 'setConcept') return true;
|
||||
if(!isset($this->config->conceptSetted) and $this->app->getMethodName() != 'concept')
|
||||
|
||||
@@ -95,7 +95,7 @@ class router extends baseRouter
|
||||
/* Set productCommon and projectCommon for flow. */
|
||||
if($moduleName == 'common')
|
||||
{
|
||||
$productProject = false;
|
||||
$productProject = $storyRequirement = $hourPoint = false;
|
||||
if($this->dbh and !empty($this->config->db->name))
|
||||
{
|
||||
global $config;
|
||||
|
||||
@@ -520,6 +520,12 @@ class customModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set story or requirement.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function setStoryRequirement()
|
||||
{
|
||||
$this->loadModel('setting')->setItem('system.custom.storyRequirement', $this->post->storyRequirement);
|
||||
@@ -533,6 +539,12 @@ class customModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set hour or story point.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function setHourPoint()
|
||||
{
|
||||
$this->loadModel('setting')->setItem('system.custom.hourPoint', $this->post->hourPoint);
|
||||
|
||||
@@ -9,25 +9,13 @@
|
||||
* @version $Id: deny.html.php 4129 2013-01-18 01:58:14Z wwccss $
|
||||
*/
|
||||
?>
|
||||
<?php if(isset($this->config->conceptSetted)):?>
|
||||
<?php include 'header.html.php';?>
|
||||
<?php else:?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<?php endif;?>
|
||||
<?php if(isset($this->config->conceptSetted)):?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<div class='heading'>
|
||||
<strong><?php echo $lang->custom->concept?></strong>
|
||||
</div>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div class='container'>
|
||||
<div class='modal-dialog'>
|
||||
<div class='modal-header'>
|
||||
<strong><?php echo $lang->custom->concept?></strong>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<form id='ajaxForm' method='post'>
|
||||
<div class='modal-body'>
|
||||
<div class="form-group">
|
||||
@@ -42,7 +30,7 @@
|
||||
<?php endif;?>
|
||||
<div class="form-group">
|
||||
<label><?php echo $lang->custom->conceptQuestions['storypoint'];?></label>
|
||||
<div class="checkbox"> <?php echo html::radio('hourPoint', $lang->custom->conceptOptions->hourPoint, '0')?> </div>
|
||||
<div class="checkbox"> <?php echo html::radio('hourPoint', $lang->custom->conceptOptions->hourPoint, zget($this->config->custom, 'hourPoint'))?> </div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label></label>
|
||||
@@ -50,11 +38,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<?php if(isset($this->config->conceptSetted)):?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php else:?>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -189,8 +189,9 @@ class project extends control
|
||||
$memberPairs = array();
|
||||
foreach($this->view->teamMembers as $key => $member) $memberPairs[$key] = $member->realname;
|
||||
|
||||
$extra = (isset($this->config->project->task->allModule) && $this->config->project->task->allModule == 1) ? 'allModule' : '';
|
||||
$showModule = !empty($this->config->datatable->projectTask->showModule) ? $this->config->datatable->projectTask->showModule : '';
|
||||
$showAllModule = isset($this->config->project->task->allModule) ? $this->config->project->task->allModule : '';
|
||||
$extra = (isset($this->config->project->task->allModule) && $this->config->project->task->allModule == 1) ? 'allModule' : '';
|
||||
$showModule = !empty($this->config->datatable->projectTask->showModule) ? $this->config->datatable->projectTask->showModule : '';
|
||||
$this->view->modulePairs = $showModule ? $this->tree->getModulePairs($projectID, 'task', $showModule) : array();
|
||||
|
||||
/* Assign. */
|
||||
@@ -208,7 +209,7 @@ class project extends control
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->project = $project;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->modules = $this->tree->getTaskOptionMenu($projectID);
|
||||
$this->view->modules = $this->tree->getTaskOptionMenu($projectID, 0, 0, $showAllModule ? 'allModule' : '');
|
||||
$this->view->moduleID = $moduleID;
|
||||
$this->view->moduleTree = $this->tree->getTaskTreeMenu($projectID, $productID, $startModuleID = 0, array('treeModel', 'createTaskLink'), $extra);
|
||||
$this->view->memberPairs = $memberPairs;
|
||||
@@ -1117,6 +1118,18 @@ class project extends control
|
||||
}
|
||||
}
|
||||
|
||||
if(strpos($this->config->custom->productProject, '_2'))
|
||||
{
|
||||
$this->view->isSprint = true;
|
||||
unset($this->lang->project->typeList['waterfall']);
|
||||
unset($this->lang->project->typeList['ops']);
|
||||
|
||||
unset($this->lang->project->endList[62]);
|
||||
unset($this->lang->project->endList[93]);
|
||||
unset($this->lang->project->endList[186]);
|
||||
unset($this->lang->project->endList[365]);
|
||||
}
|
||||
|
||||
$projectID = key($this->projects);
|
||||
if($this->session->project) $projectID = $this->session->project;
|
||||
$this->project->setMenu($this->projects, $projectID);
|
||||
@@ -1206,6 +1219,19 @@ class project extends control
|
||||
$productPlans[$product->id] = $this->productplan->getPairs($product->id);
|
||||
}
|
||||
|
||||
if(strpos($this->config->custom->productProject, '_2'))
|
||||
{
|
||||
$this->view->isSprint = true;
|
||||
|
||||
unset($this->lang->project->typeList['waterfall']);
|
||||
unset($this->lang->project->typeList['ops']);
|
||||
|
||||
unset($this->lang->project->endList[62]);
|
||||
unset($this->lang->project->endList[93]);
|
||||
unset($this->lang->project->endList[186]);
|
||||
unset($this->lang->project->endList[365]);
|
||||
}
|
||||
|
||||
$this->view->title = $title;
|
||||
$this->view->position = $position;
|
||||
$this->view->projects = $projects;
|
||||
|
||||
@@ -77,11 +77,13 @@
|
||||
<th><?php echo $lang->project->teamname;?></th>
|
||||
<td><?php echo html::input('team', $team, "class='form-control'");?></td><td></td><td></td>
|
||||
</tr>
|
||||
<?php if(!$isSprint):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->type;?></th>
|
||||
<td><?php echo html::select('type', $lang->project->typeList, '', "class='form-control' onchange='showTypeTips()'");?></td>
|
||||
<td class='muted' colspan='2'><div class='type-tips'><?php echo $lang->project->typeDesc;?></div></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr class='hide'>
|
||||
<th><?php echo $lang->project->status;?></th>
|
||||
<td><?php echo html::hidden('status', 'wait');?></td>
|
||||
@@ -154,6 +156,7 @@
|
||||
<td colspan='4' class='text-center form-actions'>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php echo html::backButton();?>
|
||||
<?php if($isSprint) echo html::hidden('type', 'sprint');?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -60,10 +60,12 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if(!$isSprint):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->type;?></th>
|
||||
<td><?php echo html::select('type', $lang->project->typeList, $project->type, "class='form-control'");?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->teamname;?></th>
|
||||
<td><?php echo html::input('team', $project->team, "class='form-control'");?></td>
|
||||
|
||||
@@ -246,7 +246,7 @@ $lang->story->report->select = '请选择报表类型';
|
||||
$lang->story->report->create = '生成报表';
|
||||
$lang->story->report->value = "{$lang->storyCommon}数";
|
||||
|
||||
$lang->story->report->charts['storysPerProduct'] = $lang->productCommon . '{$lang->storyCommon}数量';
|
||||
$lang->story->report->charts['storysPerProduct'] = $lang->productCommon . "{$lang->storyCommon}数量";
|
||||
$lang->story->report->charts['storysPerModule'] = "模块{$lang->storyCommon}数量";
|
||||
$lang->story->report->charts['storysPerSource'] = "按{$lang->storyCommon}来源统计";
|
||||
$lang->story->report->charts['storysPerPlan'] = '按计划进行统计';
|
||||
|
||||
@@ -536,7 +536,7 @@ class upgradeModel extends model
|
||||
$this->execSQL($this->getUpgradeFile('11.6.5'));
|
||||
$this->fixGroupAcl();
|
||||
$this->fixBugTypeList();
|
||||
$this->adjustPriv11_6_6();
|
||||
$this->adjustPriv11_7();
|
||||
$this->rmEditorAndTranslateDir();
|
||||
$this->setConceptSetted();
|
||||
$this->appendExec('11_6_5');
|
||||
@@ -3424,12 +3424,12 @@ class upgradeModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Adjust 11.6.6 priv.
|
||||
* Adjust 11.7 priv.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function adjustPriv11_6_6()
|
||||
public function adjustPriv11_7()
|
||||
{
|
||||
$this->saveLogs('Run Method ' . __FUNCTION__);
|
||||
|
||||
|
||||
@@ -11,6 +11,14 @@
|
||||
*/
|
||||
class webhook extends control
|
||||
{
|
||||
/**
|
||||
* Construct
|
||||
*
|
||||
* @param string $moduleName
|
||||
* @param string $methodName
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($moduleName = '', $methodName = '')
|
||||
{
|
||||
parent::__construct($moduleName, $methodName);
|
||||
|
||||
@@ -221,6 +221,8 @@ class webhookModel extends model
|
||||
public function bind($webhookID)
|
||||
{
|
||||
$data = fixer::input('post')->get();
|
||||
|
||||
$this->dao->delete()->from(TABLE_DINGUSERID)->where('account')->in(array_keys($data->userid))->exec();
|
||||
foreach($data->userid as $account => $userid)
|
||||
{
|
||||
if(empty($userid)) continue;
|
||||
@@ -229,7 +231,7 @@ class webhookModel extends model
|
||||
$dingUser->webhook = $webhookID;
|
||||
$dingUser->account = $account;
|
||||
$dingUser->userid = $userid;
|
||||
$this->dao->replace(TABLE_DINGUSERID)->data($dingUser)->exec();
|
||||
$this->dao->insert(TABLE_DINGUSERID)->data($dingUser)->exec();
|
||||
}
|
||||
return !dao::isError();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user