* refactory the logic: hasPriv then html::a instead common::printLink.

This commit is contained in:
wangyidong
2013-01-18 07:01:06 +00:00
parent 7d375914e2
commit 6e0513ad62
9 changed files with 21 additions and 235 deletions

View File

@@ -111,11 +111,11 @@ var browseType = '<?php echo $browseType;?>';
<td><?php echo $task->consumed;?></td>
<td><?php echo $task->left;?></td>
<td class='a-left' title="<?php echo $task->storyTitle?>">
<?php
$story = '';
if($task->storyID and common::hasPriv('story', 'view')) $story = html::a($this->createLink('story', 'view', "storyid=$task->storyID"), $task->storyTitle);
if($task->storyID and !common::hasPriv('story', 'view')) $story = $task->storyTitle;
echo $story;
<?php
if($task->storyID)
{
if(!common::printLink('story', 'view', "storyid=$task->storyID", $task->storyTitle)) print $task->storyTitle;
}
?>
</td>
<td class='a-right'>