* finish task #3455.

This commit is contained in:
wangyidong
2017-12-18 17:16:34 +08:00
parent ca394008be
commit 1060a606c6
5 changed files with 16 additions and 7 deletions
+1 -1
View File
@@ -800,7 +800,7 @@ class baseDAO
$this->setFields($field);
$result = $this->query()->fetch(PDO::FETCH_OBJ);
dao::$cache[$table][$key] = $result;
dao::$cache[$table][$key] = getRow($result);
return $result ? $result->$field : '';
}
+2 -2
View File
@@ -2512,13 +2512,13 @@ class storyModel extends model
$history = $this->action->getHistory($actionID);
$action->history = isset($history[$actionID]) ? $history[$actionID] : array();
$action->appendLink = '';
if(strpos($action->extra, ':')!== false)
if(strpos($action->extra, ':') !== false)
{
list($extra, $id) = explode(':', $action->extra);
$action->extra = $extra;
if($id)
{
$name = $this->dao->select('title')->from(TABLE_STORY)->where('id')->eq($id)->fetch('title');
$name = $this->dao->select('title')->from(TABLE_STORY)->where('id')->eq($id)->fetch('title');
if($name) $action->appendLink = html::a(zget($this->config->mail, 'domain', common::getSysURL()) . helper::createLink($action->objectType, 'view', "id=$id"), "#$id " . $name);
}
}
+4 -2
View File
@@ -173,10 +173,12 @@ $config->task->datatable->fieldList['closedReason']['fixed'] = 'no';
$config->task->datatable->fieldList['closedReason']['width'] = '80';
$config->task->datatable->fieldList['closedReason']['required'] = 'no';
$config->task->datatable->fieldList['story']['title'] = 'story';
global $lang;
$config->task->datatable->fieldList['story']['title'] = "S";
$config->task->datatable->fieldList['story']['fixed'] = 'no';
$config->task->datatable->fieldList['story']['width'] = '80';
$config->task->datatable->fieldList['story']['width'] = '30';
$config->task->datatable->fieldList['story']['required'] = 'no';
$config->task->datatable->fieldList['story']['name'] = $lang->task->story;
$config->task->datatable->fieldList['mailto']['title'] = 'mailto';
$config->task->datatable->fieldList['mailto']['fixed'] = 'no';
+8 -1
View File
@@ -2118,7 +2118,14 @@ class taskModel extends model
case 'story':
if(!empty($task->storyID))
{
if(!common::printLink('story', 'view', "storyid=$task->storyID", $task->storyTitle)) echo $task->storyTitle;
if(common::hasPriv('story', 'view'))
{
echo html::a(helper::createLink('story', 'view', "storyid=$task->storyID", 'html', true), "<i class='icon icon-{$this->lang->icons['story']}'></i>", '', "class='iframe' title='{$task->storyTitle}'");
}
else
{
echo $task->storyTitle;
}
}
break;
case 'mailto':
+1 -1
View File
@@ -1531,7 +1531,7 @@ class testcase extends control
$num = $out[1];
$sign = $out[2];
$signbit = $sign == '.' ? 1 : 3;
$step = trim(substr($step, strlen($num) + $signbit));
$step = trim(substr($step, strpos($step, $sign) + $signbit));
if(!empty($step)) $caseStep[$num]['content'] = $step;
$caseStep[$num]['type'] = 'step';
}