* fix bug for fulltext search and action.

This commit is contained in:
王怡栋
2021-08-11 13:57:55 +08:00
parent 925d78059f
commit f5caade0e4
3 changed files with 3 additions and 5 deletions
+1 -1
View File
@@ -965,7 +965,7 @@ class actionModel extends model
$objectName = array();
$objectProject = array();
if(strpos($this->config->action->needGetProjectType, $objectType) !== false)
if(strpos(",{$this->config->action->needGetProjectType},", ",{$objectType},") !== false)
{
$objectInfo = $this->dao->select("id, project, $field AS name")->from($table)->where('id')->in($objectIds)->fetchAll();
foreach($objectInfo as $object)
+1 -3
View File
@@ -44,13 +44,11 @@ class projectreleaseModel extends model
* Get list of releases.
*
* @param int $projectID
* @param int $productID
* @param int $branch
* @param string $type
* @access public
* @return array
*/
public function getList($projectID, $productID, $branch = 0, $type = 'all')
public function getList($projectID, $type = 'all')
{
return $this->dao->select('t1.*, t2.name as productName, t3.id as buildID, t3.name as buildName, t3.execution, t4.name as executionName')
->from(TABLE_RELEASE)->alias('t1')
+1 -1
View File
@@ -701,7 +701,7 @@ class searchModel extends model
if(empty($savedDict)) $savedDict = $this->dao->select("`key`")->from(TABLE_SEARCHDICT)->fetchPairs('key', 'key');
foreach($dict as $key => $value)
{
if(!is_numeric($key) or empty($value) or strlen($key) != 5) continue;
if(!is_numeric($key) or empty($value) or strlen($key) != 5 or $key < 0) continue;
if(isset($savedDict[$key])) continue;
$this->dao->insert(TABLE_SEARCHDICT)->data(array('key' => $key, 'value' => $value))->exec();