@@ -1215,7 +1215,7 @@ |
||
| 1215 | 1215 | * Get list of user signups by month. |
| 1216 | 1216 | * |
| 1217 | 1217 | * @return array |
| 1218 | - */ |
|
| 1218 | + */ |
|
| 1219 | 1219 | public function getUsersByMonth() |
| 1220 | 1220 | { |
| 1221 | 1221 | return $this->pdo->query(" |
@@ -121,16 +121,16 @@ |
||
| 121 | 121 | abstract protected function formatEpisodeInfo($episode); |
| 122 | 122 | |
| 123 | 123 | /** |
| 124 | - * Retrieve releases for TV processing |
|
| 125 | - * Returns a PDO Object of rows or false if none found |
|
| 126 | - * |
|
| 127 | - * @param string $groupID -- ID of the usenet group to process |
|
| 128 | - * @param string $guidChar -- threading method by first guid character |
|
| 129 | - * @param int $lookupSetting -- whether or not to use the API |
|
| 130 | - * @param int $status -- release processing status of tv_episodes_id |
|
| 131 | - * |
|
| 132 | - * @return false|int|\PDOStatement |
|
| 133 | - */ |
|
| 124 | + * Retrieve releases for TV processing |
|
| 125 | + * Returns a PDO Object of rows or false if none found |
|
| 126 | + * |
|
| 127 | + * @param string $groupID -- ID of the usenet group to process |
|
| 128 | + * @param string $guidChar -- threading method by first guid character |
|
| 129 | + * @param int $lookupSetting -- whether or not to use the API |
|
| 130 | + * @param int $status -- release processing status of tv_episodes_id |
|
| 131 | + * |
|
| 132 | + * @return false|int|\PDOStatement |
|
| 133 | + */ |
|
| 134 | 134 | public function getTvReleases($groupID = '', $guidChar = '', $lookupSetting = 1, $status = 0) |
| 135 | 135 | { |
| 136 | 136 | $ret = 0; |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | } else { |
| 90 | 90 | ?> |
| 91 | 91 | <div class="error">Installation Locked! If reinstalling, please remove <?php echo |
| 92 | - nZEDb_CONFIGS . 'install.lock' ?>.</div> |
|
| 92 | + nZEDb_CONFIGS . 'install.lock' ?>.</div> |
|
| 93 | 93 | <?php |
| 94 | 94 | } |
| 95 | 95 | } |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | sleep(5); |
| 25 | 25 | } |
| 26 | 26 | } else { |
| 27 | - exit($pdo->log->error("tmux binary not found. Aborting\n")); |
|
| 27 | + exit($pdo->log->error("tmux binary not found. Aborting\n")); |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | $tmux = new Tmux(); |
@@ -35,12 +35,12 @@ discard block |
||
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | $token = new ApiToken(Settings::value('APIs..tmdbkey')); |
| 38 | - $tmdb = new Client($token, [ |
|
| 39 | - 'cache' => [ |
|
| 40 | - 'enabled' => false |
|
| 41 | - ] |
|
| 42 | - ] |
|
| 43 | - ); |
|
| 38 | + $tmdb = new Client($token, [ |
|
| 39 | + 'cache' => [ |
|
| 40 | + 'enabled' => false |
|
| 41 | + ] |
|
| 42 | + ] |
|
| 43 | + ); |
|
| 44 | 44 | $m = new Movie(['Settings' => $page->settings, 'TMDb' => $tmdb]); |
| 45 | 45 | |
| 46 | 46 | if (is_numeric($_REQUEST['id'])) { |
@@ -50,10 +50,10 @@ discard block |
||
| 50 | 50 | } |
| 51 | 51 | } else { |
| 52 | 52 | try { |
| 53 | - $searchm = $tmdb->getMoviesApi()->getMovie($_REQUEST['id']); |
|
| 54 | - } catch (TmdbApiException $e) { |
|
| 55 | - return false; |
|
| 56 | - } |
|
| 53 | + $searchm = $tmdb->getMoviesApi()->getMovie($_REQUEST['id']); |
|
| 54 | + } catch (TmdbApiException $e) { |
|
| 55 | + return false; |
|
| 56 | + } |
|
| 57 | 57 | if ($searchm !== false) { |
| 58 | 58 | if (isset($searchm['results'])) { |
| 59 | 59 | $obj = array(); |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | case $this->isMovie(): |
| 97 | 97 | case $this->isConsole(): |
| 98 | 98 | case $this->isBook(): |
| 99 | - case $this->isMusic(): |
|
| 99 | + case $this->isMusic(): |
|
| 100 | 100 | return $this->tmpCat; |
| 101 | 101 | } |
| 102 | 102 | |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | case $this->isHDTV(): |
| 178 | 178 | case $this->isSDTV(): |
| 179 | 179 | case $this->isPC(): |
| 180 | - case $this->isSportTV(): |
|
| 180 | + case $this->isSportTV(): |
|
| 181 | 181 | break; |
| 182 | 182 | default: |
| 183 | 183 | return false; |
@@ -636,20 +636,20 @@ discard block |
||
| 636 | 636 | |
| 637 | 637 | public function isSportTV() |
| 638 | 638 | { |
| 639 | - switch (true) { |
|
| 640 | - case preg_match('/s\d{1,3}[-._ ]?[ed]\d{1,3}([ex]\d{1,3}|[-.\w ])/i', $this->releaseName): |
|
| 641 | - return false; |
|
| 642 | - case preg_match('/[-._ ]?(Bellator|bundesliga|EPL|ESPN|FIA|la[-._ ]liga|MMA|motogp|NFL|MLB|NCAA|PGA|FIM|NJPW|red[-._ ]bull|.+race|Sengoku|Strikeforce|supercup|uefa|UFC|wtcc|WWE)[-._ ]/i', $this->releaseName): |
|
| 643 | - case preg_match('/[-._ ]?(DTM|FIFA|formula[-._ ]1|indycar|Rugby|NASCAR|NBA|NHL|NRL|netball[-._ ]anz|ROH|SBK|Superleague|The[-._ ]Ultimate[-._ ]Fighter|TNA|V8[-._ ]Supercars|WBA|WrestleMania)[-._ ]/i', $this->releaseName): |
|
| 644 | - case preg_match('/[-._ ]?(AFL|Grand Prix|Indy[-._ ]Car|(iMPACT|Smoky[-._ ]Mountain|Texas)[-._ ]Wrestling|Moto[-._ ]?GP|NSCS[-._ ]ROUND|NECW|Poker|PWX|Rugby|WCW)[-._ ]/i', $this->releaseName): |
|
| 645 | - case preg_match('/[-._ ]?(Horse)[-._ ]Racing[-._ ]/i', $this->releaseName): |
|
| 646 | - case preg_match('/[-._ ](VERUM|GRiP|Ebi|OVERTAKE)/i', $this->releaseName): |
|
| 647 | - $this->tmpCat = Category::TV_SPORT; |
|
| 648 | - |
|
| 649 | - return true; |
|
| 650 | - default: |
|
| 651 | - return false; |
|
| 652 | - } |
|
| 639 | + switch (true) { |
|
| 640 | + case preg_match('/s\d{1,3}[-._ ]?[ed]\d{1,3}([ex]\d{1,3}|[-.\w ])/i', $this->releaseName): |
|
| 641 | + return false; |
|
| 642 | + case preg_match('/[-._ ]?(Bellator|bundesliga|EPL|ESPN|FIA|la[-._ ]liga|MMA|motogp|NFL|MLB|NCAA|PGA|FIM|NJPW|red[-._ ]bull|.+race|Sengoku|Strikeforce|supercup|uefa|UFC|wtcc|WWE)[-._ ]/i', $this->releaseName): |
|
| 643 | + case preg_match('/[-._ ]?(DTM|FIFA|formula[-._ ]1|indycar|Rugby|NASCAR|NBA|NHL|NRL|netball[-._ ]anz|ROH|SBK|Superleague|The[-._ ]Ultimate[-._ ]Fighter|TNA|V8[-._ ]Supercars|WBA|WrestleMania)[-._ ]/i', $this->releaseName): |
|
| 644 | + case preg_match('/[-._ ]?(AFL|Grand Prix|Indy[-._ ]Car|(iMPACT|Smoky[-._ ]Mountain|Texas)[-._ ]Wrestling|Moto[-._ ]?GP|NSCS[-._ ]ROUND|NECW|Poker|PWX|Rugby|WCW)[-._ ]/i', $this->releaseName): |
|
| 645 | + case preg_match('/[-._ ]?(Horse)[-._ ]Racing[-._ ]/i', $this->releaseName): |
|
| 646 | + case preg_match('/[-._ ](VERUM|GRiP|Ebi|OVERTAKE)/i', $this->releaseName): |
|
| 647 | + $this->tmpCat = Category::TV_SPORT; |
|
| 648 | + |
|
| 649 | + return true; |
|
| 650 | + default: |
|
| 651 | + return false; |
|
| 652 | + } |
|
| 653 | 653 | } |
| 654 | 654 | |
| 655 | 655 | public function isDocumentaryTV() |
@@ -189,14 +189,14 @@ discard block |
||
| 189 | 189 | |
| 190 | 190 | |
| 191 | 191 | /** |
| 192 | - * Use cURL To download a web page into a string. |
|
| 193 | - * |
|
| 194 | - * @param array $options See details below. |
|
| 195 | - * |
|
| 196 | - * @return mixed|false |
|
| 197 | - * @access public |
|
| 198 | - * @static |
|
| 199 | - */ |
|
| 192 | + * Use cURL To download a web page into a string. |
|
| 193 | + * |
|
| 194 | + * @param array $options See details below. |
|
| 195 | + * |
|
| 196 | + * @return mixed|false |
|
| 197 | + * @access public |
|
| 198 | + * @static |
|
| 199 | + */ |
|
| 200 | 200 | public static function getUrl(array $options = []) |
| 201 | 201 | { |
| 202 | 202 | $defaults = [ |
@@ -208,10 +208,10 @@ discard block |
||
| 208 | 208 | 'useragent' => '', // String ; User agent string. |
| 209 | 209 | 'cookie' => '', // String ; Cookie string. |
| 210 | 210 | 'requestheaders' => [], // Array ; List of request headers. |
| 211 | - // Example: ["Content-Type: application/json", "DNT: 1"] |
|
| 211 | + // Example: ["Content-Type: application/json", "DNT: 1"] |
|
| 212 | 212 | 'verifycert' => true, // Boolean; Verify certificate authenticity? |
| 213 | - // Since curl does not have a verify self signed certs option, |
|
| 214 | - // you should use this instead if your cert is self signed. |
|
| 213 | + // Since curl does not have a verify self signed certs option, |
|
| 214 | + // you should use this instead if your cert is self signed. |
|
| 215 | 215 | ]; |
| 216 | 216 | |
| 217 | 217 | $options += $defaults; |
@@ -57,8 +57,8 @@ discard block |
||
| 57 | 57 | $rssToken = $page->userdata['rsstoken']; |
| 58 | 58 | $maxRequests = $page->userdata['apirequests']; |
| 59 | 59 | $downloadLimit = $page->userdata['downloadrequests']; |
| 60 | - $apiRequests = $page->users->getApiRequests($uid); |
|
| 61 | - $grabs = $page->userdata['grabs']; |
|
| 60 | + $apiRequests = $page->users->getApiRequests($uid); |
|
| 61 | + $grabs = $page->userdata['grabs']; |
|
| 62 | 62 | } else { |
| 63 | 63 | if (Settings::value('..registerstatus') == Settings::REGISTER_STATUS_API_ONLY) { |
| 64 | 64 | $res = $page->users->getById(0); |
@@ -114,10 +114,10 @@ discard block |
||
| 114 | 114 | 'extended' => 1, |
| 115 | 115 | 'uid' => $uid, |
| 116 | 116 | 'token' => $rssToken, |
| 117 | - 'apilimit' => $maxRequests, |
|
| 118 | - 'apirequests' => $apiRequests, |
|
| 119 | - 'downloadlimit' => $downloadLimit, |
|
| 120 | - 'grabs' => $grabs, |
|
| 117 | + 'apilimit' => $maxRequests, |
|
| 118 | + 'apirequests' => $apiRequests, |
|
| 119 | + 'downloadlimit' => $downloadLimit, |
|
| 120 | + 'grabs' => $grabs, |
|
| 121 | 121 | ]; |
| 122 | 122 | |
| 123 | 123 | if ($userCat == -3) { |
@@ -372,15 +372,15 @@ |
||
| 372 | 372 | $this->xml->endElement(); |
| 373 | 373 | } |
| 374 | 374 | |
| 375 | - public function includeLimits(): void |
|
| 376 | - { |
|
| 377 | - $this->xml->startElement($this->namespace.':apilimits'); |
|
| 378 | - $this->xml->writeAttribute('apiCurrent', $this->parameters['apirequests']); |
|
| 379 | - $this->xml->writeAttribute('apiMax', $this->parameters['apilimit']); |
|
| 380 | - $this->xml->writeAttribute('grabCurrent', $this->parameters['grabs']); |
|
| 381 | - $this->xml->writeAttribute('grabMax', $this->parameters['downloadlimit']); |
|
| 382 | - $this->xml->endElement(); |
|
| 383 | - } |
|
| 375 | + public function includeLimits(): void |
|
| 376 | + { |
|
| 377 | + $this->xml->startElement($this->namespace.':apilimits'); |
|
| 378 | + $this->xml->writeAttribute('apiCurrent', $this->parameters['apirequests']); |
|
| 379 | + $this->xml->writeAttribute('apiMax', $this->parameters['apilimit']); |
|
| 380 | + $this->xml->writeAttribute('grabCurrent', $this->parameters['grabs']); |
|
| 381 | + $this->xml->writeAttribute('grabMax', $this->parameters['downloadlimit']); |
|
| 382 | + $this->xml->endElement(); |
|
| 383 | + } |
|
| 384 | 384 | |
| 385 | 385 | /** |
| 386 | 386 | * Loop through the releases and add their info to the XML stream |