From 675109d7344a222de5cf8bb843b1f7ec2942b69f Mon Sep 17 00:00:00 2001 From: horus Date: Thu, 23 Jul 2020 17:15:11 +0200 Subject: Bugfix. Correctly detects airing anime. --- app/helpers.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/helpers.php') diff --git a/app/helpers.php b/app/helpers.php index 0953a56..7ac1fd6 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -58,3 +58,11 @@ function printScoreData($score_array) { return $return; } + +function getAiringStatusCode($airing_status) { + $status = DB::select("SELECT id FROM airing_status WHERE status = ?", array($airing_status)); + if ( empty($status) ) { + return 4; + } + return $status[0]->id; +} -- cgit v1.2.3