* adjust the action table, add extra field.

This commit is contained in:
wangchunsheng
2010-02-08 01:28:09 +00:00
parent 34a21be799
commit cc23c1b938
2 changed files with 7 additions and 0 deletions

View File

@@ -100,3 +100,7 @@ ALTER TABLE `zt_task` ADD `storyVersion` SMALLINT NOT NULL DEFAULT '1' AFTER `st
-- 删除releation表。
DROP TABLE `zt_releation`;
-- 20100208 调整action表增加extra字段
ALTER TABLE `zt_action` ADD `extra` VARCHAR( 255 ) NOT NULL AFTER `id`;
UPDATE zt_action SET extra = substr( ACTION , 13 ) , ACTION = 'Resolved' WHERE ACTION LIKE 'Resolved%';

View File

@@ -6,6 +6,9 @@
<?php
if(isset($users[$action->actor])) $action->actor = $users[$action->actor];
if(strpos($action->actor, ':') !== false) $action->actor = substr($action->actor, strpos($action->actor, ':') + 1);
if($action->objectType == 'bug' and $action->action == 'Resolved') $action->action .= " as $action->extra";
if($action->objectType == 'story' and $action->action == 'Reviewed') $action->action .= " as $action->extra";
if($action->objectType == 'story' and $action->action == 'Closed') $action->action .= " for $action->extra";
?>
<span><?php echo "$action->date, <strong>$action->action</strong> by <strong>$action->actor</strong>"; ?></span>
<?php if(!empty($action->comment) or !empty($action->history)):?>