@@ -9,9 +9,9 @@ discard block |
||
| 9 | 9 | $success = FALSE; |
| 10 | 10 | if(preg_match("/^[a-z0-9\\-_,:]{0,255}$/", $tag_string)) { |
| 11 | 11 | $success = (bool) $this->db->set(['tags' => $tag_string, 'active' => 'Y', 'last_updated' => NULL]) |
| 12 | - ->where('user_id', $userID) |
|
| 13 | - ->where('id', $chapterID) |
|
| 14 | - ->update('tracker_chapters'); |
|
| 12 | + ->where('user_id', $userID) |
|
| 13 | + ->where('id', $chapterID) |
|
| 14 | + ->update('tracker_chapters'); |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | if($success) { |
@@ -23,9 +23,9 @@ discard block |
||
| 23 | 23 | |
| 24 | 24 | public function getMalID(int $userID, int $titleID) : ?int { |
| 25 | 25 | $query = $this->db->select('tags') |
| 26 | - ->where('user_id', $userID) |
|
| 27 | - ->where('title_id', $titleID) |
|
| 28 | - ->get('tracker_chapters'); |
|
| 26 | + ->where('user_id', $userID) |
|
| 27 | + ->where('title_id', $titleID) |
|
| 28 | + ->get('tracker_chapters'); |
|
| 29 | 29 | |
| 30 | 30 | $malID = NULL; |
| 31 | 31 | if($query->num_rows() > 0 && ($tag_string = $query->row()->tags) && !is_null($tag_string)) { |
@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php declare(strict_types=1); defined('BASEPATH') OR exit('No direct script access allowed'); |
|
| 1 | +<?php declare(strict_types = 1); defined('BASEPATH') OR exit('No direct script access allowed'); |
|
| 2 | 2 | |
| 3 | 3 | class Tracker_Tag_Model extends Tracker_Base_Model { |
| 4 | 4 | public function __construct() { |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | return $success; |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | - public function getMalID(int $userID, int $titleID) : ?int { |
|
| 24 | + public function getMalID(int $userID, int $titleID) : ? int { |
|
| 25 | 25 | $query = $this->db->select('tags') |
| 26 | 26 | ->where('user_id', $userID) |
| 27 | 27 | ->where('title_id', $titleID) |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | $malID = NULL; |
| 31 | 31 | if($query->num_rows() > 0 && ($tag_string = $query->row()->tags) && !is_null($tag_string)) { |
| 32 | - $arr = preg_grep('/^mal:([0-9]+)$/', explode(',', $tag_string)); |
|
| 32 | + $arr = preg_grep('/^mal:([0-9]+)$/', explode(',', $tag_string)); |
|
| 33 | 33 | if(!is_null($arr)) { |
| 34 | 34 | $malID = (int) explode(':', $arr[0])[1]; |
| 35 | 35 | } |