* Determine if id is a number.

This commit is contained in:
holan20180123
2020-10-19 16:50:04 +08:00
parent b5ffeda25c
commit d0f2c2992f
+4 -3
View File
@@ -2748,10 +2748,11 @@ class bugModel extends model
if(strpos($action->extra, ':') !== false)
{
list($extra, $id) = explode(':', $action->extra);
$action->extra = $extra;
if($id)
if($id and is_numeric($id))
{
$name = $this->dao->select('title')->from(TABLE_BUG)->where('id')->eq($id)->fetch('title');
$action->extra = $extra;
$name = $this->dao->select('title')->from(TABLE_BUG)->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", 'html'), "#$id " . $name);
}
}