@@ -115,33 +115,33 @@ |
||
115 | 115 | |
116 | 116 | ////We need the series to be tracked |
117 | 117 | $idCQuery = $this->db->select('id') |
118 | - ->where('user_id', $userID) |
|
119 | - ->where('title_id', $titleID) |
|
120 | - ->get('tracker_chapters'); |
|
118 | + ->where('user_id', $userID) |
|
119 | + ->where('title_id', $titleID) |
|
120 | + ->get('tracker_chapters'); |
|
121 | 121 | if(!($idCQuery->num_rows() > 0)) { |
122 | 122 | //NOTE: This pretty much repeats a lot of what we already did above. Is there a better way to do this? |
123 | 123 | $this->Tracker->list->update($userID, $site, $title, $chapter, FALSE); |
124 | 124 | |
125 | 125 | $idCQuery = $this->db->select('id') |
126 | - ->where('user_id', $userID) |
|
127 | - ->where('title_id', $titleID) |
|
128 | - ->get('tracker_chapters'); |
|
126 | + ->where('user_id', $userID) |
|
127 | + ->where('title_id', $titleID) |
|
128 | + ->get('tracker_chapters'); |
|
129 | 129 | } |
130 | 130 | if($idCQuery->num_rows() > 0) { |
131 | 131 | $idCQueryRow = $idCQuery->row(); |
132 | 132 | |
133 | 133 | //Check if it is already favourited |
134 | 134 | $idFQuery = $this->db->select('id') |
135 | - ->where('chapter_id', $idCQueryRow->id) |
|
136 | - ->where('chapter', $chapter) |
|
137 | - ->get('tracker_favourites'); |
|
135 | + ->where('chapter_id', $idCQueryRow->id) |
|
136 | + ->where('chapter', $chapter) |
|
137 | + ->get('tracker_favourites'); |
|
138 | 138 | if($idFQuery->num_rows() > 0) { |
139 | 139 | //Chapter is already favourited, so remove it from DB |
140 | 140 | if($removeIfExists) { |
141 | 141 | $idFQueryRow = $idFQuery->row(); |
142 | 142 | |
143 | 143 | $isSuccess = (bool) $this->db->where('id', $idFQueryRow->id) |
144 | - ->delete('tracker_favourites'); |
|
144 | + ->delete('tracker_favourites'); |
|
145 | 145 | |
146 | 146 | if($isSuccess) { |
147 | 147 | $success = array( |
@@ -14,8 +14,8 @@ discard block |
||
14 | 14 | tf.chapter, tf.page, tf.updated_at', FALSE) |
15 | 15 | ->from('tracker_favourites AS tf') |
16 | 16 | ->join('tracker_chapters AS tc', 'tf.chapter_id = tc.id', 'left') |
17 | - ->join('tracker_titles AS tt', 'tc.title_id = tt.id', 'left') |
|
18 | - ->join('tracker_sites AS ts', 'tt.site_id = ts.id', 'left') |
|
17 | + ->join('tracker_titles AS tt', 'tc.title_id = tt.id', 'left') |
|
18 | + ->join('tracker_sites AS ts', 'tt.site_id = ts.id', 'left') |
|
19 | 19 | ->where('tc.user_id', $this->User->id) //CHECK: Is this inefficient? Would it be better to have a user_id column in tracker_favourites? |
20 | 20 | ->order_by('tf.id DESC') |
21 | 21 | ->limit($rowsPerPage, ($rowsPerPage * ($page - 1))) |
@@ -57,8 +57,8 @@ discard block |
||
57 | 57 | tf.chapter, tf.page, tf.updated_at', FALSE) |
58 | 58 | ->from('tracker_favourites AS tf') |
59 | 59 | ->join('tracker_chapters AS tc', 'tf.chapter_id = tc.id', 'left') |
60 | - ->join('tracker_titles AS tt', 'tc.title_id = tt.id', 'left') |
|
61 | - ->join('tracker_sites AS ts', 'tt.site_id = ts.id', 'left') |
|
60 | + ->join('tracker_titles AS tt', 'tc.title_id = tt.id', 'left') |
|
61 | + ->join('tracker_sites AS ts', 'tt.site_id = ts.id', 'left') |
|
62 | 62 | ->where('tc.user_id', $this->User->id) //CHECK: Is this inefficient? Would it be better to have a user_id column in tracker_favourites? |
63 | 63 | ->order_by('tf.id DESC') |
64 | 64 | ->get(); |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | |
146 | 146 | if($isSuccess) { |
147 | 147 | $success = array( |
148 | - 'status' => 'Unfavourited' . ($page ? " page {$page}" : ''), |
|
148 | + 'status' => 'Unfavourited'.($page ? " page {$page}" : ''), |
|
149 | 149 | 'bool' => TRUE |
150 | 150 | ); |
151 | 151 | $this->History->userRemoveFavourite((int) $idCQueryRow->id, $chapter); |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | |
168 | 168 | if($isSuccess) { |
169 | 169 | $success = array( |
170 | - 'status' => 'Favourited' . ($page ? " page {$page}" : ''), |
|
170 | + 'status' => 'Favourited'.($page ? " page {$page}" : ''), |
|
171 | 171 | 'bool' => TRUE |
172 | 172 | ); |
173 | 173 | $this->History->userAddFavourite((int) $idCQueryRow->id, $chapter); |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | //We don't want double trailing slashes, so fix this when possible. |
119 | 119 | $pageSeparator = ''; |
120 | 120 | } |
121 | - $pageURL = $chapterData['url'] . $pageSeparator . $page; |
|
121 | + $pageURL = $chapterData['url'].$pageSeparator.$page; |
|
122 | 122 | } |
123 | 123 | return $pageURL; |
124 | 124 | } |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | |
213 | 213 | $ch = curl_init(); |
214 | 214 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
215 | - curl_setopt($ch, CURLOPT_ENCODING , "gzip"); |
|
215 | + curl_setopt($ch, CURLOPT_ENCODING, "gzip"); |
|
216 | 216 | //curl_setopt($ch, CURLOPT_VERBOSE, 1); |
217 | 217 | curl_setopt($ch, CURLOPT_HEADER, 1); |
218 | 218 | |
@@ -234,8 +234,8 @@ discard block |
||
234 | 234 | curl_setopt($ch, CURLOPT_URL, $url); |
235 | 235 | |
236 | 236 | if($isPost) { |
237 | - curl_setopt($ch,CURLOPT_POST, count($postFields)); |
|
238 | - curl_setopt($ch,CURLOPT_POSTFIELDS, http_build_query($postFields)); |
|
237 | + curl_setopt($ch, CURLOPT_POST, count($postFields)); |
|
238 | + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postFields)); |
|
239 | 239 | } |
240 | 240 | |
241 | 241 | $response = curl_exec($ch); |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | $result = shell_exec('python '.APPPATH.'../_scripts/get_cloudflare_cookie.py '.escapeshellarg(json_encode($urlData))); |
283 | 283 | $cookieData = json_decode($result, TRUE); |
284 | 284 | |
285 | - $this->cache->save("cloudflare_{$this->site}", $cookieData['cookies'], 31536000 /* 1 year, or until we renew it */); |
|
285 | + $this->cache->save("cloudflare_{$this->site}", $cookieData['cookies'], 31536000 /* 1 year, or until we renew it */); |
|
286 | 286 | log_message('debug', "Saving CloudFlare Cookies for {$this->site}"); |
287 | 287 | |
288 | 288 | $refresh = TRUE; |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | |
341 | 341 | $dom = new DOMDocument(); |
342 | 342 | libxml_use_internal_errors(TRUE); |
343 | - $dom->loadHTML('<?xml encoding="utf-8" ?>' . $data); |
|
343 | + $dom->loadHTML('<?xml encoding="utf-8" ?>'.$data); |
|
344 | 344 | libxml_use_internal_errors(FALSE); |
345 | 345 | |
346 | 346 | $xpath = new DOMXPath($dom); |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | if($nodes_title->length === 1) { |
350 | 350 | if($nodes_row->length === 1) { |
351 | 351 | $firstRow = $nodes_row->item(0); |
352 | - $nodes_latest = $xpath->query($node_latest_string, $firstRow); |
|
352 | + $nodes_latest = $xpath->query($node_latest_string, $firstRow); |
|
353 | 353 | |
354 | 354 | if($node_chapter_string !== '') { |
355 | 355 | $nodes_chapter = $xpath->query($node_chapter_string, $firstRow); |
@@ -565,7 +565,7 @@ discard block |
||
565 | 565 | final private function _setSiteRateLimit(?int $rateLimit = NULL) : bool { |
566 | 566 | //We would just use increment(), but we can't set ttl with it... |
567 | 567 | $currentRateLimit = $rateLimit ?: $this->_getSiteRateLimit(); |
568 | - return $this->cache->save("{$this->site}_ratelimit", $currentRateLimit + 1,3600); |
|
568 | + return $this->cache->save("{$this->site}_ratelimit", $currentRateLimit + 1, 3600); |
|
569 | 569 | } |
570 | 570 | } |
571 | 571 | |
@@ -583,7 +583,7 @@ discard block |
||
583 | 583 | $chapter_parts = explode('/', $chapter); //returns #LANG#/#VOLUME#/#CHAPTER#/#CHAPTER_EXTRA#(/#PAGE#/) |
584 | 584 | return [ |
585 | 585 | 'url' => $this->getChapterURL($title_url, $chapter), |
586 | - 'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '') . "c{$chapter_parts[2]}" . (isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/ |
|
586 | + 'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '')."c{$chapter_parts[2]}".(isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/ |
|
587 | 587 | ]; |
588 | 588 | } |
589 | 589 | public function getChapterURL(string $title_url, string $chapter) : string { |
@@ -768,9 +768,9 @@ discard block |
||
768 | 768 | |
769 | 769 | $dateString = str_replace('/', '-', trim($nodes_latest->item(0)->nodeValue)); //NOTE: We replace slashes here as it stops strtotime interpreting the date as US date format. |
770 | 770 | if($dateString == 'T') { |
771 | - $dateString = date("Y-m-d",now()); |
|
771 | + $dateString = date("Y-m-d", now()); |
|
772 | 772 | } |
773 | - $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime($dateString . ' 00:00')); |
|
773 | + $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime($dateString.' 00:00')); |
|
774 | 774 | |
775 | 775 | $titleDataList[$title_url] = $titleData; |
776 | 776 | } |
@@ -935,11 +935,11 @@ discard block |
||
935 | 935 | "" |
936 | 936 | ); |
937 | 937 | if($data) { |
938 | - $titleData['title'] = trim(preg_replace('/ Added on .*$/','', $data['nodes_title']->textContent)); |
|
938 | + $titleData['title'] = trim(preg_replace('/ Added on .*$/', '', $data['nodes_title']->textContent)); |
|
939 | 939 | $titleData['latest_chapter'] = preg_replace('/^.*\/([0-9\.]+)$/', '$1', (string) $data['nodes_chapter']->getAttribute('href')); |
940 | 940 | |
941 | - $dateString = preg_replace('/^Added (?:on )?/', '',$data['nodes_latest']->textContent); |
|
942 | - $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime($dateString)); |
|
941 | + $dateString = preg_replace('/^Added (?:on )?/', '', $data['nodes_latest']->textContent); |
|
942 | + $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime($dateString)); |
|
943 | 943 | } |
944 | 944 | return (!empty($titleData) ? $titleData : NULL); |
945 | 945 | } |
@@ -26,10 +26,10 @@ discard block |
||
26 | 26 | | always be used to set the mode correctly. |
27 | 27 | | |
28 | 28 | */ |
29 | -defined('FILE_READ_MODE') OR define('FILE_READ_MODE', 0644); |
|
29 | +defined('FILE_READ_MODE') OR define('FILE_READ_MODE', 0644); |
|
30 | 30 | defined('FILE_WRITE_MODE') OR define('FILE_WRITE_MODE', 0666); |
31 | -defined('DIR_READ_MODE') OR define('DIR_READ_MODE', 0755); |
|
32 | -defined('DIR_WRITE_MODE') OR define('DIR_WRITE_MODE', 0755); |
|
31 | +defined('DIR_READ_MODE') OR define('DIR_READ_MODE', 0755); |
|
32 | +defined('DIR_WRITE_MODE') OR define('DIR_WRITE_MODE', 0755); |
|
33 | 33 | |
34 | 34 | /* |
35 | 35 | |-------------------------------------------------------------------------- |
@@ -39,14 +39,14 @@ discard block |
||
39 | 39 | | These modes are used when working with fopen()/popen() |
40 | 40 | | |
41 | 41 | */ |
42 | -defined('FOPEN_READ') OR define('FOPEN_READ', 'rb'); |
|
43 | -defined('FOPEN_READ_WRITE') OR define('FOPEN_READ_WRITE', 'r+b'); |
|
44 | -defined('FOPEN_WRITE_CREATE_DESTRUCTIVE') OR define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care |
|
42 | +defined('FOPEN_READ') OR define('FOPEN_READ', 'rb'); |
|
43 | +defined('FOPEN_READ_WRITE') OR define('FOPEN_READ_WRITE', 'r+b'); |
|
44 | +defined('FOPEN_WRITE_CREATE_DESTRUCTIVE') OR define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care |
|
45 | 45 | defined('FOPEN_READ_WRITE_CREATE_DESCTRUCTIVE') OR define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care |
46 | -defined('FOPEN_WRITE_CREATE') OR define('FOPEN_WRITE_CREATE', 'ab'); |
|
47 | -defined('FOPEN_READ_WRITE_CREATE') OR define('FOPEN_READ_WRITE_CREATE', 'a+b'); |
|
48 | -defined('FOPEN_WRITE_CREATE_STRICT') OR define('FOPEN_WRITE_CREATE_STRICT', 'xb'); |
|
49 | -defined('FOPEN_READ_WRITE_CREATE_STRICT') OR define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b'); |
|
46 | +defined('FOPEN_WRITE_CREATE') OR define('FOPEN_WRITE_CREATE', 'ab'); |
|
47 | +defined('FOPEN_READ_WRITE_CREATE') OR define('FOPEN_READ_WRITE_CREATE', 'a+b'); |
|
48 | +defined('FOPEN_WRITE_CREATE_STRICT') OR define('FOPEN_WRITE_CREATE_STRICT', 'xb'); |
|
49 | +defined('FOPEN_READ_WRITE_CREATE_STRICT') OR define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b'); |
|
50 | 50 | |
51 | 51 | /* |
52 | 52 | |-------------------------------------------------------------------------- |
@@ -73,20 +73,20 @@ discard block |
||
73 | 73 | | http://tldp.org/LDP/abs/html/exitcodes.html |
74 | 74 | | |
75 | 75 | */ |
76 | -defined('EXIT_SUCCESS') OR define('EXIT_SUCCESS', 0); // no errors |
|
77 | -defined('EXIT_ERROR') OR define('EXIT_ERROR', 1); // generic error |
|
78 | -defined('EXIT_CONFIG') OR define('EXIT_CONFIG', 3); // configuration error |
|
79 | -defined('EXIT_UNKNOWN_FILE') OR define('EXIT_UNKNOWN_FILE', 4); // file not found |
|
80 | -defined('EXIT_UNKNOWN_CLASS') OR define('EXIT_UNKNOWN_CLASS', 5); // unknown class |
|
76 | +defined('EXIT_SUCCESS') OR define('EXIT_SUCCESS', 0); // no errors |
|
77 | +defined('EXIT_ERROR') OR define('EXIT_ERROR', 1); // generic error |
|
78 | +defined('EXIT_CONFIG') OR define('EXIT_CONFIG', 3); // configuration error |
|
79 | +defined('EXIT_UNKNOWN_FILE') OR define('EXIT_UNKNOWN_FILE', 4); // file not found |
|
80 | +defined('EXIT_UNKNOWN_CLASS') OR define('EXIT_UNKNOWN_CLASS', 5); // unknown class |
|
81 | 81 | defined('EXIT_UNKNOWN_METHOD') OR define('EXIT_UNKNOWN_METHOD', 6); // unknown class member |
82 | -defined('EXIT_USER_INPUT') OR define('EXIT_USER_INPUT', 7); // invalid user input |
|
83 | -defined('EXIT_DATABASE') OR define('EXIT_DATABASE', 8); // database error |
|
84 | -defined('EXIT__AUTO_MIN') OR define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code |
|
85 | -defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code |
|
82 | +defined('EXIT_USER_INPUT') OR define('EXIT_USER_INPUT', 7); // invalid user input |
|
83 | +defined('EXIT_DATABASE') OR define('EXIT_DATABASE', 8); // database error |
|
84 | +defined('EXIT__AUTO_MIN') OR define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code |
|
85 | +defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code |
|
86 | 86 | |
87 | 87 | /***** TIMEAGO CONSTANTS *****/ |
88 | 88 | defined('TIMEAGO_MONTH') OR define('TIMEAGO_MONTH', strtotime('-1 month')); //1 month ago |
89 | -defined('TIMEAGO_WEEK') OR define('TIMEAGO_WEEK', strtotime('-1 week')); //1 week ago |
|
90 | -defined('TIMEAGO_3DAY') OR define('TIMEAGO_3DAY', strtotime('-3 day')); //3 days ago |
|
89 | +defined('TIMEAGO_WEEK') OR define('TIMEAGO_WEEK', strtotime('-1 week')); //1 week ago |
|
90 | +defined('TIMEAGO_3DAY') OR define('TIMEAGO_3DAY', strtotime('-3 day')); //3 days ago |
|
91 | 91 | |
92 | 92 | defined('USERSCRIPT_VERSION') OR define('USERSCRIPT_VERSION', '1.11.1'); //This is automatically set by a PHPStorm File Watcher |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -defined('BASEPATH') OR exit('No direct script access allowed'); |
|
2 | +defined('BASEPATH') or exit('No direct script access allowed'); |
|
3 | 3 | |
4 | 4 | /* |
5 | 5 | |-------------------------------------------------------------------------- |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | | of this setting |
12 | 12 | | |
13 | 13 | */ |
14 | -defined('SHOW_DEBUG_BACKTRACE') OR define('SHOW_DEBUG_BACKTRACE', TRUE); |
|
14 | +defined('SHOW_DEBUG_BACKTRACE') or define('SHOW_DEBUG_BACKTRACE', TRUE); |
|
15 | 15 | |
16 | 16 | /* |
17 | 17 | |-------------------------------------------------------------------------- |
@@ -26,10 +26,10 @@ discard block |
||
26 | 26 | | always be used to set the mode correctly. |
27 | 27 | | |
28 | 28 | */ |
29 | -defined('FILE_READ_MODE') OR define('FILE_READ_MODE', 0644); |
|
30 | -defined('FILE_WRITE_MODE') OR define('FILE_WRITE_MODE', 0666); |
|
31 | -defined('DIR_READ_MODE') OR define('DIR_READ_MODE', 0755); |
|
32 | -defined('DIR_WRITE_MODE') OR define('DIR_WRITE_MODE', 0755); |
|
29 | +defined('FILE_READ_MODE') or define('FILE_READ_MODE', 0644); |
|
30 | +defined('FILE_WRITE_MODE') or define('FILE_WRITE_MODE', 0666); |
|
31 | +defined('DIR_READ_MODE') or define('DIR_READ_MODE', 0755); |
|
32 | +defined('DIR_WRITE_MODE') or define('DIR_WRITE_MODE', 0755); |
|
33 | 33 | |
34 | 34 | /* |
35 | 35 | |-------------------------------------------------------------------------- |
@@ -39,14 +39,14 @@ discard block |
||
39 | 39 | | These modes are used when working with fopen()/popen() |
40 | 40 | | |
41 | 41 | */ |
42 | -defined('FOPEN_READ') OR define('FOPEN_READ', 'rb'); |
|
43 | -defined('FOPEN_READ_WRITE') OR define('FOPEN_READ_WRITE', 'r+b'); |
|
44 | -defined('FOPEN_WRITE_CREATE_DESTRUCTIVE') OR define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care |
|
45 | -defined('FOPEN_READ_WRITE_CREATE_DESCTRUCTIVE') OR define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care |
|
46 | -defined('FOPEN_WRITE_CREATE') OR define('FOPEN_WRITE_CREATE', 'ab'); |
|
47 | -defined('FOPEN_READ_WRITE_CREATE') OR define('FOPEN_READ_WRITE_CREATE', 'a+b'); |
|
48 | -defined('FOPEN_WRITE_CREATE_STRICT') OR define('FOPEN_WRITE_CREATE_STRICT', 'xb'); |
|
49 | -defined('FOPEN_READ_WRITE_CREATE_STRICT') OR define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b'); |
|
42 | +defined('FOPEN_READ') or define('FOPEN_READ', 'rb'); |
|
43 | +defined('FOPEN_READ_WRITE') or define('FOPEN_READ_WRITE', 'r+b'); |
|
44 | +defined('FOPEN_WRITE_CREATE_DESTRUCTIVE') or define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care |
|
45 | +defined('FOPEN_READ_WRITE_CREATE_DESCTRUCTIVE') or define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care |
|
46 | +defined('FOPEN_WRITE_CREATE') or define('FOPEN_WRITE_CREATE', 'ab'); |
|
47 | +defined('FOPEN_READ_WRITE_CREATE') or define('FOPEN_READ_WRITE_CREATE', 'a+b'); |
|
48 | +defined('FOPEN_WRITE_CREATE_STRICT') or define('FOPEN_WRITE_CREATE_STRICT', 'xb'); |
|
49 | +defined('FOPEN_READ_WRITE_CREATE_STRICT') or define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b'); |
|
50 | 50 | |
51 | 51 | /* |
52 | 52 | |-------------------------------------------------------------------------- |
@@ -73,20 +73,20 @@ discard block |
||
73 | 73 | | http://tldp.org/LDP/abs/html/exitcodes.html |
74 | 74 | | |
75 | 75 | */ |
76 | -defined('EXIT_SUCCESS') OR define('EXIT_SUCCESS', 0); // no errors |
|
77 | -defined('EXIT_ERROR') OR define('EXIT_ERROR', 1); // generic error |
|
78 | -defined('EXIT_CONFIG') OR define('EXIT_CONFIG', 3); // configuration error |
|
79 | -defined('EXIT_UNKNOWN_FILE') OR define('EXIT_UNKNOWN_FILE', 4); // file not found |
|
80 | -defined('EXIT_UNKNOWN_CLASS') OR define('EXIT_UNKNOWN_CLASS', 5); // unknown class |
|
81 | -defined('EXIT_UNKNOWN_METHOD') OR define('EXIT_UNKNOWN_METHOD', 6); // unknown class member |
|
82 | -defined('EXIT_USER_INPUT') OR define('EXIT_USER_INPUT', 7); // invalid user input |
|
83 | -defined('EXIT_DATABASE') OR define('EXIT_DATABASE', 8); // database error |
|
84 | -defined('EXIT__AUTO_MIN') OR define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code |
|
85 | -defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code |
|
76 | +defined('EXIT_SUCCESS') or define('EXIT_SUCCESS', 0); // no errors |
|
77 | +defined('EXIT_ERROR') or define('EXIT_ERROR', 1); // generic error |
|
78 | +defined('EXIT_CONFIG') or define('EXIT_CONFIG', 3); // configuration error |
|
79 | +defined('EXIT_UNKNOWN_FILE') or define('EXIT_UNKNOWN_FILE', 4); // file not found |
|
80 | +defined('EXIT_UNKNOWN_CLASS') or define('EXIT_UNKNOWN_CLASS', 5); // unknown class |
|
81 | +defined('EXIT_UNKNOWN_METHOD') or define('EXIT_UNKNOWN_METHOD', 6); // unknown class member |
|
82 | +defined('EXIT_USER_INPUT') or define('EXIT_USER_INPUT', 7); // invalid user input |
|
83 | +defined('EXIT_DATABASE') or define('EXIT_DATABASE', 8); // database error |
|
84 | +defined('EXIT__AUTO_MIN') or define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code |
|
85 | +defined('EXIT__AUTO_MAX') or define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code |
|
86 | 86 | |
87 | 87 | /***** TIMEAGO CONSTANTS *****/ |
88 | -defined('TIMEAGO_MONTH') OR define('TIMEAGO_MONTH', strtotime('-1 month')); //1 month ago |
|
89 | -defined('TIMEAGO_WEEK') OR define('TIMEAGO_WEEK', strtotime('-1 week')); //1 week ago |
|
90 | -defined('TIMEAGO_3DAY') OR define('TIMEAGO_3DAY', strtotime('-3 day')); //3 days ago |
|
88 | +defined('TIMEAGO_MONTH') or define('TIMEAGO_MONTH', strtotime('-1 month')); //1 month ago |
|
89 | +defined('TIMEAGO_WEEK') or define('TIMEAGO_WEEK', strtotime('-1 week')); //1 week ago |
|
90 | +defined('TIMEAGO_3DAY') or define('TIMEAGO_3DAY', strtotime('-3 day')); //3 days ago |
|
91 | 91 | |
92 | -defined('USERSCRIPT_VERSION') OR define('USERSCRIPT_VERSION', '1.11.1'); //This is automatically set by a PHPStorm File Watcher |
|
92 | +defined('USERSCRIPT_VERSION') or define('USERSCRIPT_VERSION', '1.11.1'); //This is automatically set by a PHPStorm File Watcher |