* [misc] Add the function of getProgram for tutorial.

This commit is contained in:
xieqiyu
2024-09-09 14:22:42 +08:00
committed by 唐胡成
parent 7dc28a9af9
commit e65ae671a0
3 changed files with 24 additions and 1 deletions
+2
View File
@@ -146,6 +146,8 @@ class programModel extends model
*/
public function getByID(int $programID = 0): object|false
{
if(common::isTutorialMode()) return $this->loadModel('tutorial')->getProgram();
$program = $this->fetchByID($programID);
if(!$program) return false;