@@ -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 | /** |
| 4 | 4 | * Checks if view file exists. |
@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | * @return bool |
| 7 | 7 | */ |
| 8 | 8 | function view_exists(string $path) : bool { |
| 9 | - return file_exists(APPPATH . "/views/{$path}.php"); |
|
| 9 | + return file_exists(APPPATH."/views/{$path}.php"); |
|
| 10 | 10 | } |
| 11 | 11 | |
| 12 | 12 | function get_time_class(string $time_string) : string { |
@@ -32,19 +32,19 @@ discard block |
||
| 32 | 32 | return $time_string; |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | -if (!function_exists('http_parse_headers')) { #http://www.php.net/manual/en/function.http-parse-headers.php#112917 |
|
| 36 | - function http_parse_headers (string $raw_headers) : array { |
|
| 35 | +if(!function_exists('http_parse_headers')) { #http://www.php.net/manual/en/function.http-parse-headers.php#112917 |
|
| 36 | + function http_parse_headers(string $raw_headers) : array { |
|
| 37 | 37 | $headers = array(); // $headers = []; |
| 38 | - foreach (explode("\n", $raw_headers) as $i => $h) { |
|
| 38 | + foreach(explode("\n", $raw_headers) as $i => $h) { |
|
| 39 | 39 | $h = explode(':', $h, 2); |
| 40 | - if (isset($h[1])){ |
|
| 41 | - if(!isset($headers[$h[0]])){ |
|
| 40 | + if(isset($h[1])) { |
|
| 41 | + if(!isset($headers[$h[0]])) { |
|
| 42 | 42 | $headers[$h[0]] = trim($h[1]); |
| 43 | - }else if(is_array($headers[$h[0]])){ |
|
| 44 | - $tmp = array_merge($headers[$h[0]],array(trim($h[1]))); |
|
| 43 | + } else if(is_array($headers[$h[0]])) { |
|
| 44 | + $tmp = array_merge($headers[$h[0]], array(trim($h[1]))); |
|
| 45 | 45 | $headers[$h[0]] = $tmp; |
| 46 | - }else{ |
|
| 47 | - $tmp = array_merge(array($headers[$h[0]]),array(trim($h[1]))); |
|
| 46 | + } else { |
|
| 47 | + $tmp = array_merge(array($headers[$h[0]]), array(trim($h[1]))); |
|
| 48 | 48 | $headers[$h[0]] = $tmp; |
| 49 | 49 | } |
| 50 | 50 | } |
@@ -32,18 +32,19 @@ |
||
| 32 | 32 | return $time_string; |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | -if (!function_exists('http_parse_headers')) { #http://www.php.net/manual/en/function.http-parse-headers.php#112917 |
|
| 35 | +if (!function_exists('http_parse_headers')) { |
|
| 36 | +#http://www.php.net/manual/en/function.http-parse-headers.php#112917 |
|
| 36 | 37 | function http_parse_headers (string $raw_headers) : array { |
| 37 | 38 | $headers = array(); // $headers = []; |
| 38 | 39 | foreach (explode("\n", $raw_headers) as $i => $h) { |
| 39 | 40 | $h = explode(':', $h, 2); |
| 40 | - if (isset($h[1])){ |
|
| 41 | - if(!isset($headers[$h[0]])){ |
|
| 41 | + if (isset($h[1])) { |
|
| 42 | + if(!isset($headers[$h[0]])) { |
|
| 42 | 43 | $headers[$h[0]] = trim($h[1]); |
| 43 | - }else if(is_array($headers[$h[0]])){ |
|
| 44 | + } else if(is_array($headers[$h[0]])) { |
|
| 44 | 45 | $tmp = array_merge($headers[$h[0]],array(trim($h[1]))); |
| 45 | 46 | $headers[$h[0]] = $tmp; |
| 46 | - }else{ |
|
| 47 | + } else { |
|
| 47 | 48 | $tmp = array_merge(array($headers[$h[0]]),array(trim($h[1]))); |
| 48 | 49 | $headers[$h[0]] = $tmp; |
| 49 | 50 | } |
@@ -53,9 +53,9 @@ |
||
| 53 | 53 | ]; |
| 54 | 54 | |
| 55 | 55 | $this->output |
| 56 | - ->set_status_header('200') |
|
| 57 | - ->set_content_type('application/json', 'utf-8') |
|
| 58 | - ->set_output(json_encode($json)); |
|
| 56 | + ->set_status_header('200') |
|
| 57 | + ->set_content_type('application/json', 'utf-8') |
|
| 58 | + ->set_output(json_encode($json)); |
|
| 59 | 59 | } else { |
| 60 | 60 | //TODO: We should probably try and have more verbose errors here. Return via JSON or something. |
| 61 | 61 | $this->output->set_status_header('400', 'Unable to update?'); |
@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | |
| 3 | 3 | if(!extension_loaded('gd')) die('GD ext is required to run this!'); |
| 4 | 4 | |
@@ -23,11 +23,11 @@ discard block |
||
| 23 | 23 | imagealphablending($sheetImage, FALSE); |
| 24 | 24 | imagesavealpha($sheetImage, TRUE); |
| 25 | 25 | |
| 26 | - imagefill($sheetImage,0,0,0x7fff0000); |
|
| 26 | + imagefill($sheetImage, 0, 0, 0x7fff0000); |
|
| 27 | 27 | |
| 28 | 28 | $x = 0; |
| 29 | - foreach ($this->fileList as $filename) { |
|
| 30 | - $siteImage = imagecreatefrompng(ICON_FOLDER. "/{$filename}"); |
|
| 29 | + foreach($this->fileList as $filename) { |
|
| 30 | + $siteImage = imagecreatefrompng(ICON_FOLDER."/{$filename}"); |
|
| 31 | 31 | imagealphablending($siteImage, TRUE); |
| 32 | 32 | |
| 33 | 33 | $dst_x = ((16 + 2) * $x); |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | if(preg_match('/\.sprite-site.*\@cache-version: ([0-9]+);/s', $oldLESS, $cvMatches)) { |
| 58 | 58 | $cacheVersion = ((int) $cvMatches[1]) + 1; |
| 59 | 59 | |
| 60 | - $newLESS = preg_replace('/\.sprite-site.*/s', '',$oldLESS); |
|
| 60 | + $newLESS = preg_replace('/\.sprite-site.*/s', '', $oldLESS); |
|
| 61 | 61 | $newLESS .= ''. |
| 62 | 62 | ".sprite-site {\n". |
| 63 | 63 | " .sprite();\n". |
@@ -1,6 +1,8 @@ |
||
| 1 | 1 | <?php declare(strict_types=1); |
| 2 | 2 | |
| 3 | -if(!extension_loaded('gd')) die('GD ext is required to run this!'); |
|
| 3 | +if(!extension_loaded('gd')) { |
|
| 4 | + die('GD ext is required to run this!'); |
|
| 5 | +} |
|
| 4 | 6 | |
| 5 | 7 | chdir(dirname(__FILE__).'/../'); //Just to make things easier, change dir to project root. |
| 6 | 8 | const ASSET_FOLDER = 'public/assets'; |
@@ -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 | class MY_Config extends CI_Config { |
| 4 | 4 | public function __construct() { |
@@ -136,7 +136,7 @@ |
||
| 136 | 136 | | |
| 137 | 137 | <a href="#" class="set-mal-id" data-mal-id="<?=$row['mal_id']?>" data-mal-type="<?=$row['mal_type']?>">Set MAL ID</a> <?php if(!is_null($row['mal_id']) && $row['mal_type'] == 'chapter') { ?><span>(<small><?=($row['mal_id'] !== '0' ? $row['mal_id'] : 'none')?></small>)</span><?php } ?> |
| 138 | 138 | | |
| 139 | - Tags (<a href="#" class="edit-tags small">Edit</a>): <span class="text-lowercase tag-list"><?=($row['has_tags'] ? implode("", array_map(function ($str) { return "<i class='tag'>{$str}</i>"; }, explode(",", $row['tag_list']))) : "none")?></span> |
|
| 139 | + Tags (<a href="#" class="edit-tags small">Edit</a>): <span class="text-lowercase tag-list"><?=($row['has_tags'] ? implode("", array_map(function($str) { return "<i class='tag'>{$str}</i>"; }, explode(",", $row['tag_list']))) : "none")?></span> |
|
| 140 | 140 | <div class="input-group hidden tag-edit"> |
| 141 | 141 | <input type="text" class="form-control" placeholder="tag1,tag2,tag3" maxlength="255" pattern='[a-z0-9-_,]{0,255}' value="<?=$row['tag_list']?>"> |
| 142 | 142 | <span class="input-group-btn"> |
@@ -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 | /** |
| 4 | 4 | * Class Tracker_Sites_Model |
@@ -114,7 +114,9 @@ discard block |
||
| 114 | 114 | */ |
| 115 | 115 | final public function isValidTitleURL(string $title_url) : bool { |
| 116 | 116 | $success = (bool) preg_match($this->titleFormat, $title_url); |
| 117 | - if(!$success) log_message('error', "Invalid Title URL ({$this->site}): {$title_url}"); |
|
| 117 | + if(!$success) { |
|
| 118 | + log_message('error', "Invalid Title URL ({$this->site}): {$title_url}"); |
|
| 119 | + } |
|
| 118 | 120 | return $success; |
| 119 | 121 | } |
| 120 | 122 | |
@@ -128,7 +130,9 @@ discard block |
||
| 128 | 130 | */ |
| 129 | 131 | final public function isValidChapter(string $chapter) : bool { |
| 130 | 132 | $success = (bool) preg_match($this->chapterFormat, $chapter); |
| 131 | - if(!$success) log_message('error', "Invalid Chapter ({$this->site}): {$chapter}"); |
|
| 133 | + if(!$success) { |
|
| 134 | + log_message('error', "Invalid Chapter ({$this->site}): {$chapter}"); |
|
| 135 | + } |
|
| 132 | 136 | return $success; |
| 133 | 137 | } |
| 134 | 138 | |
@@ -157,14 +161,20 @@ discard block |
||
| 157 | 161 | //curl_setopt($ch, CURLOPT_VERBOSE, 1); |
| 158 | 162 | curl_setopt($ch, CURLOPT_HEADER, 1); |
| 159 | 163 | |
| 160 | - if($follow_redirect) curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE); |
|
| 164 | + if($follow_redirect) { |
|
| 165 | + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE); |
|
| 166 | + } |
|
| 161 | 167 | |
| 162 | 168 | if($cookies = $this->cache->get("cloudflare_{$this->site}")) { |
| 163 | 169 | $cookie_string .= "; {$cookies}"; |
| 164 | 170 | } |
| 165 | 171 | |
| 166 | - if(!empty($cookie_string)) curl_setopt($ch, CURLOPT_COOKIE, $cookie_string); |
|
| 167 | - if(!empty($cookiejar_path)) curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiejar_path); |
|
| 172 | + if(!empty($cookie_string)) { |
|
| 173 | + curl_setopt($ch, CURLOPT_COOKIE, $cookie_string); |
|
| 174 | + } |
|
| 175 | + if(!empty($cookiejar_path)) { |
|
| 176 | + curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiejar_path); |
|
| 177 | + } |
|
| 168 | 178 | |
| 169 | 179 | //Some sites check the useragent for stuff, use a pre-defined user-agent to avoid stuff. |
| 170 | 180 | curl_setopt($ch, CURLOPT_USERAGENT, $this->userAgent); |
@@ -192,7 +202,9 @@ discard block |
||
| 192 | 202 | $body = substr($response, $header_size); |
| 193 | 203 | curl_close($ch); |
| 194 | 204 | |
| 195 | - if($status_code === 503) $refresh = $this->handleCloudFlare($url, $body); |
|
| 205 | + if($status_code === 503) { |
|
| 206 | + $refresh = $this->handleCloudFlare($url, $body); |
|
| 207 | + } |
|
| 196 | 208 | } |
| 197 | 209 | |
| 198 | 210 | return [ |
@@ -405,8 +417,12 @@ discard block |
||
| 405 | 417 | $status = FALSE; |
| 406 | 418 | |
| 407 | 419 | //Make sure we have a volume element |
| 408 | - if(count($oldChapterSegments) === 1) array_unshift($oldChapterSegments, 'v0'); |
|
| 409 | - if(count($newChapterSegments) === 1) array_unshift($newChapterSegments, 'v0'); |
|
| 420 | + if(count($oldChapterSegments) === 1) { |
|
| 421 | + array_unshift($oldChapterSegments, 'v0'); |
|
| 422 | + } |
|
| 423 | + if(count($newChapterSegments) === 1) { |
|
| 424 | + array_unshift($newChapterSegments, 'v0'); |
|
| 425 | + } |
|
| 410 | 426 | |
| 411 | 427 | $oldCount = count($oldChapterSegments); |
| 412 | 428 | $newCount = count($newChapterSegments); |
@@ -419,8 +435,12 @@ discard block |
||
| 419 | 435 | $newVolume = substr(array_shift($newChapterSegments), 1); |
| 420 | 436 | |
| 421 | 437 | //Forcing volume to 0 as TBD might not be the latest (although it can be, but that is covered by other checks) |
| 422 | - if(in_array($oldVolume, ['TBD', 'TBA', 'NA', 'LMT'])) $oldVolume = 0; |
|
| 423 | - if(in_array($newVolume, ['TBD', 'TBA', 'NA', 'LMT'])) $newVolume = 0; |
|
| 438 | + if(in_array($oldVolume, ['TBD', 'TBA', 'NA', 'LMT'])) { |
|
| 439 | + $oldVolume = 0; |
|
| 440 | + } |
|
| 441 | + if(in_array($newVolume, ['TBD', 'TBA', 'NA', 'LMT'])) { |
|
| 442 | + $newVolume = 0; |
|
| 443 | + } |
|
| 424 | 444 | |
| 425 | 445 | $oldVolume = floatval($oldVolume); |
| 426 | 446 | $newVolume = floatval($newVolume); |
@@ -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 | /** |
| 4 | 4 | * Class Tracker_Sites_Model |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | |
| 165 | 165 | $ch = curl_init(); |
| 166 | 166 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
| 167 | - curl_setopt($ch, CURLOPT_ENCODING , "gzip"); |
|
| 167 | + curl_setopt($ch, CURLOPT_ENCODING, "gzip"); |
|
| 168 | 168 | //curl_setopt($ch, CURLOPT_VERBOSE, 1); |
| 169 | 169 | curl_setopt($ch, CURLOPT_HEADER, 1); |
| 170 | 170 | |
@@ -186,8 +186,8 @@ discard block |
||
| 186 | 186 | curl_setopt($ch, CURLOPT_URL, $url); |
| 187 | 187 | |
| 188 | 188 | if($isPost) { |
| 189 | - curl_setopt($ch,CURLOPT_POST, count($postFields)); |
|
| 190 | - curl_setopt($ch,CURLOPT_POSTFIELDS, http_build_query($postFields)); |
|
| 189 | + curl_setopt($ch, CURLOPT_POST, count($postFields)); |
|
| 190 | + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postFields)); |
|
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | $response = curl_exec($ch); |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | $result = shell_exec('python '.APPPATH.'../_scripts/get_cloudflare_cookie.py '.escapeshellarg(json_encode($urlData))); |
| 235 | 235 | $cookieData = json_decode($result, TRUE); |
| 236 | 236 | |
| 237 | - $this->cache->save("cloudflare_{$this->site}", $cookieData['cookies'], 31536000 /* 1 year, or until we renew it */); |
|
| 237 | + $this->cache->save("cloudflare_{$this->site}", $cookieData['cookies'], 31536000 /* 1 year, or until we renew it */); |
|
| 238 | 238 | log_message('debug', "Saving CloudFlare Cookies for {$this->site}"); |
| 239 | 239 | |
| 240 | 240 | $refresh = TRUE; |
@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | |
| 287 | 287 | $dom = new DOMDocument(); |
| 288 | 288 | libxml_use_internal_errors(TRUE); |
| 289 | - $dom->loadHTML('<?xml encoding="utf-8" ?>' . $data); |
|
| 289 | + $dom->loadHTML('<?xml encoding="utf-8" ?>'.$data); |
|
| 290 | 290 | libxml_use_internal_errors(FALSE); |
| 291 | 291 | |
| 292 | 292 | $xpath = new DOMXPath($dom); |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | if($nodes_title->length === 1) { |
| 296 | 296 | if($nodes_row->length === 1) { |
| 297 | 297 | $firstRow = $nodes_row->item(0); |
| 298 | - $nodes_latest = $xpath->query($node_latest_string, $firstRow); |
|
| 298 | + $nodes_latest = $xpath->query($node_latest_string, $firstRow); |
|
| 299 | 299 | |
| 300 | 300 | if($node_chapter_string !== '') { |
| 301 | 301 | $nodes_chapter = $xpath->query($node_chapter_string, $firstRow); |
@@ -501,7 +501,7 @@ discard block |
||
| 501 | 501 | $chapter_parts = explode('/', $chapter); //returns #LANG#/#VOLUME#/#CHAPTER#/#CHAPTER_EXTRA#(/#PAGE#/) |
| 502 | 502 | return [ |
| 503 | 503 | 'url' => $this->getChapterURL($title_url, $chapter), |
| 504 | - 'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '') . "c{$chapter_parts[2]}" . (isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/ |
|
| 504 | + 'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '')."c{$chapter_parts[2]}".(isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/ |
|
| 505 | 505 | ]; |
| 506 | 506 | } |
| 507 | 507 | public function getChapterURL(string $title_url, string $chapter) : string { |
@@ -683,9 +683,9 @@ discard block |
||
| 683 | 683 | |
| 684 | 684 | $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. |
| 685 | 685 | if($dateString == 'T') { |
| 686 | - $dateString = date("Y-m-d",now()); |
|
| 686 | + $dateString = date("Y-m-d", now()); |
|
| 687 | 687 | } |
| 688 | - $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime($dateString . ' 00:00')); |
|
| 688 | + $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime($dateString.' 00:00')); |
|
| 689 | 689 | |
| 690 | 690 | $titleDataList[$title_url] = $titleData; |
| 691 | 691 | } |
@@ -740,7 +740,7 @@ discard block |
||
| 740 | 740 | //For whatever reason, DOMDocument breaks the <link> element we need to grab the chapter, so we have to grab it elsewhere. |
| 741 | 741 | $titleData['latest_chapter'] = preg_replace('/^.*? - ([0-9\.]+) - .*?$/', '$1', trim($data['nodes_chapter']->textContent)); |
| 742 | 742 | |
| 743 | - $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $data['nodes_latest']->textContent)); |
|
| 743 | + $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $data['nodes_latest']->textContent)); |
|
| 744 | 744 | } |
| 745 | 745 | |
| 746 | 746 | return (!empty($titleData) ? $titleData : NULL); |
@@ -842,11 +842,11 @@ discard block |
||
| 842 | 842 | "" |
| 843 | 843 | ); |
| 844 | 844 | if($data) { |
| 845 | - $titleData['title'] = trim(preg_replace('/ Added on .*$/','', $data['nodes_title']->textContent)); |
|
| 845 | + $titleData['title'] = trim(preg_replace('/ Added on .*$/', '', $data['nodes_title']->textContent)); |
|
| 846 | 846 | $titleData['latest_chapter'] = preg_replace('/^.*\/([0-9\.]+)$/', '$1', (string) $data['nodes_chapter']->getAttribute('href')); |
| 847 | 847 | |
| 848 | - $dateString = preg_replace('/^Added (?:on )?/', '',$data['nodes_latest']->textContent); |
|
| 849 | - $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime($dateString)); |
|
| 848 | + $dateString = preg_replace('/^Added (?:on )?/', '', $data['nodes_latest']->textContent); |
|
| 849 | + $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime($dateString)); |
|
| 850 | 850 | } |
| 851 | 851 | return (!empty($titleData) ? $titleData : NULL); |
| 852 | 852 | } |
@@ -1,11 +1,11 @@ |
||
| 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 | //Because we can't autoload the cache driver with params - https://forum.codeigniter.com/thread-62217-post-319687.html#pid319687 |
| 4 | 4 | class Cacher { |
| 5 | 5 | protected $CI; |
| 6 | 6 | |
| 7 | 7 | public function __construct() { |
| 8 | - $this->CI =& get_instance(); //grab an instance of CI |
|
| 8 | + $this->CI = & get_instance(); //grab an instance of CI |
|
| 9 | 9 | $this->initiate_cache(); |
| 10 | 10 | } |
| 11 | 11 | |
@@ -11,9 +11,9 @@ |
||
| 11 | 11 | |
| 12 | 12 | //This is pretty barebones issue reporting, and honestly not a great way to do it, but it works for now (until the Github is public). |
| 13 | 13 | $body = "". |
| 14 | - (!is_null($url) && !empty($url) ? "URL: ".htmlspecialchars(substr($url, 0, 255))."<br>\n" : ""). |
|
| 15 | - "Submitted by: ".$this->input->ip_address().(!is_null($userID) ? "| {$userID}" : "")."<br>\n". |
|
| 16 | - "<br>Bug report: ".htmlspecialchars(substr($text, 0, 1000)); |
|
| 14 | + (!is_null($url) && !empty($url) ? "URL: ".htmlspecialchars(substr($url, 0, 255))."<br>\n" : ""). |
|
| 15 | + "Submitted by: ".$this->input->ip_address().(!is_null($userID) ? "| {$userID}" : "")."<br>\n". |
|
| 16 | + "<br>Bug report: ".htmlspecialchars(substr($text, 0, 1000)); |
|
| 17 | 17 | |
| 18 | 18 | $success = TRUE; |
| 19 | 19 | $this->email->from('[email protected]', $this->config->item('site_title', 'ion_auth')); |
@@ -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 Tracker_Issue_Model extends Tracker_Base_Model { |
| 4 | 4 | public function __construct() { |
@@ -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 Tracker_Issue_Model extends Tracker_Base_Model { |
| 4 | 4 | public function __construct() { |
@@ -12,12 +12,12 @@ |
||
| 12 | 12 | $this->header_data['page'] = "report-issue"; |
| 13 | 13 | |
| 14 | 14 | $this->form_validation->set_rules('issue_description', 'Description', 'required|max_length[255]'); |
| 15 | - $this->form_validation->set_rules('issue_url', 'URL', 'valid_url'); |
|
| 15 | + $this->form_validation->set_rules('issue_url', 'URL', 'valid_url'); |
|
| 16 | 16 | |
| 17 | 17 | $this->body_data['issue_submitted'] = FALSE; |
| 18 | 18 | if($isValid = $this->form_validation->run() === TRUE) { |
| 19 | 19 | //send report |
| 20 | - $this->body_data['issue_submitted'] = $this->Tracker->issue->report("USERID:" . $this->User->id . " ||| " . $this->input->post('issue_description'), NULL, $this->input->post('issue_url')); |
|
| 20 | + $this->body_data['issue_submitted'] = $this->Tracker->issue->report("USERID:".$this->User->id." ||| ".$this->input->post('issue_description'), NULL, $this->input->post('issue_url')); |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | if(!$isValid) { |
@@ -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 | class ReportIssue extends MY_Controller { |
| 4 | 4 | public function __construct() { |