@@ -7,11 +7,11 @@ |
||
7 | 7 | Filename: <?php echo $filepath, "\n"; ?> |
8 | 8 | Line Number: <?php echo $line; ?> |
9 | 9 | |
10 | -<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?> |
|
10 | +<?php if(defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?> |
|
11 | 11 | |
12 | 12 | Backtrace: |
13 | -<?php foreach (debug_backtrace() as $error): ?> |
|
14 | -<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?> |
|
13 | +<?php foreach(debug_backtrace() as $error): ?> |
|
14 | +<?php if(isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?> |
|
15 | 15 | File: <?php echo $error['file'], "\n"; ?> |
16 | 16 | Line: <?php echo $error['line'], "\n"; ?> |
17 | 17 | Function: <?php echo $error['function'], "\n\n"; ?> |
@@ -7,11 +7,11 @@ |
||
7 | 7 | Filename: <?php echo $exception->getFile(), "\n"; ?> |
8 | 8 | Line Number: <?php echo $exception->getLine(); ?> |
9 | 9 | |
10 | -<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?> |
|
10 | +<?php if(defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?> |
|
11 | 11 | |
12 | 12 | Backtrace: |
13 | -<?php foreach ($exception->getTrace() as $error): ?> |
|
14 | -<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?> |
|
13 | +<?php foreach($exception->getTrace() as $error): ?> |
|
14 | +<?php if(isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?> |
|
15 | 15 | File: <?php echo $error['file'], "\n"; ?> |
16 | 16 | Line: <?php echo $error['line'], "\n"; ?> |
17 | 17 | Function: <?php echo $error['function'], "\n\n"; ?> |
@@ -6,7 +6,7 @@ |
||
6 | 6 | protected $footer_data = array(); |
7 | 7 | public $global_data = array(); |
8 | 8 | |
9 | - public function __construct(){ |
|
9 | + public function __construct() { |
|
10 | 10 | parent::__construct(); |
11 | 11 | |
12 | 12 | //FIXME: This is pretty much a phpUnit hack. Without it phpUnit fails here. We need a proper way to fake user/admin testing. |
@@ -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 Auth_Model extends CI_Model { |
4 | 4 | public function __construct() { |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | } |
61 | 61 | |
62 | 62 | $success = TRUE; |
63 | - } catch (Exception $e) { |
|
63 | + } catch(Exception $e) { |
|
64 | 64 | //echo 'Caught exception: ', $e->getMessage(), "\n"; |
65 | 65 | |
66 | 66 | //revert verification |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | //TODO: Remove from DB, send user error that verification expired. |
92 | 92 | } else { |
93 | 93 | //not expired, verification is valid, return email |
94 | - $return = $result->email; |
|
94 | + $return = $result->email; |
|
95 | 95 | } |
96 | 96 | } |
97 | 97 | return $return; |
@@ -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_Model extends CI_Model { |
4 | 4 | public $sites; |
@@ -49,8 +49,8 @@ discard block |
||
49 | 49 | ]; |
50 | 50 | } |
51 | 51 | if($query->num_rows() > 0) { |
52 | - foreach ($query->result() as $row) { |
|
53 | - $is_unread = intval($row->latest_chapter == $row->current_chapter ? '1' : '0'); |
|
52 | + foreach($query->result() as $row) { |
|
53 | + $is_unread = intval($row->latest_chapter == $row->current_chapter ? '1' : '0'); |
|
54 | 54 | $arr[$row->category]['unread_count'] = (($arr[$row->category]['unread_count'] ?? 0) + !$is_unread); |
55 | 55 | $arr[$row->category]['manga'][] = [ |
56 | 56 | 'id' => $row->id, |
@@ -79,8 +79,8 @@ discard block |
||
79 | 79 | } |
80 | 80 | |
81 | 81 | //NOTE: This does not sort in the same way as tablesorter, but it works better. |
82 | - foreach (array_keys($arr) as $category) { |
|
83 | - usort($arr[$category]['manga'], function ($a, $b) { |
|
82 | + foreach(array_keys($arr) as $category) { |
|
83 | + usort($arr[$category]['manga'], function($a, $b) { |
|
84 | 84 | return strtolower("{$a['new_chapter_exists']} - {$a['title_data']['title']}") <=> strtolower("{$b['new_chapter_exists']} - {$b['title_data']['title']}"); |
85 | 85 | }); |
86 | 86 | } |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | ->get(); |
227 | 227 | |
228 | 228 | if($query->num_rows() > 0) { |
229 | - foreach ($query->result() as $row) { |
|
229 | + foreach($query->result() as $row) { |
|
230 | 230 | print "> {$row->title} <{$row->site_class}>"; //Print this prior to doing anything so we can more easily find out if something went wrong |
231 | 231 | $titleData = $this->sites->{$row->site_class}->getTitleData($row->title_url); |
232 | 232 | if(!is_null($titleData['latest_chapter'])) { |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | |
262 | 262 | $arr = []; |
263 | 263 | if($query->num_rows() > 0) { |
264 | - foreach ($query->result() as $row) { |
|
264 | + foreach($query->result() as $row) { |
|
265 | 265 | $arr[$row->category][] = [ |
266 | 266 | 'site' => $row->site, |
267 | 267 | 'title_url' => $row->title_url, |
@@ -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 User_Options_Model extends CI_Model { |
4 | 4 | public $options = array( |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | $query = $this->db->select('value_str, value_int') |
141 | 141 | ->from('user_options') |
142 | 142 | ->where('user_id', $userID) |
143 | - ->where('name', $option) |
|
143 | + ->where('name', $option) |
|
144 | 144 | ->limit(1); |
145 | 145 | return $query->get()->row_array(); |
146 | 146 | } |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | ); |
180 | 180 | //FIXME: Get a better solution than str_replace for removing special characters |
181 | 181 | $elements = array(); |
182 | - foreach (array_values($this->options[$option]['valid_options']) as $valid_option) { |
|
182 | + foreach(array_values($this->options[$option]['valid_options']) as $valid_option) { |
|
183 | 183 | $elements[$option.'_'.str_replace(',', '_', $valid_option)] = array_merge($base_attributes, array( |
184 | 184 | 'value' => $valid_option |
185 | 185 | )); |
@@ -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 Site_Model extends CI_Model { |
4 | 4 | public function __construct() { |
@@ -16,10 +16,10 @@ discard block |
||
16 | 16 | public function isValidTitleURL(string $title_url) : bool {} |
17 | 17 | public function isValidChapter(string $chapter): bool {} |
18 | 18 | |
19 | - protected function get_content(string $url, string $cookie_string = "", string $cookiejar_path = ""){ |
|
19 | + protected function get_content(string $url, string $cookie_string = "", string $cookiejar_path = "") { |
|
20 | 20 | $ch = curl_init(); |
21 | 21 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
22 | - curl_setopt($ch, CURLOPT_ENCODING , "gzip"); |
|
22 | + curl_setopt($ch, CURLOPT_ENCODING, "gzip"); |
|
23 | 23 | |
24 | 24 | if(!empty($cookie_string)) curl_setopt($ch, CURLOPT_COOKIE, $cookie_string); |
25 | 25 | if(!empty($cookiejar_path)) curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiejar_path); |
@@ -111,8 +111,8 @@ discard block |
||
111 | 111 | |
112 | 112 | $link = preg_replace('/^(.*\/)(?:[0-9]+\.html)?$/', '$1', (string) $nodes_chapter[0]->getAttribute('href')); |
113 | 113 | $chapterURLSegments = explode('/', $link); |
114 | - $titleData['latest_chapter'] = $chapterURLSegments[5] . (isset($chapterURLSegments[6]) && !empty($chapterURLSegments[6]) ? "/{$chapterURLSegments[6]}" : ""); |
|
115 | - $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $nodes_latest[0]->nodeValue)); |
|
114 | + $titleData['latest_chapter'] = $chapterURLSegments[5].(isset($chapterURLSegments[6]) && !empty($chapterURLSegments[6]) ? "/{$chapterURLSegments[6]}" : ""); |
|
115 | + $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $nodes_latest[0]->nodeValue)); |
|
116 | 116 | } |
117 | 117 | } else { |
118 | 118 | //TODO: Throw ERRORS; |
@@ -171,8 +171,8 @@ discard block |
||
171 | 171 | |
172 | 172 | $link = preg_replace('/^(.*\/)(?:[0-9]+\.html)?$/', '$1', (string) $nodes_chapter[0]->getAttribute('href')); |
173 | 173 | $chapterURLSegments = explode('/', $link); |
174 | - $titleData['latest_chapter'] = $chapterURLSegments[5] . (isset($chapterURLSegments[6]) && !empty($chapterURLSegments[6]) ? "/{$chapterURLSegments[6]}" : ""); |
|
175 | - $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $nodes_latest[0]->nodeValue)); |
|
174 | + $titleData['latest_chapter'] = $chapterURLSegments[5].(isset($chapterURLSegments[6]) && !empty($chapterURLSegments[6]) ? "/{$chapterURLSegments[6]}" : ""); |
|
175 | + $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $nodes_latest[0]->nodeValue)); |
|
176 | 176 | } |
177 | 177 | } else { |
178 | 178 | //TODO: Throw ERRORS; |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | |
213 | 213 | $chapter_parts = explode(':--:', $chapter); |
214 | 214 | return [ |
215 | - 'url' => "http://bato.to/reader#" . $chapter_parts[0], |
|
215 | + 'url' => "http://bato.to/reader#".$chapter_parts[0], |
|
216 | 216 | 'number' => $chapter_parts[1] |
217 | 217 | ]; |
218 | 218 | } |
@@ -228,8 +228,8 @@ discard block |
||
228 | 228 | //Bato.to is annoying and locks stuff behind auth. See: https://github.com/DakuTree/manga-tracker/issues/14#issuecomment-233830855 |
229 | 229 | $cookies = [ |
230 | 230 | "lang_option={$title_lang}", |
231 | - "member_id=" . $this->config->item('batoto_cookie_member_id'), |
|
232 | - "pass_hash=" . $this->config->item('batoto_cookie_pass_hash') |
|
231 | + "member_id=".$this->config->item('batoto_cookie_member_id'), |
|
232 | + "pass_hash=".$this->config->item('batoto_cookie_pass_hash') |
|
233 | 233 | ]; |
234 | 234 | $data = $this->get_content($title_url, implode("; ", $cookies)); |
235 | 235 | if(!$data) { |
@@ -261,13 +261,13 @@ discard block |
||
261 | 261 | preg_match('/^(?:Vol\.(?<volume>\S+) )?(?:Ch.(?<chapter>[^\s:]+)):?.*/', trim($chapter_element->nodeValue), $text); |
262 | 262 | |
263 | 263 | $titleData['title'] = html_entity_decode(trim($xpath->query('//h1[@class="ipsType_pagetitle"]')->item(0)->nodeValue)); |
264 | - $titleData['latest_chapter'] = substr($chapter_element->getAttribute('href'), 22) . ':--:' . ((!empty($text['volume']) ? 'v'.$text['volume'].'/' : '') . 'c'.$text['chapter']); |
|
264 | + $titleData['latest_chapter'] = substr($chapter_element->getAttribute('href'), 22).':--:'.((!empty($text['volume']) ? 'v'.$text['volume'].'/' : '').'c'.$text['chapter']); |
|
265 | 265 | |
266 | 266 | $dateString = $updated_element->nodeValue; |
267 | 267 | if($dateString == 'An hour ago') { |
268 | 268 | $dateString = '1 hour ago'; |
269 | 269 | } |
270 | - $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime(preg_replace('/ (-|\[A\]).*$/', '', $dateString))); |
|
270 | + $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime(preg_replace('/ (-|\[A\]).*$/', '', $dateString))); |
|
271 | 271 | } else { |
272 | 272 | log_message('error', "Batoto: Regex missing <td> ({$title_url})"); |
273 | 273 | return NULL; |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | */ |
316 | 316 | |
317 | 317 | $chapterData = [ |
318 | - 'url' => 'http://dynasty-scans.com/chapters/' . $title_parts[0].'_'.$chapter, |
|
318 | + 'url' => 'http://dynasty-scans.com/chapters/'.$title_parts[0].'_'.$chapter, |
|
319 | 319 | 'number' => '' |
320 | 320 | ]; |
321 | 321 | |
@@ -355,14 +355,14 @@ discard block |
||
355 | 355 | |
356 | 356 | preg_match('/<b>.*<\/b>/', $data, $matchesT); |
357 | 357 | preg_match('/\/doujins\/[^"]+">(.+)?(?=<\/a>)<\/a>/', $data, $matchesD); |
358 | - $titleData['title'] = (!empty($matchesD) ? (substr($matchesD[1], 0, -7) !== 'Original' ? substr($matchesD[1], 0, -7).' - ' : '') : '') . substr($matchesT[0], 3, -4); |
|
358 | + $titleData['title'] = (!empty($matchesD) ? (substr($matchesD[1], 0, -7) !== 'Original' ? substr($matchesD[1], 0, -7).' - ' : '') : '').substr($matchesT[0], 3, -4); |
|
359 | 359 | |
360 | 360 | $data = preg_replace('/^[\S\s]*(<dl class=\'chapter-list\'>[\S\s]*<\/dl>)[\S\s]*$/', '$1', $data); |
361 | 361 | preg_match_all('/<dd>[\s\S]+?(?=<\/dd>)<\/dd>/', $data, $matches); |
362 | 362 | $latest_chapter_html = array_pop($matches[0]); |
363 | 363 | |
364 | 364 | preg_match('/\/chapters\/([^"]+)/', $latest_chapter_html, $matches); |
365 | - $titleData['latest_chapter'] = substr($matches[1], strlen($title_url)+1); |
|
365 | + $titleData['latest_chapter'] = substr($matches[1], strlen($title_url) + 1); |
|
366 | 366 | //FIXME: THIS IS A TEMP FIX, SEE https://github.com/DakuTree/manga-tracker/issues/58 |
367 | 367 | if(!$titleData['latest_chapter']) { |
368 | 368 | log_message('error', 'DynastyScans::getTitleData cannot parse title properly as it contains oneshot. || URL: '.$title_url); |
@@ -370,13 +370,13 @@ discard block |
||
370 | 370 | } |
371 | 371 | |
372 | 372 | preg_match('/<small>released (.*)<\/small>/', $latest_chapter_html, $matches); |
373 | - $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime(str_replace('\'', '', $matches[1]))); |
|
373 | + $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime(str_replace('\'', '', $matches[1]))); |
|
374 | 374 | } elseif($title_parts[1] == '1') { |
375 | 375 | $data = $this->get_content('http://dynasty-scans.com/chapters/'.$title_url); |
376 | 376 | |
377 | 377 | preg_match('/<b>.*<\/b>/', $data, $matchesT); |
378 | 378 | preg_match('/\/doujins\/[^"]+">(.+)?(?=<\/a>)<\/a>/', $data, $matchesD); |
379 | - $titleData['title'] = (!empty($matchesD) ? ($matchesD[1] !== 'Original' ? $matchesD[1].' - ' : '') : '') . substr($matchesT[0], 3, -4); |
|
379 | + $titleData['title'] = (!empty($matchesD) ? ($matchesD[1] !== 'Original' ? $matchesD[1].' - ' : '') : '').substr($matchesT[0], 3, -4); |
|
380 | 380 | |
381 | 381 | $titleData['latest_chapter'] = 'oneshot'; //This will never change |
382 | 382 | |
@@ -442,7 +442,7 @@ discard block |
||
442 | 442 | $nodes_chapter = $xpath->query("td[1]/a", $nodes_row[0]); |
443 | 443 | |
444 | 444 | $titleData['latest_chapter'] = preg_replace('/^.*\/([0-9]+)$/', '$1', (string) $nodes_chapter[0]->getAttribute('href')); |
445 | - $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $nodes_latest[0]->nodeValue)); |
|
445 | + $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $nodes_latest[0]->nodeValue)); |
|
446 | 446 | } |
447 | 447 | } else { |
448 | 448 | //TODO: Throw ERRORS; |
@@ -500,7 +500,7 @@ discard block |
||
500 | 500 | $nodes_chapter = $xpath->query("td[1]/a", $nodes_row[0]); |
501 | 501 | |
502 | 502 | $titleData['latest_chapter'] = preg_replace('/^.*\/(.*?\/[0-9]+)\/[0-9]+$/', '$1', (string) $nodes_chapter[0]->getAttribute('href')); |
503 | - $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $nodes_latest[0]->nodeValue)); |
|
503 | + $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $nodes_latest[0]->nodeValue)); |
|
504 | 504 | } |
505 | 505 | } else { |
506 | 506 | //TODO: Throw ERRORS; |
@@ -565,8 +565,8 @@ discard block |
||
565 | 565 | $titleData['title'] = trim((string) $xml->channel->title); |
566 | 566 | |
567 | 567 | $chapterURLSegments = explode('/', ((string) $xml->channel->item[0]->link)); |
568 | - $titleData['latest_chapter'] = preg_replace('/^.*?([0-9]+)$/', '$1', $chapterURLSegments[7]) . ':--:' . $chapterURLSegments[6]; |
|
569 | - $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $xml->channel->item[0]->pubDate)); |
|
568 | + $titleData['latest_chapter'] = preg_replace('/^.*?([0-9]+)$/', '$1', $chapterURLSegments[7]).':--:'.$chapterURLSegments[6]; |
|
569 | + $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $xml->channel->item[0]->pubDate)); |
|
570 | 570 | } |
571 | 571 | } else { |
572 | 572 | //TODO: Throw ERRORS; |
@@ -645,8 +645,8 @@ discard block |
||
645 | 645 | |
646 | 646 | $link = (string) $nodes_chapter[0]->getAttribute('href'); |
647 | 647 | $chapterURLSegments = explode('/', preg_replace('/\?.*$/', '', $link)); |
648 | - $titleData['latest_chapter'] = $chapterURLSegments[3] . ':--:' . preg_replace('/.*?([0-9]+)$/', '$1', $link); |
|
649 | - $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $nodes_latest[0]->textContent)); |
|
648 | + $titleData['latest_chapter'] = $chapterURLSegments[3].':--:'.preg_replace('/.*?([0-9]+)$/', '$1', $link); |
|
649 | + $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $nodes_latest[0]->textContent)); |
|
650 | 650 | } |
651 | 651 | } else { |
652 | 652 | //TODO: Throw ERRORS; |
@@ -681,7 +681,7 @@ discard block |
||
681 | 681 | $chapter_parts = explode('/', $chapter); |
682 | 682 | return [ |
683 | 683 | 'url' => "https://reader.kireicake.com/read/{$title_url}/{$chapter}", |
684 | - 'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '') . "c{$chapter_parts[2]}" . (isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/ |
|
684 | + 'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '')."c{$chapter_parts[2]}".(isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/ |
|
685 | 685 | ]; |
686 | 686 | } |
687 | 687 | |
@@ -712,7 +712,7 @@ discard block |
||
712 | 712 | |
713 | 713 | $link = (string) $nodes_chapter[0]->getAttribute('href'); |
714 | 714 | $titleData['latest_chapter'] = preg_replace('/.*\/read\/.*?\/(.*?)\/$/', '$1', $link); |
715 | - $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) str_replace('.', '', explode(',', $nodes_latest[0]->textContent)[1]))); |
|
715 | + $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) str_replace('.', '', explode(',', $nodes_latest[0]->textContent)[1]))); |
|
716 | 716 | } |
717 | 717 | } else { |
718 | 718 | //TODO: Throw ERRORS; |
@@ -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 User_Model extends CI_Model { |
4 | 4 | public $id; |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | if($query->num_rows() > 0) { |
72 | 72 | //username exists, grab email |
73 | 73 | $email = $query->row('email'); |
74 | - }else{ |
|
74 | + } else { |
|
75 | 75 | //username doesn't exist, return FALSE |
76 | 76 | $email = FALSE; |
77 | 77 | } |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | public function get_new_api_key() : string { |
104 | 104 | $api_key = NULL; |
105 | 105 | if($this->logged_in()) { |
106 | - $api_key = substr("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", mt_rand(0, 51), 1) . substr(md5((string) time()), 1); |
|
106 | + $api_key = substr("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", mt_rand(0, 51), 1).substr(md5((string) time()), 1); |
|
107 | 107 | |
108 | 108 | $this->db->where('id', $this->id); |
109 | 109 | $this->db->update('auth_users', ['api_key' => $api_key]); |
@@ -11,14 +11,14 @@ |
||
11 | 11 | |
12 | 12 | $config['gravatar_base_url'] = 'http://www.gravatar.com/'; |
13 | 13 | $config['gravatar_secure_base_url'] = 'https://secure.gravatar.com/'; |
14 | -$config['gravatar_image_extension'] = '.png'; // '', '.png' or '.jpg'. |
|
14 | +$config['gravatar_image_extension'] = '.png'; // '', '.png' or '.jpg'. |
|
15 | 15 | $config['gravatar_image_size'] = 44; |
16 | 16 | |
17 | 17 | $config['gravatar_default_image'] = 'identicon'; // '', '404', 'mm', 'identicon', 'monsterid', 'wavatar', 'retro', 'blank'. |
18 | 18 | //$config['gravatar_default_image'] = BASE_URL.'assets/img/lib/default-person.png'; // Another possible option: a custon image. |
19 | 19 | |
20 | 20 | $config['gravatar_force_default_image'] = false; |
21 | -$config['gravatar_rating'] = ''; // '', 'g' (default), 'pg', 'r', 'x'. |
|
21 | +$config['gravatar_rating'] = ''; // '', 'g' (default), 'pg', 'r', 'x'. |
|
22 | 22 | |
23 | 23 | // Useragent string for server-made requests. |
24 | 24 | // It is for not getting 403 forbidden response. |