This commit is contained in:
sgm0422
2020-07-16 14:12:46 +08:00
2 changed files with 5 additions and 4 deletions
+3 -3
View File
@@ -111,13 +111,13 @@ class releaseModel extends model
{
$productID = (int)$productID;
$branch = (int)$branch;
$buildID = 0;
$buildID = strpos($this->config->release->create->requiredFields, 'build') === false ? 0 : '';
/* Check date must be not more than today. */
if($this->post->date > date('Y-m-d')) return dao::$errors[] = $this->lang->release->errorDate;
/* Auto create build when release is not link build. */
if($this->post->build == false && $this->post->name)
if($this->post->build == false and $this->post->name and strpos($this->config->release->create->requiredFields, 'build') === false)
{
$build = $this->dao->select('*')->from(TABLE_BUILD)
->where('deleted')->eq('0')
@@ -161,7 +161,7 @@ class releaseModel extends model
->stripTags($this->config->release->editor->create['id'], $this->config->allowedTags)
->remove('allchecker,files,labels,uid')
->get();
$release = $this->loadModel('file')->processImgURL($release, $this->config->release->editor->create['id'], $this->post->uid);
$this->dao->insert(TABLE_RELEASE)->data($release)
->autoCheck()
+2 -1
View File
@@ -2492,6 +2492,7 @@ class taskModel extends model
{
$tasks = $this->dao->select('id,deadline')->from(TABLE_TASK)->alias('t1')
->where($this->reportCondition())
->orderBy('deadline asc')
->fetchAll('id');
if(!$tasks) return array();
@@ -2663,7 +2664,7 @@ class taskModel extends model
if(!isset($fields[$task->$field])) $fields[$task->$field] = 0;
$fields[$task->$field] ++;
}
asort($fields);
if($field != 'date' and $field != 'deadline') asort($fields);
foreach($fields as $field => $count)
{
$data = new stdclass();