diff options
| author | horus | 2020-07-23 17:15:11 +0200 |
|---|---|---|
| committer | horus | 2020-07-23 17:15:11 +0200 |
| commit | 675109d7344a222de5cf8bb843b1f7ec2942b69f (patch) | |
| tree | 9cbad6c83108649fc1be3bff7c1aa0c555c79c7d /app/helpers.php | |
| parent | 88c61db3a9c41886a74fa0d1c3e6fc71774e6e52 (diff) | |
| download | senpai-675109d7344a222de5cf8bb843b1f7ec2942b69f.tar.gz | |
Bugfix. Correctly detects airing anime.
Diffstat (limited to 'app/helpers.php')
| -rw-r--r-- | app/helpers.php | 8 |
1 files changed, 8 insertions, 0 deletions
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; +} |
