@@ -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. |
@@ -6,7 +6,7 @@ discard block |
||
| 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. |
@@ -80,7 +80,9 @@ discard block |
||
| 80 | 80 | public function __construct() { |
| 81 | 81 | parent::__construct(); |
| 82 | 82 | |
| 83 | - if($this->ion_auth->logged_in()) redirect('/'); |
|
| 83 | + if($this->ion_auth->logged_in()) { |
|
| 84 | + redirect('/'); |
|
| 85 | + } |
|
| 84 | 86 | } |
| 85 | 87 | } |
| 86 | 88 | |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php defined('BASEPATH') OR exit('No direct script access allowed'); |
|
| 1 | +<?php defined('BASEPATH') or exit('No direct script access allowed'); |
|
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | 4 | * Rate Limiter Configuration |
@@ -138,10 +138,10 @@ |
||
| 138 | 138 | private function get_db(string $option, int $userID) { |
| 139 | 139 | //This function assumes we've already done some basic validation. |
| 140 | 140 | $query = $this->db->select('value_str, value_int') |
| 141 | - ->from('user_options') |
|
| 142 | - ->where('user_id', $userID) |
|
| 143 | - ->where('name', $option) |
|
| 144 | - ->limit(1); |
|
| 141 | + ->from('user_options') |
|
| 142 | + ->where('user_id', $userID) |
|
| 143 | + ->where('name', $option) |
|
| 144 | + ->limit(1); |
|
| 145 | 145 | return $query->get()->row_array(); |
| 146 | 146 | } |
| 147 | 147 | private function set_db(string $option, $value) : bool {} |
@@ -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 | )); |
@@ -94,7 +94,9 @@ discard block |
||
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | //Overall fallback method. |
| 97 | - if(!isset($value)) $value = $this->options[$option]['default']; |
|
| 97 | + if(!isset($value)) { |
|
| 98 | + $value = $this->options[$option]['default']; |
|
| 99 | + } |
|
| 98 | 100 | } else { |
| 99 | 101 | $value = FALSE; |
| 100 | 102 | } |
@@ -165,7 +167,10 @@ discard block |
||
| 165 | 167 | //This should never happen. |
| 166 | 168 | break; |
| 167 | 169 | } |
| 168 | - if(!isset($value)) $value = FALSE; //FIXME: This won't play nice with BOOL type false? |
|
| 170 | + if(!isset($value)) { |
|
| 171 | + $value = FALSE; |
|
| 172 | + } |
|
| 173 | + //FIXME: This won't play nice with BOOL type false? |
|
| 169 | 174 | |
| 170 | 175 | return $value; |
| 171 | 176 | } |
@@ -73,11 +73,15 @@ discard block |
||
| 73 | 73 | /** |
| 74 | 74 | * Get user option, or default option if it does not exist. |
| 75 | 75 | * @param string $option |
| 76 | - * @return mixed Returns option value as STRING, or FALSE if option does not exist. |
|
| 76 | + * @return string Returns option value as STRING, or FALSE if option does not exist. |
|
| 77 | 77 | */ |
| 78 | 78 | public function get(string $option) { |
| 79 | 79 | return $this->get_by_userid($option, (int) $this->User->id); |
| 80 | 80 | } |
| 81 | + |
|
| 82 | + /** |
|
| 83 | + * @return string |
|
| 84 | + */ |
|
| 81 | 85 | public function get_by_userid(string $option, int $userID) { |
| 82 | 86 | //Check if option is valid |
| 83 | 87 | if(array_key_exists($option, $this->options)) { |
@@ -135,6 +139,9 @@ discard block |
||
| 135 | 139 | return $success; |
| 136 | 140 | } |
| 137 | 141 | |
| 142 | + /** |
|
| 143 | + * @return string |
|
| 144 | + */ |
|
| 138 | 145 | private function get_db(string $option, int $userID) { |
| 139 | 146 | //This function assumes we've already done some basic validation. |
| 140 | 147 | $query = $this->db->select('value_str, value_int') |
@@ -228,8 +228,8 @@ |
||
| 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) { |
@@ -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); |
@@ -113,8 +113,8 @@ discard block |
||
| 113 | 113 | |
| 114 | 114 | $link = preg_replace('/^(.*\/)(?:[0-9]+\.html)?$/', '$1', (string) $nodes_chapter[0]->getAttribute('href')); |
| 115 | 115 | $chapterURLSegments = explode('/', $link); |
| 116 | - $titleData['latest_chapter'] = $chapterURLSegments[5] . (isset($chapterURLSegments[6]) && !empty($chapterURLSegments[6]) ? "/{$chapterURLSegments[6]}" : ""); |
|
| 117 | - $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $nodes_latest[0]->nodeValue)); |
|
| 116 | + $titleData['latest_chapter'] = $chapterURLSegments[5].(isset($chapterURLSegments[6]) && !empty($chapterURLSegments[6]) ? "/{$chapterURLSegments[6]}" : ""); |
|
| 117 | + $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $nodes_latest[0]->nodeValue)); |
|
| 118 | 118 | } |
| 119 | 119 | } else { |
| 120 | 120 | //TODO: Throw ERRORS; |
@@ -173,8 +173,8 @@ discard block |
||
| 173 | 173 | |
| 174 | 174 | $link = preg_replace('/^(.*\/)(?:[0-9]+\.html)?$/', '$1', (string) $nodes_chapter[0]->getAttribute('href')); |
| 175 | 175 | $chapterURLSegments = explode('/', $link); |
| 176 | - $titleData['latest_chapter'] = $chapterURLSegments[5] . (isset($chapterURLSegments[6]) && !empty($chapterURLSegments[6]) ? "/{$chapterURLSegments[6]}" : ""); |
|
| 177 | - $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $nodes_latest[0]->nodeValue)); |
|
| 176 | + $titleData['latest_chapter'] = $chapterURLSegments[5].(isset($chapterURLSegments[6]) && !empty($chapterURLSegments[6]) ? "/{$chapterURLSegments[6]}" : ""); |
|
| 177 | + $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $nodes_latest[0]->nodeValue)); |
|
| 178 | 178 | } |
| 179 | 179 | } else { |
| 180 | 180 | //TODO: Throw ERRORS; |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | |
| 215 | 215 | $chapter_parts = explode(':--:', $chapter); |
| 216 | 216 | return [ |
| 217 | - 'url' => "http://bato.to/reader#" . $chapter_parts[0], |
|
| 217 | + 'url' => "http://bato.to/reader#".$chapter_parts[0], |
|
| 218 | 218 | 'number' => $chapter_parts[1] |
| 219 | 219 | ]; |
| 220 | 220 | } |
@@ -230,8 +230,8 @@ discard block |
||
| 230 | 230 | //Bato.to is annoying and locks stuff behind auth. See: https://github.com/DakuTree/manga-tracker/issues/14#issuecomment-233830855 |
| 231 | 231 | $cookies = [ |
| 232 | 232 | "lang_option={$title_lang}", |
| 233 | - "member_id=" . $this->config->item('batoto_cookie_member_id'), |
|
| 234 | - "pass_hash=" . $this->config->item('batoto_cookie_pass_hash') |
|
| 233 | + "member_id=".$this->config->item('batoto_cookie_member_id'), |
|
| 234 | + "pass_hash=".$this->config->item('batoto_cookie_pass_hash') |
|
| 235 | 235 | ]; |
| 236 | 236 | $data = $this->get_content($title_url, implode("; ", $cookies)); |
| 237 | 237 | if(!$data) { |
@@ -263,13 +263,13 @@ discard block |
||
| 263 | 263 | preg_match('/^(?:Vol\.(?<volume>\S+) )?(?:Ch.(?<chapter>[^\s:]+)):?.*/', trim($chapter_element->nodeValue), $text); |
| 264 | 264 | |
| 265 | 265 | $titleData['title'] = html_entity_decode(trim($xpath->query('//h1[@class="ipsType_pagetitle"]')->item(0)->nodeValue)); |
| 266 | - $titleData['latest_chapter'] = substr($chapter_element->getAttribute('href'), 22) . ':--:' . ((!empty($text['volume']) ? 'v'.$text['volume'].'/' : '') . 'c'.$text['chapter']); |
|
| 266 | + $titleData['latest_chapter'] = substr($chapter_element->getAttribute('href'), 22).':--:'.((!empty($text['volume']) ? 'v'.$text['volume'].'/' : '').'c'.$text['chapter']); |
|
| 267 | 267 | |
| 268 | 268 | $dateString = $updated_element->nodeValue; |
| 269 | 269 | if($dateString == 'An hour ago') { |
| 270 | 270 | $dateString = '1 hour ago'; |
| 271 | 271 | } |
| 272 | - $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime(preg_replace('/ (-|\[A\]).*$/', '', $dateString))); |
|
| 272 | + $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime(preg_replace('/ (-|\[A\]).*$/', '', $dateString))); |
|
| 273 | 273 | } else { |
| 274 | 274 | log_message('error', "Batoto: Regex missing <td> ({$title_url})"); |
| 275 | 275 | return NULL; |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | */ |
| 318 | 318 | |
| 319 | 319 | $chapterData = [ |
| 320 | - 'url' => 'http://dynasty-scans.com/chapters/' . $title_parts[0].'_'.$chapter, |
|
| 320 | + 'url' => 'http://dynasty-scans.com/chapters/'.$title_parts[0].'_'.$chapter, |
|
| 321 | 321 | 'number' => '' |
| 322 | 322 | ]; |
| 323 | 323 | |
@@ -357,14 +357,14 @@ discard block |
||
| 357 | 357 | |
| 358 | 358 | preg_match('/<b>.*<\/b>/', $data, $matchesT); |
| 359 | 359 | preg_match('/\/doujins\/[^"]+">(.+)?(?=<\/a>)<\/a>/', $data, $matchesD); |
| 360 | - $titleData['title'] = (!empty($matchesD) ? (substr($matchesD[1], 0, -7) !== 'Original' ? substr($matchesD[1], 0, -7).' - ' : '') : '') . substr($matchesT[0], 3, -4); |
|
| 360 | + $titleData['title'] = (!empty($matchesD) ? (substr($matchesD[1], 0, -7) !== 'Original' ? substr($matchesD[1], 0, -7).' - ' : '') : '').substr($matchesT[0], 3, -4); |
|
| 361 | 361 | |
| 362 | 362 | $data = preg_replace('/^[\S\s]*(<dl class=\'chapter-list\'>[\S\s]*<\/dl>)[\S\s]*$/', '$1', $data); |
| 363 | 363 | preg_match_all('/<dd>[\s\S]+?(?=<\/dd>)<\/dd>/', $data, $matches); |
| 364 | 364 | $latest_chapter_html = array_pop($matches[0]); |
| 365 | 365 | |
| 366 | 366 | preg_match('/\/chapters\/([^"]+)/', $latest_chapter_html, $matches); |
| 367 | - $titleData['latest_chapter'] = substr($matches[1], strlen($title_url)+1); |
|
| 367 | + $titleData['latest_chapter'] = substr($matches[1], strlen($title_url) + 1); |
|
| 368 | 368 | //FIXME: THIS IS A TEMP FIX, SEE https://github.com/DakuTree/manga-tracker/issues/58 |
| 369 | 369 | if(!$titleData['latest_chapter']) { |
| 370 | 370 | log_message('error', 'DynastyScans::getTitleData cannot parse title properly as it contains oneshot. || URL: '.$title_url); |
@@ -372,13 +372,13 @@ discard block |
||
| 372 | 372 | } |
| 373 | 373 | |
| 374 | 374 | preg_match('/<small>released (.*)<\/small>/', $latest_chapter_html, $matches); |
| 375 | - $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime(str_replace('\'', '', $matches[1]))); |
|
| 375 | + $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime(str_replace('\'', '', $matches[1]))); |
|
| 376 | 376 | } elseif($title_parts[1] == '1') { |
| 377 | 377 | $data = $this->get_content('http://dynasty-scans.com/chapters/'.$title_url); |
| 378 | 378 | |
| 379 | 379 | preg_match('/<b>.*<\/b>/', $data, $matchesT); |
| 380 | 380 | preg_match('/\/doujins\/[^"]+">(.+)?(?=<\/a>)<\/a>/', $data, $matchesD); |
| 381 | - $titleData['title'] = (!empty($matchesD) ? ($matchesD[1] !== 'Original' ? $matchesD[1].' - ' : '') : '') . substr($matchesT[0], 3, -4); |
|
| 381 | + $titleData['title'] = (!empty($matchesD) ? ($matchesD[1] !== 'Original' ? $matchesD[1].' - ' : '') : '').substr($matchesT[0], 3, -4); |
|
| 382 | 382 | |
| 383 | 383 | $titleData['latest_chapter'] = 'oneshot'; //This will never change |
| 384 | 384 | |
@@ -444,7 +444,7 @@ discard block |
||
| 444 | 444 | $nodes_chapter = $xpath->query("td[1]/a", $nodes_row[0]); |
| 445 | 445 | |
| 446 | 446 | $titleData['latest_chapter'] = preg_replace('/^.*\/([0-9]+)$/', '$1', (string) $nodes_chapter[0]->getAttribute('href')); |
| 447 | - $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $nodes_latest[0]->nodeValue)); |
|
| 447 | + $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $nodes_latest[0]->nodeValue)); |
|
| 448 | 448 | } |
| 449 | 449 | } else { |
| 450 | 450 | //TODO: Throw ERRORS; |
@@ -502,7 +502,7 @@ discard block |
||
| 502 | 502 | $nodes_chapter = $xpath->query("td[1]/a", $nodes_row[0]); |
| 503 | 503 | |
| 504 | 504 | $titleData['latest_chapter'] = preg_replace('/^.*\/(.*?\/[0-9]+)\/[0-9]+$/', '$1', (string) $nodes_chapter[0]->getAttribute('href')); |
| 505 | - $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $nodes_latest[0]->nodeValue)); |
|
| 505 | + $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $nodes_latest[0]->nodeValue)); |
|
| 506 | 506 | } |
| 507 | 507 | } else { |
| 508 | 508 | //TODO: Throw ERRORS; |
@@ -567,8 +567,8 @@ discard block |
||
| 567 | 567 | $titleData['title'] = trim((string) $xml->channel->title); |
| 568 | 568 | |
| 569 | 569 | $chapterURLSegments = explode('/', ((string) $xml->channel->item[0]->link)); |
| 570 | - $titleData['latest_chapter'] = preg_replace('/^.*?([0-9]+)$/', '$1', $chapterURLSegments[7]) . ':--:' . $chapterURLSegments[6]; |
|
| 571 | - $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $xml->channel->item[0]->pubDate)); |
|
| 570 | + $titleData['latest_chapter'] = preg_replace('/^.*?([0-9]+)$/', '$1', $chapterURLSegments[7]).':--:'.$chapterURLSegments[6]; |
|
| 571 | + $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $xml->channel->item[0]->pubDate)); |
|
| 572 | 572 | } |
| 573 | 573 | } else { |
| 574 | 574 | //TODO: Throw ERRORS; |
@@ -647,8 +647,8 @@ discard block |
||
| 647 | 647 | |
| 648 | 648 | $link = (string) $nodes_chapter[0]->getAttribute('href'); |
| 649 | 649 | $chapterURLSegments = explode('/', preg_replace('/\?.*$/', '', $link)); |
| 650 | - $titleData['latest_chapter'] = $chapterURLSegments[3] . ':--:' . preg_replace('/.*?([0-9]+)$/', '$1', $link); |
|
| 651 | - $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $nodes_latest[0]->textContent)); |
|
| 650 | + $titleData['latest_chapter'] = $chapterURLSegments[3].':--:'.preg_replace('/.*?([0-9]+)$/', '$1', $link); |
|
| 651 | + $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $nodes_latest[0]->textContent)); |
|
| 652 | 652 | } |
| 653 | 653 | } else { |
| 654 | 654 | //TODO: Throw ERRORS; |
@@ -683,7 +683,7 @@ discard block |
||
| 683 | 683 | $chapter_parts = explode('/', $chapter); |
| 684 | 684 | return [ |
| 685 | 685 | 'url' => "https://reader.kireicake.com/read/{$title_url}/{$chapter}", |
| 686 | - 'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '') . "c{$chapter_parts[2]}" . (isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/ |
|
| 686 | + 'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '')."c{$chapter_parts[2]}".(isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/ |
|
| 687 | 687 | ]; |
| 688 | 688 | } |
| 689 | 689 | |
@@ -714,7 +714,7 @@ discard block |
||
| 714 | 714 | |
| 715 | 715 | $link = (string) $nodes_chapter[0]->getAttribute('href'); |
| 716 | 716 | $titleData['latest_chapter'] = preg_replace('/.*\/read\/.*?\/(.*?)\/$/', '$1', $link); |
| 717 | - $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) str_replace('.', '', explode(',', $nodes_latest[0]->textContent)[1]))); |
|
| 717 | + $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) str_replace('.', '', explode(',', $nodes_latest[0]->textContent)[1]))); |
|
| 718 | 718 | } |
| 719 | 719 | } else { |
| 720 | 720 | //TODO: Throw ERRORS; |
@@ -772,7 +772,7 @@ discard block |
||
| 772 | 772 | |
| 773 | 773 | $link = (string) $nodes_chapter[0]->getAttribute('href'); |
| 774 | 774 | $titleData['latest_chapter'] = preg_replace('/^projects\/.*?\/(.*?)\/$/', '$1', $link); |
| 775 | - $titleData['last_updated'] = date("Y-m-d H:i:s", (int) $nodes_latest[0]->getAttribute('data-time')); |
|
| 775 | + $titleData['last_updated'] = date("Y-m-d H:i:s", (int) $nodes_latest[0]->getAttribute('data-time')); |
|
| 776 | 776 | } else { |
| 777 | 777 | log_message('error', "GameOfScanlation: Unable to find nodes."); |
| 778 | 778 | return NULL; |
@@ -16,13 +16,17 @@ 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 | 22 | curl_setopt($ch, CURLOPT_ENCODING , "gzip"); |
| 23 | 23 | |
| 24 | - if(!empty($cookie_string)) curl_setopt($ch, CURLOPT_COOKIE, $cookie_string); |
|
| 25 | - if(!empty($cookiejar_path)) curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiejar_path); |
|
| 24 | + if(!empty($cookie_string)) { |
|
| 25 | + curl_setopt($ch, CURLOPT_COOKIE, $cookie_string); |
|
| 26 | + } |
|
| 27 | + if(!empty($cookiejar_path)) { |
|
| 28 | + curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiejar_path); |
|
| 29 | + } |
|
| 26 | 30 | |
| 27 | 31 | //Some sites check the useragent for stuff, use a pre-defined user-agent to avoid stuff. |
| 28 | 32 | curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2824.0 Safari/537.36'); |
@@ -70,12 +74,16 @@ discard block |
||
| 70 | 74 | |
| 71 | 75 | public function isValidTitleURL(string $title_url) : bool { |
| 72 | 76 | $success = (bool) preg_match('/^[a-z0-9_]+$/', $title_url); |
| 73 | - if(!$success) log_message('error', "Invalid Title URL (MangaFox): {$title_url}"); |
|
| 77 | + if(!$success) { |
|
| 78 | + log_message('error', "Invalid Title URL (MangaFox): {$title_url}"); |
|
| 79 | + } |
|
| 74 | 80 | return $success; |
| 75 | 81 | } |
| 76 | 82 | public function isValidChapter(string $chapter) : bool { |
| 77 | 83 | $success = (bool) preg_match('/^(?:v[0-9a-zA-Z]+\/)?c[0-9\.]+$/', $chapter); |
| 78 | - if(!$success) log_message('error', 'Invalid Chapter (MangaFox): '.$chapter); |
|
| 84 | + if(!$success) { |
|
| 85 | + log_message('error', 'Invalid Chapter (MangaFox): '.$chapter); |
|
| 86 | + } |
|
| 79 | 87 | return $success; |
| 80 | 88 | } |
| 81 | 89 | |
@@ -131,12 +139,16 @@ discard block |
||
| 131 | 139 | |
| 132 | 140 | public function isValidTitleURL(string $title_url) : bool { |
| 133 | 141 | $success = (bool) preg_match('/^[a-z0-9_]+$/', $title_url); |
| 134 | - if(!$success) log_message('error', "Invalid Title URL (MangaFox): {$title_url}"); |
|
| 142 | + if(!$success) { |
|
| 143 | + log_message('error', "Invalid Title URL (MangaFox): {$title_url}"); |
|
| 144 | + } |
|
| 135 | 145 | return $success; |
| 136 | 146 | } |
| 137 | 147 | public function isValidChapter(string $chapter) : bool { |
| 138 | 148 | $success = (bool) preg_match('/^(?:v[0-9]+\/)?c[0-9]+(?:\.[0-9]+)?$/', $chapter); |
| 139 | - if(!$success) log_message('error', 'Invalid Chapter (MangaFox): '.$chapter); |
|
| 149 | + if(!$success) { |
|
| 150 | + log_message('error', 'Invalid Chapter (MangaFox): '.$chapter); |
|
| 151 | + } |
|
| 140 | 152 | return $success; |
| 141 | 153 | } |
| 142 | 154 | |
@@ -197,7 +209,9 @@ discard block |
||
| 197 | 209 | |
| 198 | 210 | public function isValidTitleURL(string $title_url) : bool { |
| 199 | 211 | $success = (bool) preg_match('/^[a-z0-9%-]+:--:(?:English|Spanish|French|German|Portuguese|Turkish|Indonesian|Greek|Filipino|Italian|Polish|Thai|Malay|Hungarian|Romanian|Arabic|Hebrew|Russian|Vietnamese|Dutch)$/', $title_url); |
| 200 | - if(!$success) log_message('error', "Invalid Title URL (Batoto): {$title_url}"); |
|
| 212 | + if(!$success) { |
|
| 213 | + log_message('error', "Invalid Title URL (Batoto): {$title_url}"); |
|
| 214 | + } |
|
| 201 | 215 | return $success; |
| 202 | 216 | } |
| 203 | 217 | public function isValidChapter(string $chapter) : bool { |
@@ -205,7 +219,9 @@ discard block |
||
| 205 | 219 | // Preferably we'd just use /^[0-9a-z]+:--:(v[0-9]+\/)?c[0-9]+(\.[0-9]+)?$/ |
| 206 | 220 | |
| 207 | 221 | $success = (bool) preg_match('/^[0-9a-z]+:--:.+$/', $chapter); |
| 208 | - if(!$success) log_message('error', 'Invalid Chapter (Batoto): '.$chapter); |
|
| 222 | + if(!$success) { |
|
| 223 | + log_message('error', 'Invalid Chapter (Batoto): '.$chapter); |
|
| 224 | + } |
|
| 209 | 225 | return $success; |
| 210 | 226 | } |
| 211 | 227 | |
@@ -298,12 +314,16 @@ discard block |
||
| 298 | 314 | |
| 299 | 315 | public function isValidTitleURL(string $title_url) : bool { |
| 300 | 316 | $success = (bool) preg_match('/^[a-z0-9_]+:--:(?:0|1)$/', $title_url); |
| 301 | - if(!$success) log_message('error', "Invalid Title URL (DynastyScans): {$title_url}"); |
|
| 317 | + if(!$success) { |
|
| 318 | + log_message('error', "Invalid Title URL (DynastyScans): {$title_url}"); |
|
| 319 | + } |
|
| 302 | 320 | return $success; |
| 303 | 321 | } |
| 304 | 322 | public function isValidChapter(string $chapter) : bool { |
| 305 | 323 | $success = (bool) preg_match('/^[0-9a-z_]+$/', $chapter); |
| 306 | - if(!$success) log_message('error', 'Invalid Chapter (DynastyScans): '.$chapter); |
|
| 324 | + if(!$success) { |
|
| 325 | + log_message('error', 'Invalid Chapter (DynastyScans): '.$chapter); |
|
| 326 | + } |
|
| 307 | 327 | return $success; |
| 308 | 328 | } |
| 309 | 329 | |
@@ -409,12 +429,16 @@ discard block |
||
| 409 | 429 | |
| 410 | 430 | public function isValidTitleURL(string $title_url) : bool { |
| 411 | 431 | $success = (bool) preg_match('/^[a-z0-9-]+$/', $title_url); |
| 412 | - if(!$success) log_message('error', "Invalid Title URL (MangaPanda): {$title_url}"); |
|
| 432 | + if(!$success) { |
|
| 433 | + log_message('error', "Invalid Title URL (MangaPanda): {$title_url}"); |
|
| 434 | + } |
|
| 413 | 435 | return $success; |
| 414 | 436 | } |
| 415 | 437 | public function isValidChapter(string $chapter) : bool { |
| 416 | 438 | $success = (bool) preg_match('/^[0-9]+$/', $chapter); |
| 417 | - if(!$success) log_message('error', 'Invalid Chapter (MangaPanda): '.$chapter); |
|
| 439 | + if(!$success) { |
|
| 440 | + log_message('error', 'Invalid Chapter (MangaPanda): '.$chapter); |
|
| 441 | + } |
|
| 418 | 442 | return $success; |
| 419 | 443 | } |
| 420 | 444 | |
@@ -461,12 +485,16 @@ discard block |
||
| 461 | 485 | |
| 462 | 486 | public function isValidTitleURL(string $title_url) : bool { |
| 463 | 487 | $success = (bool) preg_match('/^[a-z0-9_]+$/', $title_url); |
| 464 | - if(!$success) log_message('error', "Invalid Title URL (MangaStream): {$title_url}"); |
|
| 488 | + if(!$success) { |
|
| 489 | + log_message('error', "Invalid Title URL (MangaStream): {$title_url}"); |
|
| 490 | + } |
|
| 465 | 491 | return $success; |
| 466 | 492 | } |
| 467 | 493 | public function isValidChapter(string $chapter) : bool { |
| 468 | 494 | $success = (bool) preg_match('/^(.*?)\/[0-9]+$/', $chapter); |
| 469 | - if(!$success) log_message('error', 'Invalid Chapter (MangaStream): '.$chapter); |
|
| 495 | + if(!$success) { |
|
| 496 | + log_message('error', 'Invalid Chapter (MangaStream): '.$chapter); |
|
| 497 | + } |
|
| 470 | 498 | return $success; |
| 471 | 499 | } |
| 472 | 500 | |
@@ -535,12 +563,16 @@ discard block |
||
| 535 | 563 | |
| 536 | 564 | public function isValidTitleURL(string $title_url) : bool { |
| 537 | 565 | $success = (bool) preg_match('/^[0-9]+:--:(?:en|zh-hant|zh-hans|th|id):--:[a-z0-9-]+:--:(?:drama|fantasy|comedy|action|slice-of-life|romance|superhero|thriller|sports|sci-fi)$/', $title_url); |
| 538 | - if(!$success) log_message('error', "Invalid Title URL (WebToons): {$title_url}"); |
|
| 566 | + if(!$success) { |
|
| 567 | + log_message('error', "Invalid Title URL (WebToons): {$title_url}"); |
|
| 568 | + } |
|
| 539 | 569 | return $success; |
| 540 | 570 | } |
| 541 | 571 | public function isValidChapter(string $chapter) : bool { |
| 542 | 572 | $success = (bool) preg_match('/^[0-9]+:--:.*$/', $chapter); |
| 543 | - if(!$success) log_message('error', 'Invalid Chapter (WebToons): '.$chapter); |
|
| 573 | + if(!$success) { |
|
| 574 | + log_message('error', 'Invalid Chapter (WebToons): '.$chapter); |
|
| 575 | + } |
|
| 544 | 576 | return $success; |
| 545 | 577 | } |
| 546 | 578 | |
@@ -597,12 +629,16 @@ discard block |
||
| 597 | 629 | |
| 598 | 630 | public function isValidTitleURL(string $title_url) : bool { |
| 599 | 631 | $success = (bool) preg_match('/^[A-Za-z0-9-]+/', $title_url); |
| 600 | - if(!$success) log_message('error', "Invalid Title URL (KissManga): {$title_url}"); |
|
| 632 | + if(!$success) { |
|
| 633 | + log_message('error', "Invalid Title URL (KissManga): {$title_url}"); |
|
| 634 | + } |
|
| 601 | 635 | return $success; |
| 602 | 636 | } |
| 603 | 637 | public function isValidChapter(string $chapter) : bool { |
| 604 | 638 | $success = (bool) preg_match('/^.*?:--:[0-9]+$/', $chapter); |
| 605 | - if(!$success) log_message('error', 'Invalid Chapter (KissManga): '.$chapter); |
|
| 639 | + if(!$success) { |
|
| 640 | + log_message('error', 'Invalid Chapter (KissManga): '.$chapter); |
|
| 641 | + } |
|
| 606 | 642 | return $success; |
| 607 | 643 | } |
| 608 | 644 | |
@@ -669,12 +705,16 @@ discard block |
||
| 669 | 705 | |
| 670 | 706 | public function isValidTitleURL(string $title_url) : bool { |
| 671 | 707 | $success = (bool) preg_match('/^[a-z0-9_]+/', $title_url); |
| 672 | - if(!$success) log_message('error', "Invalid Title URL (KireiCake): {$title_url}"); |
|
| 708 | + if(!$success) { |
|
| 709 | + log_message('error', "Invalid Title URL (KireiCake): {$title_url}"); |
|
| 710 | + } |
|
| 673 | 711 | return $success; |
| 674 | 712 | } |
| 675 | 713 | public function isValidChapter(string $chapter) : bool { |
| 676 | 714 | $success = (bool) preg_match('/^en\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+)?)?)?$/', $chapter); |
| 677 | - if(!$success) log_message('error', 'Invalid Chapter (KireiCake): '.$chapter); |
|
| 715 | + if(!$success) { |
|
| 716 | + log_message('error', 'Invalid Chapter (KireiCake): '.$chapter); |
|
| 717 | + } |
|
| 678 | 718 | return $success; |
| 679 | 719 | } |
| 680 | 720 | |
@@ -731,12 +771,16 @@ discard block |
||
| 731 | 771 | |
| 732 | 772 | public function isValidTitleURL(string $title_url) : bool { |
| 733 | 773 | $success = (bool) preg_match('/^[a-z0-9-]+/', $title_url); |
| 734 | - if(!$success) log_message('error', "Invalid Title URL (GameOfScanlation): {$title_url}"); |
|
| 774 | + if(!$success) { |
|
| 775 | + log_message('error', "Invalid Title URL (GameOfScanlation): {$title_url}"); |
|
| 776 | + } |
|
| 735 | 777 | return $success; |
| 736 | 778 | } |
| 737 | 779 | public function isValidChapter(string $chapter) : bool { |
| 738 | 780 | $success = (bool) preg_match('/^[a-z0-9\.-]+$/', $chapter); |
| 739 | - if(!$success) log_message('error', 'Invalid Chapter (GameOfScanlation): '.$chapter); |
|
| 781 | + if(!$success) { |
|
| 782 | + log_message('error', 'Invalid Chapter (GameOfScanlation): '.$chapter); |
|
| 783 | + } |
|
| 740 | 784 | return $success; |
| 741 | 785 | } |
| 742 | 786 | |
@@ -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() { |
@@ -96,9 +96,9 @@ discard block |
||
| 96 | 96 | //$data = preg_replace('/^[\S\s]*(<body id="body">[\S\s]*<\/body>)[\S\s]*$/', '$1', $data); |
| 97 | 97 | |
| 98 | 98 | $dom = new DOMDocument(); |
| 99 | - libxml_use_internal_errors(true); |
|
| 99 | + libxml_use_internal_errors(TRUE); |
|
| 100 | 100 | $dom->loadHTML($data); |
| 101 | - libxml_use_internal_errors(false); |
|
| 101 | + libxml_use_internal_errors(FALSE); |
|
| 102 | 102 | |
| 103 | 103 | $xpath = new DOMXPath($dom); |
| 104 | 104 | |
@@ -157,9 +157,9 @@ discard block |
||
| 157 | 157 | //$data = preg_replace('/^[\S\s]*(<body id="body">[\S\s]*<\/body>)[\S\s]*$/', '$1', $data); |
| 158 | 158 | |
| 159 | 159 | $dom = new DOMDocument(); |
| 160 | - libxml_use_internal_errors(true); |
|
| 160 | + libxml_use_internal_errors(TRUE); |
|
| 161 | 161 | $dom->loadHTML($data); |
| 162 | - libxml_use_internal_errors(false); |
|
| 162 | + libxml_use_internal_errors(FALSE); |
|
| 163 | 163 | |
| 164 | 164 | $xpath = new DOMXPath($dom); |
| 165 | 165 | $nodes_title = $xpath->query("//meta[@property='og:title']"); |
@@ -245,9 +245,9 @@ discard block |
||
| 245 | 245 | if(strpos($data, '>Register now<') === FALSE) { |
| 246 | 246 | //Auth was successful |
| 247 | 247 | $dom = new DOMDocument(); |
| 248 | - libxml_use_internal_errors(true); |
|
| 248 | + libxml_use_internal_errors(TRUE); |
|
| 249 | 249 | $dom->loadHTML($data); |
| 250 | - libxml_use_internal_errors(false); |
|
| 250 | + libxml_use_internal_errors(FALSE); |
|
| 251 | 251 | |
| 252 | 252 | $xpath = new DOMXPath($dom); |
| 253 | 253 | $nodes = $xpath->query("(//div/div)[last()]/table/tbody/tr[2]"); |
@@ -428,9 +428,9 @@ discard block |
||
| 428 | 428 | //$data = preg_replace('/^[\S\s]*(<body id="body">[\S\s]*<\/body>)[\S\s]*$/', '$1', $data); |
| 429 | 429 | |
| 430 | 430 | $dom = new DOMDocument(); |
| 431 | - libxml_use_internal_errors(true); |
|
| 431 | + libxml_use_internal_errors(TRUE); |
|
| 432 | 432 | $dom->loadHTML($data); |
| 433 | - libxml_use_internal_errors(false); |
|
| 433 | + libxml_use_internal_errors(FALSE); |
|
| 434 | 434 | |
| 435 | 435 | $xpath = new DOMXPath($dom); |
| 436 | 436 | |
@@ -487,9 +487,9 @@ discard block |
||
| 487 | 487 | //$data = preg_replace('/^[\S\s]*(<body id="body">[\S\s]*<\/body>)[\S\s]*$/', '$1', $data); |
| 488 | 488 | |
| 489 | 489 | $dom = new DOMDocument(); |
| 490 | - libxml_use_internal_errors(true); |
|
| 490 | + libxml_use_internal_errors(TRUE); |
|
| 491 | 491 | $dom->loadHTML($data); |
| 492 | - libxml_use_internal_errors(false); |
|
| 492 | + libxml_use_internal_errors(FALSE); |
|
| 493 | 493 | |
| 494 | 494 | $xpath = new DOMXPath($dom); |
| 495 | 495 | |
@@ -631,9 +631,9 @@ discard block |
||
| 631 | 631 | $data = preg_replace('/^[\S\s]*(<div id="leftside">[\S\s]*)<div id="rightside">[\S\s]*$/', '$1', $data); |
| 632 | 632 | |
| 633 | 633 | $dom = new DOMDocument(); |
| 634 | - libxml_use_internal_errors(true); |
|
| 634 | + libxml_use_internal_errors(TRUE); |
|
| 635 | 635 | $dom->loadHTML($data); |
| 636 | - libxml_use_internal_errors(false); |
|
| 636 | + libxml_use_internal_errors(FALSE); |
|
| 637 | 637 | |
| 638 | 638 | $xpath = new DOMXPath($dom); |
| 639 | 639 | |
@@ -697,9 +697,9 @@ discard block |
||
| 697 | 697 | $data = preg_replace('/^[\S\s]*(<article>[\S\s]*)<\/article>[\S\s]*$/', '$1', $data); |
| 698 | 698 | |
| 699 | 699 | $dom = new DOMDocument(); |
| 700 | - libxml_use_internal_errors(true); |
|
| 700 | + libxml_use_internal_errors(TRUE); |
|
| 701 | 701 | $dom->loadHTML($data); |
| 702 | - libxml_use_internal_errors(false); |
|
| 702 | + libxml_use_internal_errors(FALSE); |
|
| 703 | 703 | |
| 704 | 704 | $xpath = new DOMXPath($dom); |
| 705 | 705 | |
@@ -756,9 +756,9 @@ discard block |
||
| 756 | 756 | //$data = preg_replace('/^[\S\s]*(<ol[\S\s]*)<\/ol>[\S\s]*$/', '$1', $data); |
| 757 | 757 | |
| 758 | 758 | $dom = new DOMDocument(); |
| 759 | - libxml_use_internal_errors(true); |
|
| 759 | + libxml_use_internal_errors(TRUE); |
|
| 760 | 760 | $dom->loadHTML($data); |
| 761 | - libxml_use_internal_errors(false); |
|
| 761 | + libxml_use_internal_errors(FALSE); |
|
| 762 | 762 | |
| 763 | 763 | $xpath = new DOMXPath($dom); |
| 764 | 764 | |
@@ -40,9 +40,9 @@ discard block |
||
| 40 | 40 | $this->load->database(); |
| 41 | 41 | |
| 42 | 42 | $query = $this->db->select('*') |
| 43 | - ->from('auth_users') |
|
| 44 | - ->where('username', $username) |
|
| 45 | - ->get(); |
|
| 43 | + ->from('auth_users') |
|
| 44 | + ->where('username', $username) |
|
| 45 | + ->get(); |
|
| 46 | 46 | |
| 47 | 47 | return (bool) $query->num_rows(); |
| 48 | 48 | } |
@@ -64,9 +64,9 @@ discard block |
||
| 64 | 64 | $this->load->database(); |
| 65 | 65 | |
| 66 | 66 | $query = $this->db->select('email') |
| 67 | - ->from('auth_users') |
|
| 68 | - ->where('username', $identity) |
|
| 69 | - ->get(); |
|
| 67 | + ->from('auth_users') |
|
| 68 | + ->where('username', $identity) |
|
| 69 | + ->get(); |
|
| 70 | 70 | |
| 71 | 71 | if($query->num_rows() > 0) { |
| 72 | 72 | //username exists, grab email |
@@ -84,9 +84,9 @@ discard block |
||
| 84 | 84 | $user = NULL; |
| 85 | 85 | |
| 86 | 86 | $query = $this->db->select('*') |
| 87 | - ->from('auth_users') |
|
| 88 | - ->where('username', $username) |
|
| 89 | - ->get(); |
|
| 87 | + ->from('auth_users') |
|
| 88 | + ->where('username', $username) |
|
| 89 | + ->get(); |
|
| 90 | 90 | |
| 91 | 91 | if($query->num_rows() > 0) { |
| 92 | 92 | $user = $query->row(); |
@@ -114,9 +114,9 @@ discard block |
||
| 114 | 114 | |
| 115 | 115 | public function get_id_from_api_key(string $api_key) { |
| 116 | 116 | $query = $this->db->select('id') |
| 117 | - ->from('auth_users') |
|
| 118 | - ->where('api_key', $api_key) |
|
| 119 | - ->get(); |
|
| 117 | + ->from('auth_users') |
|
| 118 | + ->where('api_key', $api_key) |
|
| 119 | + ->get(); |
|
| 120 | 120 | |
| 121 | 121 | if($query->num_rows() > 0) { |
| 122 | 122 | $userID = $query->row('id'); |
@@ -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]); |
@@ -71,7 +71,7 @@ |
||
| 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 | } |
@@ -1,4 +1,4 @@ |
||
| 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; |
@@ -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. |
@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php defined('BASEPATH') OR exit('No direct script access allowed'); |
|
| 1 | +<?php defined('BASEPATH') or exit('No direct script access allowed'); |
|
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | 4 | * Gravatar Library for CodeIgniter - Configuration |
@@ -17,7 +17,7 @@ discard block |
||
| 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 | -$config['gravatar_force_default_image'] = false; |
|
| 20 | +$config['gravatar_force_default_image'] = FALSE; |
|
| 21 | 21 | $config['gravatar_rating'] = ''; // '', 'g' (default), 'pg', 'r', 'x'. |
| 22 | 22 | |
| 23 | 23 | // Useragent string for server-made requests. |
@@ -66,8 +66,8 @@ discard block |
||
| 66 | 66 | | salt_prefix: Used for bcrypt. Versions of PHP before 5.3.7 only support "$2a$" as the salt prefix |
| 67 | 67 | | Versions 5.3.7 or greater should use the default of "$2y$". |
| 68 | 68 | */ |
| 69 | -$config['hash_method'] = 'bcrypt'; // sha1 or bcrypt, bcrypt is STRONGLY recommended |
|
| 70 | -$config['default_rounds'] = 8; // This does not apply if random_rounds is set to true |
|
| 69 | +$config['hash_method'] = 'bcrypt'; // sha1 or bcrypt, bcrypt is STRONGLY recommended |
|
| 70 | +$config['default_rounds'] = 8; // This does not apply if random_rounds is set to true |
|
| 71 | 71 | $config['random_rounds'] = FALSE; |
| 72 | 72 | $config['min_rounds'] = 5; |
| 73 | 73 | $config['max_rounds'] = 9; |
@@ -82,22 +82,22 @@ discard block |
||
| 82 | 82 | | The controller should check this function and act |
| 83 | 83 | | appropriately. If this variable set to 0, there is no maximum. |
| 84 | 84 | */ |
| 85 | -$config['site_title'] = "Manga Tracker"; // Site Title, example.com |
|
| 86 | -$config['admin_email'] = "[email protected]"; // Admin Email, [email protected] //TODO: Change later. |
|
| 87 | -$config['default_group'] = 'members'; // Default group, use name |
|
| 88 | -$config['admin_group'] = 'admin'; // Default administrators group, use name |
|
| 89 | -$config['identity'] = 'email'; // [NOTE: username can be used too] You can use any unique column in your table as identity column. The values in this column, alongside password, will be used for login purposes |
|
| 90 | -$config['min_password_length'] = 6; // Minimum Required Length of Password |
|
| 91 | -$config['max_password_length'] = 64; // Maximum Allowed Length of Password //TODO: Enable later. |
|
| 92 | -$config['email_activation'] = FALSE; // Email Activation for registration |
|
| 93 | -$config['manual_activation'] = FALSE; // Manual Activation for registration |
|
| 94 | -$config['remember_users'] = TRUE; // Allow users to be remembered and enable auto-login |
|
| 95 | -$config['user_expire'] = 86500; // How long to remember the user (seconds). Set to zero for no expiration |
|
| 96 | -$config['user_extend_on_login'] = TRUE; // Extend the users cookies every time they auto-login |
|
| 97 | -$config['track_login_attempts'] = FALSE; // Track the number of failed login attempts for each user or ip. |
|
| 98 | -$config['track_login_ip_address'] = TRUE; // Track login attempts by IP Address, if FALSE will track based on identity. (Default: TRUE) |
|
| 99 | -$config['maximum_login_attempts'] = 3; // The maximum number of failed login attempts. |
|
| 100 | -$config['lockout_time'] = 600; // The number of seconds to lockout an account due to exceeded attempts |
|
| 85 | +$config['site_title'] = "Manga Tracker"; // Site Title, example.com |
|
| 86 | +$config['admin_email'] = "[email protected]"; // Admin Email, [email protected] //TODO: Change later. |
|
| 87 | +$config['default_group'] = 'members'; // Default group, use name |
|
| 88 | +$config['admin_group'] = 'admin'; // Default administrators group, use name |
|
| 89 | +$config['identity'] = 'email'; // [NOTE: username can be used too] You can use any unique column in your table as identity column. The values in this column, alongside password, will be used for login purposes |
|
| 90 | +$config['min_password_length'] = 6; // Minimum Required Length of Password |
|
| 91 | +$config['max_password_length'] = 64; // Maximum Allowed Length of Password //TODO: Enable later. |
|
| 92 | +$config['email_activation'] = FALSE; // Email Activation for registration |
|
| 93 | +$config['manual_activation'] = FALSE; // Manual Activation for registration |
|
| 94 | +$config['remember_users'] = TRUE; // Allow users to be remembered and enable auto-login |
|
| 95 | +$config['user_expire'] = 86500; // How long to remember the user (seconds). Set to zero for no expiration |
|
| 96 | +$config['user_extend_on_login'] = TRUE; // Extend the users cookies every time they auto-login |
|
| 97 | +$config['track_login_attempts'] = FALSE; // Track the number of failed login attempts for each user or ip. |
|
| 98 | +$config['track_login_ip_address'] = TRUE; // Track login attempts by IP Address, if FALSE will track based on identity. (Default: TRUE) |
|
| 99 | +$config['maximum_login_attempts'] = 3; // The maximum number of failed login attempts. |
|
| 100 | +$config['lockout_time'] = 600; // The number of seconds to lockout an account due to exceeded attempts |
|
| 101 | 101 | $config['forgot_password_expiration'] = 43200000; /*12HR*/ // The number of milliseconds after which a forgot password request will expire. If set to 0, forgot password requests will not expire. |
| 102 | 102 | |
| 103 | 103 | /* |
@@ -175,11 +175,11 @@ discard block |
||
| 175 | 175 | | Message Delimiters. |
| 176 | 176 | | ------------------------------------------------------------------------- |
| 177 | 177 | */ |
| 178 | -$config['delimiters_source'] = 'config'; // "config" = use the settings defined here, "form_validation" = use the settings defined in CI's form validation library |
|
| 179 | -$config['message_start_delimiter'] = '<p>'; // Message start delimiter |
|
| 180 | -$config['message_end_delimiter'] = '</p>'; // Message end delimiter |
|
| 181 | -$config['error_start_delimiter'] = '<p>'; // Error message start delimiter |
|
| 182 | -$config['error_end_delimiter'] = '</p>'; // Error message end delimiter |
|
| 178 | +$config['delimiters_source'] = 'config'; // "config" = use the settings defined here, "form_validation" = use the settings defined in CI's form validation library |
|
| 179 | +$config['message_start_delimiter'] = '<p>'; // Message start delimiter |
|
| 180 | +$config['message_end_delimiter'] = '</p>'; // Message end delimiter |
|
| 181 | +$config['error_start_delimiter'] = '<p>'; // Error message start delimiter |
|
| 182 | +$config['error_end_delimiter'] = '</p>'; // Error message end delimiter |
|
| 183 | 183 | |
| 184 | 184 | /* End of file ion_auth.php */ |
| 185 | 185 | /* Location: ./application/config/ion_auth.php */ |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php defined('BASEPATH') OR exit('No direct script access allowed'); |
|
| 1 | +<?php defined('BASEPATH') or exit('No direct script access allowed'); |
|
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | 4 | * Rate Limiter Configuration |
@@ -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,13 +73,13 @@ 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 |
|
@@ -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,13 +73,13 @@ 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 |
|
@@ -76,7 +76,7 @@ |
||
| 76 | 76 | 'jpeg' => array('image/jpeg', 'image/pjpeg'), |
| 77 | 77 | 'jpg' => array('image/jpeg', 'image/pjpeg'), |
| 78 | 78 | 'jpe' => array('image/jpeg', 'image/pjpeg'), |
| 79 | - 'png' => array('image/png', 'image/x-png'), |
|
| 79 | + 'png' => array('image/png', 'image/x-png'), |
|
| 80 | 80 | 'tiff' => 'image/tiff', |
| 81 | 81 | 'tif' => 'image/tiff', |
| 82 | 82 | 'css' => array('text/css', 'text/plain'), |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php defined('BASEPATH') OR exit('No direct script access allowed'); |
|
| 1 | +<?php defined('BASEPATH') or exit('No direct script access allowed'); |
|
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | 4 | * Rate Limiter Configuration |
@@ -17,48 +17,48 @@ |
||
| 17 | 17 | |
| 18 | 18 | // smiley image name width height alt |
| 19 | 19 | |
| 20 | - ':-)' => array('grin.gif', '19', '19', 'grin'), |
|
| 21 | - ':lol:' => array('lol.gif', '19', '19', 'LOL'), |
|
| 22 | - ':cheese:' => array('cheese.gif', '19', '19', 'cheese'), |
|
| 23 | - ':)' => array('smile.gif', '19', '19', 'smile'), |
|
| 24 | - ';-)' => array('wink.gif', '19', '19', 'wink'), |
|
| 25 | - ';)' => array('wink.gif', '19', '19', 'wink'), |
|
| 26 | - ':smirk:' => array('smirk.gif', '19', '19', 'smirk'), |
|
| 27 | - ':roll:' => array('rolleyes.gif', '19', '19', 'rolleyes'), |
|
| 28 | - ':-S' => array('confused.gif', '19', '19', 'confused'), |
|
| 29 | - ':wow:' => array('surprise.gif', '19', '19', 'surprised'), |
|
| 30 | - ':bug:' => array('bigsurprise.gif', '19', '19', 'big surprise'), |
|
| 31 | - ':-P' => array('tongue_laugh.gif', '19', '19', 'tongue laugh'), |
|
| 32 | - '%-P' => array('tongue_rolleye.gif', '19', '19', 'tongue rolleye'), |
|
| 33 | - ';-P' => array('tongue_wink.gif', '19', '19', 'tongue wink'), |
|
| 34 | - ':P' => array('raspberry.gif', '19', '19', 'raspberry'), |
|
| 35 | - ':blank:' => array('blank.gif', '19', '19', 'blank stare'), |
|
| 36 | - ':long:' => array('longface.gif', '19', '19', 'long face'), |
|
| 37 | - ':ohh:' => array('ohh.gif', '19', '19', 'ohh'), |
|
| 38 | - ':grrr:' => array('grrr.gif', '19', '19', 'grrr'), |
|
| 39 | - ':gulp:' => array('gulp.gif', '19', '19', 'gulp'), |
|
| 40 | - '8-/' => array('ohoh.gif', '19', '19', 'oh oh'), |
|
| 41 | - ':down:' => array('downer.gif', '19', '19', 'downer'), |
|
| 42 | - ':red:' => array('embarrassed.gif', '19', '19', 'red face'), |
|
| 43 | - ':sick:' => array('sick.gif', '19', '19', 'sick'), |
|
| 44 | - ':shut:' => array('shuteye.gif', '19', '19', 'shut eye'), |
|
| 45 | - ':-/' => array('hmm.gif', '19', '19', 'hmmm'), |
|
| 46 | - '>:(' => array('mad.gif', '19', '19', 'mad'), |
|
| 47 | - ':mad:' => array('mad.gif', '19', '19', 'mad'), |
|
| 48 | - '>:-(' => array('angry.gif', '19', '19', 'angry'), |
|
| 49 | - ':angry:' => array('angry.gif', '19', '19', 'angry'), |
|
| 50 | - ':zip:' => array('zip.gif', '19', '19', 'zipper'), |
|
| 51 | - ':kiss:' => array('kiss.gif', '19', '19', 'kiss'), |
|
| 52 | - ':ahhh:' => array('shock.gif', '19', '19', 'shock'), |
|
| 53 | - ':coolsmile:' => array('shade_smile.gif', '19', '19', 'cool smile'), |
|
| 54 | - ':coolsmirk:' => array('shade_smirk.gif', '19', '19', 'cool smirk'), |
|
| 55 | - ':coolgrin:' => array('shade_grin.gif', '19', '19', 'cool grin'), |
|
| 56 | - ':coolhmm:' => array('shade_hmm.gif', '19', '19', 'cool hmm'), |
|
| 57 | - ':coolmad:' => array('shade_mad.gif', '19', '19', 'cool mad'), |
|
| 58 | - ':coolcheese:' => array('shade_cheese.gif', '19', '19', 'cool cheese'), |
|
| 59 | - ':vampire:' => array('vampire.gif', '19', '19', 'vampire'), |
|
| 60 | - ':snake:' => array('snake.gif', '19', '19', 'snake'), |
|
| 61 | - ':exclaim:' => array('exclaim.gif', '19', '19', 'exclaim'), |
|
| 62 | - ':question:' => array('question.gif', '19', '19', 'question') |
|
| 20 | + ':-)' => array('grin.gif', '19', '19', 'grin'), |
|
| 21 | + ':lol:' => array('lol.gif', '19', '19', 'LOL'), |
|
| 22 | + ':cheese:' => array('cheese.gif', '19', '19', 'cheese'), |
|
| 23 | + ':)' => array('smile.gif', '19', '19', 'smile'), |
|
| 24 | + ';-)' => array('wink.gif', '19', '19', 'wink'), |
|
| 25 | + ';)' => array('wink.gif', '19', '19', 'wink'), |
|
| 26 | + ':smirk:' => array('smirk.gif', '19', '19', 'smirk'), |
|
| 27 | + ':roll:' => array('rolleyes.gif', '19', '19', 'rolleyes'), |
|
| 28 | + ':-S' => array('confused.gif', '19', '19', 'confused'), |
|
| 29 | + ':wow:' => array('surprise.gif', '19', '19', 'surprised'), |
|
| 30 | + ':bug:' => array('bigsurprise.gif', '19', '19', 'big surprise'), |
|
| 31 | + ':-P' => array('tongue_laugh.gif', '19', '19', 'tongue laugh'), |
|
| 32 | + '%-P' => array('tongue_rolleye.gif', '19', '19', 'tongue rolleye'), |
|
| 33 | + ';-P' => array('tongue_wink.gif', '19', '19', 'tongue wink'), |
|
| 34 | + ':P' => array('raspberry.gif', '19', '19', 'raspberry'), |
|
| 35 | + ':blank:' => array('blank.gif', '19', '19', 'blank stare'), |
|
| 36 | + ':long:' => array('longface.gif', '19', '19', 'long face'), |
|
| 37 | + ':ohh:' => array('ohh.gif', '19', '19', 'ohh'), |
|
| 38 | + ':grrr:' => array('grrr.gif', '19', '19', 'grrr'), |
|
| 39 | + ':gulp:' => array('gulp.gif', '19', '19', 'gulp'), |
|
| 40 | + '8-/' => array('ohoh.gif', '19', '19', 'oh oh'), |
|
| 41 | + ':down:' => array('downer.gif', '19', '19', 'downer'), |
|
| 42 | + ':red:' => array('embarrassed.gif', '19', '19', 'red face'), |
|
| 43 | + ':sick:' => array('sick.gif', '19', '19', 'sick'), |
|
| 44 | + ':shut:' => array('shuteye.gif', '19', '19', 'shut eye'), |
|
| 45 | + ':-/' => array('hmm.gif', '19', '19', 'hmmm'), |
|
| 46 | + '>:(' => array('mad.gif', '19', '19', 'mad'), |
|
| 47 | + ':mad:' => array('mad.gif', '19', '19', 'mad'), |
|
| 48 | + '>:-(' => array('angry.gif', '19', '19', 'angry'), |
|
| 49 | + ':angry:' => array('angry.gif', '19', '19', 'angry'), |
|
| 50 | + ':zip:' => array('zip.gif', '19', '19', 'zipper'), |
|
| 51 | + ':kiss:' => array('kiss.gif', '19', '19', 'kiss'), |
|
| 52 | + ':ahhh:' => array('shock.gif', '19', '19', 'shock'), |
|
| 53 | + ':coolsmile:' => array('shade_smile.gif', '19', '19', 'cool smile'), |
|
| 54 | + ':coolsmirk:' => array('shade_smirk.gif', '19', '19', 'cool smirk'), |
|
| 55 | + ':coolgrin:' => array('shade_grin.gif', '19', '19', 'cool grin'), |
|
| 56 | + ':coolhmm:' => array('shade_hmm.gif', '19', '19', 'cool hmm'), |
|
| 57 | + ':coolmad:' => array('shade_mad.gif', '19', '19', 'cool mad'), |
|
| 58 | + ':coolcheese:' => array('shade_cheese.gif', '19', '19', 'cool cheese'), |
|
| 59 | + ':vampire:' => array('vampire.gif', '19', '19', 'vampire'), |
|
| 60 | + ':snake:' => array('snake.gif', '19', '19', 'snake'), |
|
| 61 | + ':exclaim:' => array('exclaim.gif', '19', '19', 'exclaim'), |
|
| 62 | + ':question:' => array('question.gif', '19', '19', 'question') |
|
| 63 | 63 | |
| 64 | 64 | ); |
@@ -1,5 +1,5 @@ |
||
| 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 | | ------------------------------------------------------------------------- |