@@ -10,7 +10,7 @@ |
||
10 | 10 | <?=form_input($form_url)?> |
11 | 11 | </div> |
12 | 12 | |
13 | - <?=form_input('website','', ['id' => 'website'])?> |
|
13 | + <?=form_input('website', '', ['id' => 'website'])?> |
|
14 | 14 | |
15 | 15 | <?=validation_errors()?><?=($issue_submitted ? "Issue successfully submitted" : "")?> |
16 | 16 | <button type="submit" class="btn btn-primary">Submit</button> | Alternatively, post an issue on our <?=anchor('https://github.com/DakuTree/manga-tracker/issues/new', 'Github page')?>. |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | private $className; |
10 | 10 | |
11 | 11 | public function __construct() { |
12 | - if(isset($_SERVER['argv']) && count($_SERVER['argv']) === 3){ |
|
12 | + if(isset($_SERVER['argv']) && count($_SERVER['argv']) === 3) { |
|
13 | 13 | $this->baseURL = rtrim($_SERVER['argv'][1], '/'); |
14 | 14 | $this->className = $_SERVER['argv'][2]; |
15 | 15 | |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | $this->updateDocs(); |
31 | 31 | |
32 | - $domain = preg_replace('#^https?://(.*?)(?:/.*?)?$#', '$1', $this->baseURL); |
|
32 | + $domain = preg_replace('#^https?://(.*?)(?:/.*?)?$#', '$1', $this->baseURL); |
|
33 | 33 | say("\nAdmin SQL:"); |
34 | 34 | say("INSERT INTO `mangatracker_development`.`tracker_sites` (`id`, `site`, `site_class`, `status`, `use_custom`) VALUES (NULL, '{$domain}', '{$this->className}', 'enabled', 'Y');"); |
35 | 35 | say("INSERT INTO `mangatracker_production`.`tracker_sites` (`id`, `site`, `site_class`, `status`, `use_custom`) VALUES (NULL, '{$domain}', '{$this->className}', 'enabled', 'Y');"); |
@@ -108,12 +108,12 @@ discard block |
||
108 | 108 | |
109 | 109 | //Update @updated |
110 | 110 | $currentDate = date("Y-m-d", time()); |
111 | - $baseFile = str_replace("@updated {$matches[1]}","@updated {$currentDate}", $baseFile); |
|
111 | + $baseFile = str_replace("@updated {$matches[1]}", "@updated {$currentDate}", $baseFile); |
|
112 | 112 | |
113 | 113 | //Update @version |
114 | 114 | $currentVersion = explode('.', $matches[2]); |
115 | - $newVersion = "{$currentVersion[0]}.{$currentVersion[1]}.". (((int) $currentVersion[2]) + 1); |
|
116 | - $baseFile = str_replace("@version {$matches[2]}","@version {$newVersion}", $baseFile); |
|
115 | + $newVersion = "{$currentVersion[0]}.{$currentVersion[1]}.".(((int) $currentVersion[2]) + 1); |
|
116 | + $baseFile = str_replace("@version {$matches[2]}", "@version {$newVersion}", $baseFile); |
|
117 | 117 | |
118 | 118 | //Add @require |
119 | 119 | // @resource fontAwesome |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | $this->header_data['page'] = "report-issue"; |
13 | 13 | |
14 | 14 | $this->form_validation->set_rules('issue_description', 'Description', 'required|max_length[1000]'); |
15 | - $this->form_validation->set_rules('issue_url', 'URL', 'valid_url'); |
|
15 | + $this->form_validation->set_rules('issue_url', 'URL', 'valid_url'); |
|
16 | 16 | |
17 | 17 | |
18 | 18 | $this->body_data['issue_submitted'] = FALSE; |
@@ -21,9 +21,9 @@ discard block |
||
21 | 21 | |
22 | 22 | if(!empty($this->input->post('website'))) { |
23 | 23 | $this->body_data['issue_submitted'] = FALSE; |
24 | - log_message('error', 'Bot attempting to spam report issue form: "' . $this->input->post('issue_description') . '"'); |
|
24 | + log_message('error', 'Bot attempting to spam report issue form: "'.$this->input->post('issue_description').'"'); |
|
25 | 25 | } else { |
26 | - $this->body_data['issue_submitted'] = $this->Tracker->issue->report("USERID:" . $this->User->id . " ||| " . $this->input->post('issue_description'), NULL, $this->input->post('issue_url')); |
|
26 | + $this->body_data['issue_submitted'] = $this->Tracker->issue->report("USERID:".$this->User->id." ||| ".$this->input->post('issue_description'), NULL, $this->input->post('issue_url')); |
|
27 | 27 | } |
28 | 28 | } |
29 | 29 |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php declare(strict_types=1); defined('BASEPATH') OR exit('No direct script access allowed'); |
2 | 2 | |
3 | 3 | include_once APPPATH.'models/Tracker/Tracker_Base_Model.php'; |
4 | -foreach (glob(APPPATH.'models/Tracker/*.php') as $filename) { |
|
4 | +foreach(glob(APPPATH.'models/Tracker/*.php') as $filename) { |
|
5 | 5 | /** @noinspection PhpIncludeInspection */ |
6 | 6 | include_once $filename; |
7 | 7 | } |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | $query = $this->db->select('value_str, value_int') |
201 | 201 | ->from('user_options') |
202 | 202 | ->where('user_id', $userID) |
203 | - ->where('name', $option) |
|
203 | + ->where('name', $option) |
|
204 | 204 | ->limit(1); |
205 | 205 | $data = $query->get()->row_array(); |
206 | 206 | } else { |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | $query = $this->db->select('value_str, value_int') |
209 | 209 | ->from('user_options') |
210 | 210 | ->where('user_id', $userID) |
211 | - ->where('name', $option) |
|
211 | + ->where('name', $option) |
|
212 | 212 | ->limit(1); |
213 | 213 | $data = $query->get()->row_array(); |
214 | 214 | $this->session->set_tempdata("option_{$option}", $data, 3600); |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | ); |
262 | 262 | //FIXME: Get a better solution than str_replace for removing special characters |
263 | 263 | $elements = array(); |
264 | - foreach (array_values($this->options[$option]['valid_options']) as $valid_option) { |
|
264 | + foreach(array_values($this->options[$option]['valid_options']) as $valid_option) { |
|
265 | 265 | $elements[$option.'_'.str_replace(',', '_', $valid_option)] = array_merge($base_attributes, array( |
266 | 266 | 'value' => $valid_option |
267 | 267 | )); |
@@ -57,7 +57,7 @@ |
||
57 | 57 | foreach($result as $row) { |
58 | 58 | $arrRow = []; |
59 | 59 | |
60 | - $arrRow['updated_at'] = $row->updated_at; |
|
60 | + $arrRow['updated_at'] = $row->updated_at; |
|
61 | 61 | |
62 | 62 | $newChapterData = $this->Tracker->sites->{$row->site_class}->getChapterData($row->title_url, $row->new_chapter); |
63 | 63 | $arrRow['new_chapter'] = "<a href=\"{$newChapterData['url']}\">{$newChapterData['number']}</a>"; |
@@ -28,7 +28,7 @@ |
||
28 | 28 | ], FALSE) |
29 | 29 | ->from('tracker_chapters') |
30 | 30 | ->join('tracker_titles', 'tracker_titles.id = tracker_chapters.title_id', 'left') |
31 | - ->join('tracker_sites','tracker_titles.site_id = tracker_sites.id', 'left') |
|
31 | + ->join('tracker_sites', 'tracker_titles.site_id = tracker_sites.id', 'left') |
|
32 | 32 | ->where('tracker_sites.status', 'enabled') |
33 | 33 | ->group_by('tracker_chapters.title_id') |
34 | 34 | ->having('count > 1') |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | |
62 | 62 | $arr = []; |
63 | 63 | if($query->num_rows() > 0) { |
64 | - foreach ($query->result() as $row) { |
|
64 | + foreach($query->result() as $row) { |
|
65 | 65 | $arr[$row->category][] = [ |
66 | 66 | 'site' => $row->site, |
67 | 67 | 'title_url' => $row->title_url, |
@@ -94,15 +94,15 @@ discard block |
||
94 | 94 | $enclosure_esc = preg_quote($enclosure, '/'); |
95 | 95 | |
96 | 96 | $output = array(); |
97 | - foreach ($fields as $field) { |
|
98 | - if ($field === NULL && $nullToMysqlNull) { |
|
97 | + foreach($fields as $field) { |
|
98 | + if($field === NULL && $nullToMysqlNull) { |
|
99 | 99 | $output[] = 'NULL'; |
100 | 100 | continue; |
101 | 101 | } |
102 | 102 | |
103 | 103 | // Enclose fields containing $delimiter, $enclosure or whitespace |
104 | - if ($encloseAll || preg_match("/(?:${delimiter_esc}|${enclosure_esc}|\s)/", $field)) { |
|
105 | - $output[] = $enclosure . str_replace($enclosure, $enclosure . $enclosure, $field) . $enclosure; |
|
104 | + if($encloseAll || preg_match("/(?:${delimiter_esc}|${enclosure_esc}|\s)/", $field)) { |
|
105 | + $output[] = $enclosure.str_replace($enclosure, $enclosure.$enclosure, $field).$enclosure; |
|
106 | 106 | } else { |
107 | 107 | $output[] = $field; |
108 | 108 | } |
@@ -116,10 +116,10 @@ discard block |
||
116 | 116 | $csvArr[] = $headers; |
117 | 117 | } |
118 | 118 | |
119 | - foreach ($fields as $field) { |
|
120 | - $csvArr[] = $this->arrayToCSV($field, $delimiter, $enclosure,$encloseAll,$nullToMysqlNull); |
|
119 | + foreach($fields as $field) { |
|
120 | + $csvArr[] = $this->arrayToCSV($field, $delimiter, $enclosure, $encloseAll, $nullToMysqlNull); |
|
121 | 121 | } |
122 | 122 | |
123 | - return implode(PHP_EOL,$csvArr); |
|
123 | + return implode(PHP_EOL, $csvArr); |
|
124 | 124 | } |
125 | 125 | } |
@@ -33,13 +33,13 @@ discard block |
||
33 | 33 | ]; |
34 | 34 | } |
35 | 35 | if($result->num_rows() > 0) { |
36 | - foreach ($result->result() as $row) { |
|
36 | + foreach($result->result() as $row) { |
|
37 | 37 | $is_unread = intval((is_null($row->latest_chapter)) || ($row->latest_chapter == $row->ignore_chapter) || ($row->latest_chapter == $row->current_chapter) ? '1' : '0'); |
38 | 38 | $arr['series'][$row->category]['unread_count'] = (($arr['series'][$row->category]['unread_count'] ?? 0) + !$is_unread); |
39 | 39 | $data = [ |
40 | 40 | 'id' => $row->id, |
41 | 41 | 'generated_current_data' => $this->sites->{$row->site_class}->getChapterData($row->title_url, $row->current_chapter), |
42 | - 'generated_latest_data' => !is_null($row->latest_chapter) ? $this->sites->{$row->site_class}->getChapterData($row->title_url, $row->latest_chapter) : ['url' => '#', 'number' => 'No chapters found'] , |
|
42 | + 'generated_latest_data' => !is_null($row->latest_chapter) ? $this->sites->{$row->site_class}->getChapterData($row->title_url, $row->latest_chapter) : ['url' => '#', 'number' => 'No chapters found'], |
|
43 | 43 | 'generated_ignore_data' => ($row->ignore_chapter ? $this->sites->{$row->site_class}->getChapterData($row->title_url, $row->ignore_chapter) : NULL), |
44 | 44 | |
45 | 45 | 'full_title_url' => $this->sites->{$row->site_class}->getFullTitleURL($row->title_url), |
@@ -90,8 +90,8 @@ discard block |
||
90 | 90 | $sortOrder = $this->User_Options->get('list_sort_order', $userID); |
91 | 91 | switch($this->User_Options->get('list_sort_type', $userID)) { |
92 | 92 | case 'unread': |
93 | - foreach (array_keys($arr['series']) as $category) { |
|
94 | - usort($arr['series'][$category]['manga'], function ($a, $b) use($sortOrder) { |
|
93 | + foreach(array_keys($arr['series']) as $category) { |
|
94 | + usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) { |
|
95 | 95 | $a_text = strtolower("{$a['new_chapter_exists']} - {$a['title_data']['title']}"); |
96 | 96 | $b_text = strtolower("{$b['new_chapter_exists']} - {$b['title_data']['title']}"); |
97 | 97 | |
@@ -105,8 +105,8 @@ discard block |
||
105 | 105 | break; |
106 | 106 | |
107 | 107 | case 'unread_latest': |
108 | - foreach (array_keys($arr['series']) as $category) { |
|
109 | - usort($arr['series'][$category]['manga'], function ($a, $b) use($sortOrder) { |
|
108 | + foreach(array_keys($arr['series']) as $category) { |
|
109 | + usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) { |
|
110 | 110 | $a_text = $a['new_chapter_exists']; |
111 | 111 | $b_text = $b['new_chapter_exists']; |
112 | 112 | |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | break; |
128 | 128 | |
129 | 129 | case 'alphabetical': |
130 | - foreach (array_keys($arr['series']) as $category) { |
|
130 | + foreach(array_keys($arr['series']) as $category) { |
|
131 | 131 | usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) { |
132 | 132 | $a_text = strtolower("{$a['title_data']['title']}"); |
133 | 133 | $b_text = strtolower("{$b['title_data']['title']}"); |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | break; |
143 | 143 | |
144 | 144 | case 'my_status': |
145 | - foreach (array_keys($arr['series']) as $category) { |
|
145 | + foreach(array_keys($arr['series']) as $category) { |
|
146 | 146 | usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) { |
147 | 147 | $a_text = strtolower("{$a['generated_current_data']['number']}"); |
148 | 148 | $b_text = strtolower("{$b['generated_current_data']['number']}"); |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | break; |
158 | 158 | |
159 | 159 | case 'latest': |
160 | - foreach (array_keys($arr['series']) as $category) { |
|
160 | + foreach(array_keys($arr['series']) as $category) { |
|
161 | 161 | usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) { |
162 | 162 | $a_text = new DateTime("{$a['title_data']['last_updated']}"); |
163 | 163 | $b_text = new DateTime("{$b['title_data']['last_updated']}"); |