This commit is contained in:
wangyidong
2024-01-02 18:26:11 +08:00
parent 63a8e6366e
commit 6eb7806234
4 changed files with 7 additions and 6 deletions
+2 -2
View File
@@ -98,10 +98,10 @@ class program extends control
public function product(int $programID = 0, string $browseType = 'noclosed', string $orderBy = 'order_asc', int $recTotal = 0, int $recPerPage = 15, int $pageID = 1)
{
$programPairs = $this->program->getPairs();
if(!isset($programPairs[$programID]))
if($programID && !isset($programPairs[$programID]))
{
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'fail', 'message' => '404 Not found'));
return print(js::error($this->lang->notFound) . js::locate($this->createLink('program', 'browse')));
return $this->send(array('result' => 'fail', 'message' => $this->lang->notFound, 'load' => $this->createLink('program', 'browse')));
}
$programID = $this->program->checkAccess($programID, $programPairs);