* adjust for safe.
This commit is contained in:
@@ -1100,7 +1100,7 @@ class bugModel extends model
|
||||
if(!$this->loadModel('common')->checkField(TABLE_BUG, $type)) return array();
|
||||
$bugs = $this->dao->select('*')->from(TABLE_BUG)
|
||||
->where('deleted')->eq(0)
|
||||
->beginIF($type != 'all')->andWhere("$type")->eq($account)->fi()
|
||||
->beginIF($type != 'all')->andWhere("`$type`")->eq($account)->fi()
|
||||
->orderBy($orderBy)
|
||||
->beginIF($limit > 0)->limit($limit)->fi()
|
||||
->page($pager)
|
||||
|
||||
@@ -945,7 +945,7 @@ class taskModel extends model
|
||||
->leftjoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
|
||||
->leftjoin(TABLE_STORY)->alias('t3')->on('t1.story = t3.id')
|
||||
->where('t1.deleted')->eq(0)
|
||||
->beginIF($type != 'all')->andWhere("t1.$type")->eq($account)->fi()
|
||||
->beginIF($type != 'all')->andWhere("t1.`$type`")->eq($account)->fi()
|
||||
->orderBy($orderBy)
|
||||
->beginIF($limit > 0)->limit($limit)->fi()
|
||||
->page($pager)
|
||||
|
||||
@@ -173,7 +173,7 @@ class userModel extends model
|
||||
*/
|
||||
public function getById($userID, $field = 'account')
|
||||
{
|
||||
$user = $this->dao->select('*')->from(TABLE_USER)->where($field)->eq($userID)->fetch();
|
||||
$user = $this->dao->select('*')->from(TABLE_USER)->where("`$field`")->eq($userID)->fetch();
|
||||
if(!$user) return false;
|
||||
$user->last = date(DT_DATETIME1, $user->last);
|
||||
return $user;
|
||||
|
||||
Reference in New Issue
Block a user