@@ -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 | } |
@@ -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'; |
@@ -72,8 +72,12 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | $arr['series'][$row->category]['manga'][] = $data; |
| 74 | 74 | |
| 75 | - if(!$arr['has_inactive']) $arr['has_inactive'] = !$data['title_data']['active']; |
|
| 76 | - if($arr['has_inactive']) $arr['inactive_titles'][$data['full_title_url']] = $data['title_data']['title']; |
|
| 75 | + if(!$arr['has_inactive']) { |
|
| 76 | + $arr['has_inactive'] = !$data['title_data']['active']; |
|
| 77 | + } |
|
| 78 | + if($arr['has_inactive']) { |
|
| 79 | + $arr['inactive_titles'][$data['full_title_url']] = $data['title_data']['title']; |
|
| 80 | + } |
|
| 77 | 81 | } |
| 78 | 82 | |
| 79 | 83 | //FIXME: This is not good for speed, but we're kind of required to do this for UX purposes. |
@@ -107,11 +111,15 @@ discard block |
||
| 107 | 111 | |
| 108 | 112 | if($sortOrder == 'asc') { |
| 109 | 113 | $unreadSort = ($a_text <=> $b_text); |
| 110 | - if($unreadSort) return $unreadSort; |
|
| 114 | + if($unreadSort) { |
|
| 115 | + return $unreadSort; |
|
| 116 | + } |
|
| 111 | 117 | return $a_text2 <=> $b_text2; |
| 112 | 118 | } else { |
| 113 | 119 | $unreadSort = ($a_text <=> $b_text); |
| 114 | - if($unreadSort) return $unreadSort; |
|
| 120 | + if($unreadSort) { |
|
| 121 | + return $unreadSort; |
|
| 122 | + } |
|
| 115 | 123 | return $b_text2 <=> $a_text2; |
| 116 | 124 | } |
| 117 | 125 | }); |
@@ -1,4 +1,6 @@ |
||
| 1 | -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
|
| 1 | +<?php if ( ! defined('BASEPATH')) { |
|
| 2 | + exit('No direct script access allowed'); |
|
| 3 | +} |
|
| 2 | 4 | /** |
| 3 | 5 | * Name: Ion Auth Lang - Turkish (UTF-8) |
| 4 | 6 | * |
@@ -1,4 +1,6 @@ |
||
| 1 | -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
|
| 1 | +<?php if ( ! defined('BASEPATH')) { |
|
| 2 | + exit('No direct script access allowed'); |
|
| 3 | +} |
|
| 2 | 4 | /** |
| 3 | 5 | * Name: Auth Lang - Turkish |
| 4 | 6 | * |
@@ -1,4 +1,6 @@ |
||
| 1 | -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
|
| 1 | +<?php if ( ! defined('BASEPATH')) { |
|
| 2 | + exit('No direct script access allowed'); |
|
| 3 | +} |
|
| 2 | 4 | /** |
| 3 | 5 | * Name: Ion Auth Lang - Bulgarian |
| 4 | 6 | * |
@@ -1,4 +1,6 @@ |
||
| 1 | -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
|
| 1 | +<?php if ( ! defined('BASEPATH')) { |
|
| 2 | + exit('No direct script access allowed'); |
|
| 3 | +} |
|
| 2 | 4 | /** |
| 3 | 5 | * Name: Auth Lang - English |
| 4 | 6 | * |
@@ -1,4 +1,6 @@ |
||
| 1 | -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
|
| 1 | +<?php if ( ! defined('BASEPATH')) { |
|
| 2 | + exit('No direct script access allowed'); |
|
| 3 | +} |
|
| 2 | 4 | /** |
| 3 | 5 | * Name: Ion Auth Lang - Swedish |
| 4 | 6 | * |
@@ -1,4 +1,6 @@ |
||
| 1 | -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
|
| 1 | +<?php if ( ! defined('BASEPATH')) { |
|
| 2 | + exit('No direct script access allowed'); |
|
| 3 | +} |
|
| 2 | 4 | /** |
| 3 | 5 | * Name: Auth Lang - Swedish |
| 4 | 6 | * |