From abacccd18033b950b28296ee4296ffcbc0cf70f3 Mon Sep 17 00:00:00 2001 From: "shiyangyangwork@yahoo.cn" Date: Sat, 4 Feb 2012 00:56:47 +0000 Subject: [PATCH] * finish the task #690. --- lib/dao/dao.class.php | 14 ++++++++++++++ module/build/model.php | 2 -- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lib/dao/dao.class.php b/lib/dao/dao.class.php index 6650d9cc67..79913937f6 100755 --- a/lib/dao/dao.class.php +++ b/lib/dao/dao.class.php @@ -1536,6 +1536,20 @@ class sql return $this; } + /** + * Create the find_in_set by part. + * + * @param int $str + * @param int $strList + * @access public + * @return object the sql object. + */ + public function findInSet($str, $strList) + { + if($this->inCondition and !$this->conditionIsTrue) return $this; + $this->sql .= "FIND_IN_SET(" . $str . "," . $strList . ")"; + } + /** * Create the order by part. * diff --git a/module/build/model.php b/module/build/model.php index ff176b268a..e0027f909b 100644 --- a/module/build/model.php +++ b/module/build/model.php @@ -141,8 +141,6 @@ class buildModel extends model ->join('stories', ',') ->join('bugs', ',') ->get(); - if(empty($build->stories)) $build->stories = ''; - if(empty($build->bugs)) $build->bugs = ''; $this->dao->update(TABLE_BUILD)->data($build) ->autoCheck() ->batchCheck($this->config->build->edit->requiredFields, 'notempty')