summaryrefslogtreecommitdiff
path: root/app/helpers.php
diff options
context:
space:
mode:
authorhorus2020-07-23 17:15:11 +0200
committerhorus2020-07-23 17:15:11 +0200
commit675109d7344a222de5cf8bb843b1f7ec2942b69f (patch)
tree9cbad6c83108649fc1be3bff7c1aa0c555c79c7d /app/helpers.php
parent88c61db3a9c41886a74fa0d1c3e6fc71774e6e52 (diff)
downloadsenpai-675109d7344a222de5cf8bb843b1f7ec2942b69f.tar.gz
Bugfix. Correctly detects airing anime.
Diffstat (limited to 'app/helpers.php')
-rw-r--r--app/helpers.php8
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;
+}