* Finisha task.
This commit is contained in:
@@ -705,7 +705,7 @@ class program extends control
|
||||
}
|
||||
|
||||
/**
|
||||
* ajax get childish information.
|
||||
* Ajax: Get childish information.
|
||||
*
|
||||
* @param int $programID
|
||||
* @access public
|
||||
@@ -713,15 +713,11 @@ class program extends control
|
||||
*/
|
||||
public function ajaxGetChildInfo($programID)
|
||||
{
|
||||
$children = $this->program->getChildren($programID);
|
||||
$data = array();
|
||||
$minChildBegin = $this->dao->select('begin as minBegin')->from(TABLE_PROGRAM)->where('id')->ne($programID)->andWhere('deleted')->eq(0)->andWhere('path')->like("%,{$programID},%")->orderBy('begin_asc')->fetch('minBegin');
|
||||
$maxChildEnd = $this->dao->select('end as maxEnd')->from(TABLE_PROGRAM)->where('id')->ne($programID)->andWhere('deleted')->eq(0)->andWhere('path')->like("%,{$programID},%")->andWhere('end')->ne('0000-00-00')->orderBy('end_desc')->fetch('maxEnd');
|
||||
|
||||
if($children > 0)
|
||||
{
|
||||
$minChildBegin = $this->dao->select('begin as minBegin')->from(TABLE_PROGRAM)->where('id')->ne($programID)->andWhere('deleted')->eq(0)->andWhere('path')->like("%,{$programID},%")->orderBy('begin_asc')->fetch();
|
||||
$maxChildEnd = $this->dao->select('end as maxEnd')->from(TABLE_PROGRAM)->where('id')->ne($programID)->andWhere('deleted')->eq(0)->andWhere('path')->like("%,{$programID},%")->andWhere('end')->ne('0000-00-00')->orderBy('end_desc')->fetch();
|
||||
}
|
||||
|
||||
$data = array('minChildBegin' => $minChildBegin->minBegin, 'maxChildEnd' => $maxChildEnd->maxEnd);
|
||||
$data = array('minChildBegin' => $minChildBegin, 'maxChildEnd' => $maxChildEnd);
|
||||
echo json_encode($data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user