mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Replace array() with shorthand.
This commit is contained in:
@@ -47,9 +47,9 @@ class Snoopy
|
||||
var $proxy_port = ""; // proxy port to use
|
||||
var $agent = "Snoopy v1.0"; // agent we masquerade as
|
||||
var $referer = ""; // referer info to pass
|
||||
var $cookies = array(); // array of cookies to pass
|
||||
var $cookies = []; // array of cookies to pass
|
||||
// $cookies["username"]="joe";
|
||||
var $rawheaders = array(); // array of raw headers to send
|
||||
var $rawheaders = []; // array of raw headers to send
|
||||
// $rawheaders["Content-type"]="text/html";
|
||||
|
||||
var $maxredirs = 5; // http redirection depth maximum. 0 = disallow
|
||||
@@ -73,7 +73,7 @@ class Snoopy
|
||||
|
||||
var $error = ""; // error messages sent here
|
||||
var $response_code = ""; // response code returned from server
|
||||
var $headers = array(); // headers returned from server sent here
|
||||
var $headers = []; // headers returned from server sent here
|
||||
var $maxlength = 500000; // max return data length (body)
|
||||
var $read_timeout = 0; // timeout on read operations, in seconds
|
||||
// supported only since PHP 4 Beta 4
|
||||
@@ -107,7 +107,7 @@ class Snoopy
|
||||
var $_mime_boundary = ""; // MIME boundary for multipart/form-data submit type
|
||||
var $_redirectaddr = false; // will be set if page fetched is a redirect
|
||||
var $_redirectdepth = 0; // increments on an http redirect
|
||||
var $_frameurls = array(); // frame src urls
|
||||
var $_frameurls = []; // frame src urls
|
||||
var $_framedepth = 0; // increments on frame depth
|
||||
|
||||
var $_isproxy = false; // set if using a proxy server
|
||||
@@ -173,7 +173,7 @@ class Snoopy
|
||||
if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0)
|
||||
{
|
||||
$frameurls = $this->_frameurls;
|
||||
$this->_frameurls = array();
|
||||
$this->_frameurls = [];
|
||||
|
||||
while(list(,$frameurl) = each($frameurls))
|
||||
{
|
||||
@@ -232,7 +232,7 @@ class Snoopy
|
||||
if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0)
|
||||
{
|
||||
$frameurls = $this->_frameurls;
|
||||
$this->_frameurls = array();
|
||||
$this->_frameurls = [];
|
||||
|
||||
while(list(,$frameurl) = each($frameurls))
|
||||
{
|
||||
@@ -592,7 +592,7 @@ class Snoopy
|
||||
if($this->passcookies && $this->_redirectaddr)
|
||||
$this->setcookies();
|
||||
|
||||
$headers = array();
|
||||
$headers = [];
|
||||
|
||||
$URI_PARTS = parse_url($URI);
|
||||
if(empty($url))
|
||||
|
||||
@@ -122,7 +122,7 @@ function fetch_rss ($url) {
|
||||
|
||||
|
||||
$cache_status = 0; // response of check_cache
|
||||
$request_headers = array(); // HTTP headers to send with fetch
|
||||
$request_headers = []; // HTTP headers to send with fetch
|
||||
$rss = 0; // parsed RSS object
|
||||
$errormsg = 0; // errors, if any
|
||||
|
||||
|
||||
@@ -34,11 +34,11 @@ require_once (MAGPIE_DIR . 'rss_utils.inc');
|
||||
class MagpieRSS {
|
||||
var $parser;
|
||||
|
||||
var $current_item = array(); // item currently being parsed
|
||||
var $items = array(); // collection of parsed items
|
||||
var $channel = array(); // hash of channel fields
|
||||
var $textinput = array();
|
||||
var $image = array();
|
||||
var $current_item = []; // item currently being parsed
|
||||
var $items = []; // collection of parsed items
|
||||
var $channel = []; // hash of channel fields
|
||||
var $textinput = [];
|
||||
var $image = [];
|
||||
var $feed_type;
|
||||
var $feed_version;
|
||||
var $encoding = ''; // output encoding of parsed rss
|
||||
@@ -54,7 +54,7 @@ class MagpieRSS {
|
||||
var $_KNOWN_ENCODINGS = array('UTF-8', 'US-ASCII', 'ISO-8859-1');
|
||||
|
||||
// parser variables, useless if you're not a parser, treat as private
|
||||
var $stack = array(); // parser stack
|
||||
var $stack = []; // parser stack
|
||||
var $inchannel = false;
|
||||
var $initem = false;
|
||||
var $incontent = false; // if in Atom <content mode="xml"> field
|
||||
@@ -279,7 +279,7 @@ class MagpieRSS {
|
||||
if ( $el == 'item' or $el == 'entry' )
|
||||
{
|
||||
$this->items[] = $this->current_item;
|
||||
$this->current_item = array();
|
||||
$this->current_item = [];
|
||||
$this->initem = false;
|
||||
}
|
||||
elseif ($this->feed_type == RSS and $this->current_namespace == '' and $el == 'textinput' )
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
require_once('config.php');
|
||||
|
||||
$type = isset($_GET["t"]) ? $_GET["t"] : "tv";
|
||||
$reqid = isset($_GET["reqid"]) ? explode(",",$_GET["reqid"]) : array();
|
||||
$reqid = isset($_GET["reqid"]) ? explode(",",$_GET["reqid"]) : [];
|
||||
$uid = isset($_GET["newznabID"]) ? $_GET["newznabID"] : "";
|
||||
|
||||
//
|
||||
|
||||
@@ -54,7 +54,7 @@ $files = new \RegexIterator(
|
||||
);
|
||||
|
||||
$i = 1;
|
||||
$nzbFiles = array();
|
||||
$nzbFiles = [];
|
||||
foreach ($files as $file) {
|
||||
$nzbFiles[] = $file[0];
|
||||
if ($i++ >= $argv[5]) {
|
||||
|
||||
@@ -1 +1 @@
|
||||
<?php
|
||||
<?php
|
||||
@@ -1 +1 @@
|
||||
<?php
|
||||
<?php
|
||||
@@ -6,7 +6,7 @@ use newznab\db\Settings;
|
||||
|
||||
$movie = new Movie(true);
|
||||
$db = new Settings();
|
||||
$movies = array();
|
||||
$movies = [];
|
||||
$counter = 1;
|
||||
$sleepsecsbetweenscrape = 1;
|
||||
|
||||
|
||||
@@ -435,7 +435,7 @@ if(array_key_exists("t", $options) ||
|
||||
'title' => 'l2g newznab'
|
||||
),
|
||||
'postdate_utc' => $spotnab->local2utc(),
|
||||
'comments' => array()
|
||||
'comments' => []
|
||||
);
|
||||
for($i=0;$i<3000;$i++){
|
||||
// Build large post
|
||||
|
||||
@@ -211,7 +211,7 @@ $total=0;
|
||||
$offset=0;
|
||||
|
||||
# Dictionary
|
||||
$pspelldict=array();
|
||||
$pspelldict=[];
|
||||
|
||||
# Completion Refernece Time in past
|
||||
$completionRef = strtotime("-$completionSec seconds");
|
||||
@@ -246,7 +246,7 @@ while($res=get_block($offset, $batch)){
|
||||
// if a white list is detected we now are required to
|
||||
// only accept the entry if it matches at least 1 whitelist
|
||||
// while a blacklist will over-ride all
|
||||
$whitelist = array();
|
||||
$whitelist = [];
|
||||
$matches_whitelist = false;
|
||||
|
||||
foreach ($blacklist as $bl)
|
||||
@@ -343,7 +343,7 @@ while($res=get_block($offset, $batch)){
|
||||
}
|
||||
# ensure whitelist flags are off to avoid extra processing
|
||||
# at the end of this loop (Below)
|
||||
$whitelist = array();
|
||||
$whitelist = [];
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -369,7 +369,7 @@ while($res=get_block($offset, $batch)){
|
||||
}
|
||||
# ensure whitelist flags are off to avoid extra processing
|
||||
# at the end of this loop (Below)
|
||||
$whitelist = array();
|
||||
$whitelist = [];
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -390,7 +390,7 @@ while($res=get_block($offset, $batch)){
|
||||
}
|
||||
# ensure whitelist flags are off to avoid extra processing
|
||||
# at the end of this loop (Below)
|
||||
$whitelist = array();
|
||||
$whitelist = [];
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -435,7 +435,7 @@ while($res=get_block($offset, $batch)){
|
||||
}
|
||||
# ensure whitelist flags are off to avoid extra processing
|
||||
# at the end of this loop (Below)
|
||||
$whitelist = array();
|
||||
$whitelist = [];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,14 +22,14 @@ if (isset($argv[1])) {
|
||||
|
||||
function relativeTime($_time)
|
||||
{
|
||||
$d = array();
|
||||
$d = [];
|
||||
$d[0] = array(1, "sec");
|
||||
$d[1] = array(60, "min");
|
||||
$d[2] = array(3600, "hr");
|
||||
$d[3] = array(86400, "day");
|
||||
$d[4] = array(31104000, "yr");
|
||||
|
||||
$w = array();
|
||||
$w = [];
|
||||
|
||||
$return = "";
|
||||
$now = TIME();
|
||||
|
||||
@@ -13,7 +13,7 @@ function SplitSQL($file, $delimiter = ';')
|
||||
$file = fopen($file, 'r');
|
||||
|
||||
if (is_resource($file) === true) {
|
||||
$query = array();
|
||||
$query = [];
|
||||
$db = new DB();
|
||||
$dbsys = DB_TYPE;
|
||||
$c = new ColorCLI();
|
||||
@@ -60,7 +60,7 @@ function SplitSQL($file, $delimiter = ';')
|
||||
}
|
||||
|
||||
if (is_string($query) === true) {
|
||||
$query = array();
|
||||
$query = [];
|
||||
}
|
||||
}
|
||||
return fclose($file);
|
||||
@@ -105,7 +105,7 @@ if (isset($os) && $os == "unix") {
|
||||
$tmux = $t->get();
|
||||
$currentversion = $tmux->sqlpatch;
|
||||
$patched = 0;
|
||||
$patches = array();
|
||||
$patches = [];
|
||||
$db = new DB();
|
||||
$backedup = false;
|
||||
$c = new ColorCLI();
|
||||
@@ -152,7 +152,7 @@ if (isset($os) && $os == "unix") {
|
||||
$tmux = $t->get();
|
||||
$currentversion = $tmux->sqlpatch;
|
||||
$patched = 0;
|
||||
$patches = array();
|
||||
$patches = [];
|
||||
|
||||
// Open the patch folder.
|
||||
if (!isset($argv[1])) {
|
||||
|
||||
@@ -56,7 +56,7 @@ function create_guids($live, $delete = false)
|
||||
}
|
||||
continue;
|
||||
}
|
||||
$binary_names = array();
|
||||
$binary_names = [];
|
||||
foreach ($nzbfile->file as $file) {
|
||||
$binary_names[] = $file["subject"];
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ class HashAlgorithms
|
||||
|
||||
$firstArray = $this->_hashesToArray($this->_inputString);
|
||||
|
||||
$secondArray = array();
|
||||
$secondArray = [];
|
||||
foreach ($firstArray as $key => $value) {
|
||||
if (!$this->_writeToFile) {
|
||||
if (in_array($value, $this->_expectedString)) {
|
||||
@@ -89,7 +89,7 @@ class HashAlgorithms
|
||||
$secondArray[$key] = $this->_hashesToArray($value);
|
||||
}
|
||||
|
||||
$thirdArray = array();
|
||||
$thirdArray = [];
|
||||
foreach ($secondArray as $key => $value) {
|
||||
foreach ($value as $key2 => $value2) {
|
||||
if (!$this->_writeToFile) {
|
||||
@@ -171,7 +171,7 @@ class HashAlgorithms
|
||||
);
|
||||
|
||||
$hashTypes = array('md5', 'md4', 'sha1', 'sha256', 'sha512');
|
||||
$tmpArray = array();
|
||||
$tmpArray = [];
|
||||
foreach ($hashTypes as $hash) {
|
||||
foreach ($strings as $key => $value) {
|
||||
$tmpArray[$hash . '_' . $key] = hash($hash, $value, false);
|
||||
|
||||
@@ -44,7 +44,7 @@ if ($groups === false) {
|
||||
echo "No active groups. Fix not needed.\n";
|
||||
} else {
|
||||
|
||||
$queries = array();
|
||||
$queries = [];
|
||||
|
||||
switch ($argv[1]) {
|
||||
case 1:
|
||||
|
||||
@@ -36,7 +36,7 @@ if (!is_writable(NN_RES)) {
|
||||
exit('The (' . NN_RES . ') folder must be writable.' . PHP_EOL);
|
||||
}
|
||||
|
||||
$progress = rw_progress(settings_array());
|
||||
$progress = rw_progress(settings_[]);
|
||||
|
||||
if (!isset($argv[1]) || !is_numeric($argv[1]) && $argv[1] != 'progress' || !isset($argv[2]) ||
|
||||
!in_array($argv[2], ['local', 'remote']) || !isset($argv[3]) ||
|
||||
|
||||
@@ -45,7 +45,7 @@ my ($ib_bp_used, $ib_bp_total, $ib_bp_read_ratio);
|
||||
my ($relative_live, $relative_infiles);
|
||||
my $real_uptime;
|
||||
my (%stats_present, %stats_past); # For relative reports
|
||||
|
||||
|
||||
GetOptions (
|
||||
\%op,
|
||||
"user=s",
|
||||
@@ -72,7 +72,7 @@ get_user_mycnf() unless $op{'no-mycnf'};
|
||||
# Command line options override ~/.my.cnf
|
||||
$mycnf{'host'} = $op{'host'} if have_op 'host';
|
||||
$mycnf{'port'} = $op{'port'} if have_op 'port';
|
||||
$mycnf{'socket'} = $op{'socket'} if have_op 'socket';
|
||||
$mycnf{'socket'} = $op{'socket'} if have_op 'socket';
|
||||
$mycnf{'user'} = $op{'user'} if have_op 'user';
|
||||
|
||||
$mycnf{'user'} ||= $ENV{'USER'};
|
||||
@@ -138,8 +138,8 @@ $have_innodb_vals = 1; # This might be set to 0 later in get_MySQL_version()
|
||||
if(defined $op{'r'})
|
||||
{
|
||||
if($relative_live)
|
||||
{
|
||||
print STDERR "mysqlreport is writing relative reports to '$tmpfile'.\n" unless $op{'detach'};
|
||||
{
|
||||
print STDERR "mysqlreport is writing relative reports to '$tmpfile'.\n" unless $op{'detach'};
|
||||
get_MySQL_version();
|
||||
collect_reports();
|
||||
}
|
||||
@@ -434,7 +434,7 @@ sub get_vals
|
||||
$query = $dbh->prepare("SHOW STATUS;");
|
||||
}
|
||||
$query->execute();
|
||||
while(@row = $query->fetchrow_array()) { $stats{$row[0]} = $row[1]; }
|
||||
while(@row = $query->fetchrow_[]) { $stats{$row[0]} = $row[1]; }
|
||||
|
||||
$real_uptime = $stats{'Uptime'};
|
||||
}
|
||||
@@ -448,7 +448,7 @@ sub get_vars
|
||||
# Get server system variables
|
||||
$query = $dbh->prepare("SHOW VARIABLES;");
|
||||
$query->execute();
|
||||
while(@row = $query->fetchrow_array()) { $vars{$row[0]} = $row[1]; }
|
||||
while(@row = $query->fetchrow_[]) { $vars{$row[0]} = $row[1]; }
|
||||
|
||||
# table_cache was renamed to table_open_cache in MySQL 5.1.3
|
||||
if($MySQL_version >= 50103)
|
||||
@@ -471,7 +471,7 @@ sub read_infile
|
||||
$vars{'table_cache'} = 64 if !exists $vars{'table_cache'};
|
||||
$vars{'max_connections'} = 100 if !exists $vars{'max_connections'};
|
||||
$vars{'key_buffer_size'} = 8388600 if !exists $vars{'key_buffer_size'}; # 8M
|
||||
$vars{'thread_cache_size'} = 0 if !exists $vars{'thread_cache_size'};
|
||||
$vars{'thread_cache_size'} = 0 if !exists $vars{'thread_cache_size'};
|
||||
$vars{'tmp_table_size'} = 0 if !exists $vars{'tmp_table_size'};
|
||||
$vars{'long_query_time'} = '?' if !exists $vars{'long_query_time'};
|
||||
$vars{'log_slow_queries'} = '?' if !exists $vars{'log_slow_queries'};
|
||||
@@ -487,7 +487,7 @@ sub read_infile
|
||||
{
|
||||
last if !defined $_;
|
||||
|
||||
next if /^\+/; # skip divider lines
|
||||
next if /^\+/; # skip divider lines
|
||||
next if /^$/; # skip blank lines
|
||||
|
||||
next until /(Aborted_clients|back_log|=)/;
|
||||
@@ -580,7 +580,7 @@ sub get_MySQL_version
|
||||
|
||||
$query = $dbh->prepare("SHOW VARIABLES LIKE 'version';");
|
||||
$query->execute();
|
||||
@row = $query->fetchrow_array();
|
||||
@row = $query->fetchrow_[];
|
||||
($major, $minor, $patch) = ($row[1] =~ /(\d{1,2})\.(\d{1,2})\.(\d{1,2})/);
|
||||
}
|
||||
|
||||
@@ -731,8 +731,8 @@ sub write_report
|
||||
$~ = 'SLOW_DMS', write;
|
||||
write_DMS();
|
||||
write_Com();
|
||||
$~ = 'SAS', write;
|
||||
write_qcache();
|
||||
$~ = 'SAS', write;
|
||||
write_qcache();
|
||||
$~ = 'REPORT_END', write;
|
||||
$~ = 'TAB', write;
|
||||
|
||||
@@ -757,10 +757,10 @@ sub sec_to_dhms # Seconds to days hours:minutes:seconds
|
||||
$h = int $s / 3600;
|
||||
$s -= $h * 3600;
|
||||
}
|
||||
|
||||
|
||||
$m = int $s / 60;
|
||||
$s -= $m * 60;
|
||||
|
||||
|
||||
return "$d $h:$m:$s";
|
||||
}
|
||||
|
||||
@@ -1095,7 +1095,7 @@ $stat_name, make_short($stat_val), t($stat_val), $stat_label, perc($stat_val, $q
|
||||
.
|
||||
|
||||
format SLOW_DMS =
|
||||
Slow @<<<<<<< @>>>>>> @>>>>>/s @>>>>> %DMS: @>>>>> Log: @>>
|
||||
Slow @<<<<<<< @>>>>>> @>>>>>/s @>>>>> %DMS: @>>>>> Log: @>>
|
||||
$slow_query_t, make_short($stats{'Slow_queries'}), t($stats{'Slow_queries'}), perc($stats{'Slow_queries'}, $questions), perc($stats{'Slow_queries'}, $dms), $vars{'log_slow_queries'}
|
||||
DMS @>>>>>>>> @>>>>>/s @>>>>>
|
||||
make_short($dms), t($dms), perc($dms, $questions)
|
||||
@@ -1225,7 +1225,7 @@ make_short($stats{'Innodb_buffer_pool_pages_data'}), perc($stats{'Innodb_buffer_
|
||||
$stats{'Innodb_buffer_pool_pages_misc'}, perc($stats{'Innodb_buffer_pool_pages_misc'}, $stats{'Innodb_buffer_pool_pages_total'})
|
||||
Latched @>>>>>>>> @>>>>>
|
||||
$stats{'Innodb_buffer_pool_pages_latched'}, perc($stats{'Innodb_buffer_pool_pages_latched'}, $stats{'Innodb_buffer_pool_pages_total'})
|
||||
Reads @>>>>>>>> @>>>>>/s
|
||||
Reads @>>>>>>>> @>>>>>/s
|
||||
make_short($stats{'Innodb_buffer_pool_read_requests'}), t($stats{'Innodb_buffer_pool_read_requests'})
|
||||
From file @>>>>>>>> @>>>>>/s @>>>>>
|
||||
make_short($stats{'Innodb_buffer_pool_reads'}), t($stats{'Innodb_buffer_pool_reads'}), perc($stats{'Innodb_buffer_pool_reads'}, $stats{'Innodb_buffer_pool_read_requests'})
|
||||
|
||||
@@ -12,7 +12,7 @@ class AniDB
|
||||
/**
|
||||
* @param array $options Class instances / Echo to cli.
|
||||
*/
|
||||
public function __construct(array $options = array())
|
||||
public function __construct(array $options = [])
|
||||
{
|
||||
$defaults = [
|
||||
'Echo' => false,
|
||||
|
||||
@@ -45,7 +45,7 @@ class Categorize extends Category
|
||||
*
|
||||
* @param array $options Class instances.
|
||||
*/
|
||||
public function __construct(array $options = array())
|
||||
public function __construct(array $options = [])
|
||||
{
|
||||
//parent::__construct($options);
|
||||
$this->pdo = new newznab\db\Settings();
|
||||
|
||||
@@ -94,7 +94,7 @@ class Category
|
||||
*
|
||||
* @param array $options Class instances.
|
||||
*/
|
||||
public function __construct(array $options = array())
|
||||
public function __construct(array $options = [])
|
||||
{
|
||||
$defaults = [
|
||||
'Settings' => null,
|
||||
@@ -111,7 +111,7 @@ class Category
|
||||
*
|
||||
* @return string $catsrch
|
||||
*/
|
||||
public function getCategorySearch($cat = array())
|
||||
public function getCategorySearch($cat = [])
|
||||
{
|
||||
$catsrch = ' (';
|
||||
|
||||
@@ -353,7 +353,7 @@ class Category
|
||||
public function getForSelect($blnIncludeNoneSelected = true)
|
||||
{
|
||||
$categories = $this->get();
|
||||
$temp_array = array();
|
||||
$temp_array = [];
|
||||
|
||||
if ($blnIncludeNoneSelected) {
|
||||
$temp_array[-1] = "--Please Select--";
|
||||
@@ -368,7 +368,7 @@ class Category
|
||||
/**
|
||||
* Get a list of categories.
|
||||
*/
|
||||
public function get($activeonly = false, $excludedcats = array())
|
||||
public function get($activeonly = false, $excludedcats = [])
|
||||
{
|
||||
$db = new newznab\db\Settings();
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ class Console
|
||||
/**
|
||||
* Get count of all consoleinfo rows for browse list.
|
||||
*/
|
||||
public function getConsoleCount($cat, $maxage=-1, $excludedcats=array())
|
||||
public function getConsoleCount($cat, $maxage=-1, $excludedcats=[])
|
||||
{
|
||||
|
||||
$browseby = $this->getBrowseBy();
|
||||
@@ -128,7 +128,7 @@ class Console
|
||||
/**
|
||||
* Get range of consoleinfo rows for browse list.
|
||||
*/
|
||||
public function getConsoleRange($cat, $start, $num, $orderby, $maxage=-1, $excludedcats=array())
|
||||
public function getConsoleRange($cat, $start, $num, $orderby, $maxage=-1, $excludedcats=[])
|
||||
{
|
||||
|
||||
$browseby = $this->getBrowseBy();
|
||||
@@ -268,14 +268,14 @@ class Console
|
||||
$gen = new Genres();
|
||||
$ri = new ReleaseImage();
|
||||
|
||||
$con = array();
|
||||
$con = [];
|
||||
$amaz = $this->fetchAmazonProperties($gameInfo['title'], $gameInfo['node']);
|
||||
if (!$amaz)
|
||||
return false;
|
||||
|
||||
//load genres
|
||||
$defaultGenres = $gen->getGenres(Genres::CONSOLE_TYPE);
|
||||
$genreassoc = array();
|
||||
$genreassoc = [];
|
||||
foreach($defaultGenres as $dg) {
|
||||
$genreassoc[$dg['id']] = strtolower($dg['title']);
|
||||
}
|
||||
@@ -571,7 +571,7 @@ class Console
|
||||
*/
|
||||
function parseTitle($releasename)
|
||||
{
|
||||
$result = array();
|
||||
$result = [];
|
||||
|
||||
//get name of the game from name of release
|
||||
preg_match('/^(?P<title>.*?)[\.\-_ ](v\.?\d\.\d|PAL|NTSC|EUR|USA|JP|ASIA|JAP|JPN|AUS|MULTI\.?5|MULTI\.?4|MULTI\.?3|PATCHED|FULLDVD|DVD5|DVD9|DVDRIP|PROPER|REPACK|RETAIL|DEMO|DISTRIBUTION|REGIONFREE|READ\.?NFO|NFOFIX|PS2|PS3|PSP|WII|X\-?BOX|XBLA|X360|NDS|N64|NGC)/i', $releasename, $matches);
|
||||
|
||||
@@ -19,7 +19,7 @@ class ConsoleTools
|
||||
/**
|
||||
* Construct.
|
||||
*/
|
||||
public function __construct(array $options = array())
|
||||
public function __construct(array $options = [])
|
||||
{
|
||||
$defaults = [
|
||||
'ColorCLI' => null
|
||||
|
||||
@@ -37,12 +37,12 @@ class Desura
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $_postParams = array();
|
||||
protected $_postParams = [];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $_res = array();
|
||||
protected $_res = [];
|
||||
|
||||
/**
|
||||
* @var
|
||||
@@ -218,7 +218,7 @@ class Desura
|
||||
*/
|
||||
public function getAll()
|
||||
{
|
||||
$results = array();
|
||||
$results = [];
|
||||
if (isset($this->_directURL)) {
|
||||
$results['desuragameid'] = $this->_desuraGameID;
|
||||
$results['directurl'] = $this->_directURL;
|
||||
|
||||
@@ -307,7 +307,7 @@ class Enzebe
|
||||
public function nzbFileList($nzb)
|
||||
{
|
||||
$num_pars = $i = 0;
|
||||
$result = array();
|
||||
$result = [];
|
||||
|
||||
if (!$nzb) {
|
||||
return $result;
|
||||
@@ -356,7 +356,7 @@ class Enzebe
|
||||
|
||||
// Parts.
|
||||
if (!isset($result[$i]['segments'])) {
|
||||
$result[$i]['segments'] = array();
|
||||
$result[$i]['segments'] = [];
|
||||
}
|
||||
|
||||
// File size.
|
||||
@@ -375,7 +375,7 @@ class Enzebe
|
||||
|
||||
// Groups.
|
||||
if (!isset($result[$i]['groups'])) {
|
||||
$result[$i]['groups'] = array();
|
||||
$result[$i]['groups'] = [];
|
||||
}
|
||||
foreach ($file->groups->group as $g) {
|
||||
array_push($result[$i]['groups'], (string) $g);
|
||||
|
||||
@@ -90,7 +90,7 @@ class Games
|
||||
/**
|
||||
* @param array $options Class instances / Echo to cli.
|
||||
*/
|
||||
public function __construct(array $options = array())
|
||||
public function __construct(array $options = [])
|
||||
{
|
||||
$defaults = [
|
||||
'Echo' => false,
|
||||
@@ -157,7 +157,7 @@ class Games
|
||||
return ($res === false ? 0 : $res["num"]);
|
||||
}
|
||||
|
||||
public function getGamesCount($cat, $maxage = -1, $excludedcats = array())
|
||||
public function getGamesCount($cat, $maxage = -1, $excludedcats = [])
|
||||
{
|
||||
$catsrch = '';
|
||||
if (count($cat) > 0 && $cat[0] != -1) {
|
||||
@@ -185,7 +185,7 @@ class Games
|
||||
return ($res === false ? 0 : $res["num"]);
|
||||
}
|
||||
|
||||
public function getGamesRange($cat, $start, $num, $orderby, $maxage = -1, $excludedcats = array())
|
||||
public function getGamesRange($cat, $start, $num, $orderby, $maxage = -1, $excludedcats = [])
|
||||
{
|
||||
$browseby = $this->getBrowseBy();
|
||||
|
||||
@@ -317,7 +317,7 @@ class Games
|
||||
public function makeFieldLinks($data, $field)
|
||||
{
|
||||
$tmpArr = explode(', ', $data[$field]);
|
||||
$newArr = array();
|
||||
$newArr = [];
|
||||
$i = 0;
|
||||
foreach ($tmpArr as $ta) {
|
||||
if (trim($ta) == '') {
|
||||
@@ -385,7 +385,7 @@ class Games
|
||||
$gen = new \Genres(['Settings' => $this->pdo]);
|
||||
$ri = new \ReleaseImage($this->pdo);
|
||||
|
||||
$con = array();
|
||||
$con = [];
|
||||
|
||||
// Process Steam first before giantbomb
|
||||
// Steam has more details
|
||||
@@ -591,7 +591,7 @@ class Games
|
||||
}
|
||||
// Load genres.
|
||||
$defaultGenres = $gen->getGenres(\Genres::GAME_TYPE);
|
||||
$genreassoc = array();
|
||||
$genreassoc = [];
|
||||
foreach ($defaultGenres as $dg) {
|
||||
$genreassoc[$dg['id']] = strtolower($dg['title']);
|
||||
}
|
||||
@@ -757,7 +757,7 @@ class Games
|
||||
$result = $result['results'][$i];
|
||||
preg_match('/\/\d+\-(?<asin>\d+)\//', $result['api_detail_url'], $matches);
|
||||
$this->_gameID = (string)$matches['asin'];
|
||||
$result = $this->fetchGiantBombArray();
|
||||
$result = $this->fetchGiantBomb[];
|
||||
$this->_classUsed = "gb";
|
||||
break;
|
||||
}
|
||||
@@ -782,7 +782,7 @@ class Games
|
||||
*
|
||||
* @return bool|mixed
|
||||
*/
|
||||
public function fetchGiantBombArray()
|
||||
public function fetchGiantBomb[]
|
||||
{
|
||||
$obj = new \GiantBomb($this->publicKey);
|
||||
try {
|
||||
@@ -899,7 +899,7 @@ class Games
|
||||
preg_replace('/\sMulti\d?\s/i', '', $releasename), $matches)) {
|
||||
|
||||
// Replace dots, underscores, colons, or brackets with spaces.
|
||||
$result = array();
|
||||
$result = [];
|
||||
$result['title'] = str_replace(' RF ', ' ', preg_replace('/(\-|\:|\.|_|\%20|\[|\])/', ' ', $matches['title']));
|
||||
// Replace any foreign words at the end of the release
|
||||
$result['title'] = preg_replace('/(brazilian|chinese|croatian|danish|deutsch|dutch|english|estonian|flemish|finnish|french|german|greek|hebrew|icelandic|italian|latin|nordic|norwegian|polish|portuguese|japenese|japanese|russian|serbian|slovenian|spanish|spanisch|swedish|thai|turkish)$/i', '', $result['title']);
|
||||
|
||||
@@ -19,7 +19,7 @@ class Genres
|
||||
/**
|
||||
* @param array $options Class instances.
|
||||
*/
|
||||
public function __construct(array $options = array())
|
||||
public function __construct(array $options = [])
|
||||
{
|
||||
$defaults = [
|
||||
'Settings' => null
|
||||
|
||||
@@ -33,12 +33,12 @@ class Greenlight
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $_postParams = array();
|
||||
protected $_postParams = [];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $_res = array();
|
||||
protected $_res = [];
|
||||
|
||||
/**
|
||||
* @var
|
||||
@@ -130,7 +130,7 @@ class Greenlight
|
||||
$ret = rtrim(trim($ret), ":");
|
||||
if ($ret != "Languages") {
|
||||
if (count($detail->find("a")) > 1) {
|
||||
$ret3 = array();
|
||||
$ret3 = [];
|
||||
foreach ($detail->find("a") as $a) {
|
||||
$ret3[] = trim($a->innertext);
|
||||
}
|
||||
@@ -206,7 +206,7 @@ class Greenlight
|
||||
*/
|
||||
public function getAll()
|
||||
{
|
||||
$results = array();
|
||||
$results = [];
|
||||
if (!empty($this->_directURL)) {
|
||||
$results['greenlightgameid'] = $this->_greenlightGameID;
|
||||
$results['directurl'] = $this->_directURL;
|
||||
|
||||
@@ -61,7 +61,7 @@ class Groups
|
||||
$categories = $this->pdo->query("SELECT * FROM groups WHERE active = 1 ORDER BY name",
|
||||
true, NN_CACHE_EXPIRY_LONG
|
||||
);
|
||||
$temp_array = array();
|
||||
$temp_array = [];
|
||||
|
||||
$temp_array[-1] = "--Please Select--";
|
||||
|
||||
@@ -355,7 +355,7 @@ class Groups
|
||||
function addBulk($groupList, $active = 1, $backfill = 1)
|
||||
{
|
||||
|
||||
$ret = array();
|
||||
$ret = [];
|
||||
|
||||
if ($groupList == "") {
|
||||
$ret[] = "No group list provided.";
|
||||
|
||||
@@ -57,14 +57,14 @@ class Hotmovies
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $_postParams = array();
|
||||
protected $_postParams = [];
|
||||
|
||||
/**
|
||||
* Results return from some methods
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $_res = array();
|
||||
protected $_res = [];
|
||||
|
||||
/**
|
||||
* Raw Html from Curl
|
||||
@@ -169,7 +169,7 @@ class Hotmovies
|
||||
*/
|
||||
public function getAll()
|
||||
{
|
||||
$results = array();
|
||||
$results = [];
|
||||
if (isset($this->_directUrl)) {
|
||||
$results['title'] = $this->_title;
|
||||
$results['directurl'] = $this->_directUrl;
|
||||
@@ -291,7 +291,7 @@ class Hotmovies
|
||||
*/
|
||||
public function genres()
|
||||
{
|
||||
$genres = array();
|
||||
$genres = [];
|
||||
if ($ret = $this->_html->find('div.categories',0)) {
|
||||
foreach ($ret->find('a') as $e) {
|
||||
if (stristr($e->title, "->")) {
|
||||
|
||||
@@ -116,7 +116,7 @@ class IRCClient
|
||||
* @var array
|
||||
* @access protected
|
||||
*/
|
||||
protected $_channelData = array();
|
||||
protected $_channelData = [];
|
||||
|
||||
/**
|
||||
* Nick name when we log in.
|
||||
@@ -478,7 +478,7 @@ class IRCClient
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public function joinChannels($channels = array())
|
||||
public function joinChannels($channels = [])
|
||||
{
|
||||
$this->_channels = $channels;
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ class IRCScraper extends IRCClient
|
||||
}
|
||||
|
||||
$this->_pdo = new Settings();
|
||||
$this->_groupList = array();
|
||||
$this->_groupList = [];
|
||||
$this->_silent = $silent;
|
||||
$this->_debug = $debug;
|
||||
$this->_resetPreVariables();
|
||||
@@ -441,7 +441,7 @@ class IRCScraper extends IRCClient
|
||||
protected function _resetPreVariables()
|
||||
{
|
||||
$this->_nuked = false;
|
||||
$this->_oldPre = array();
|
||||
$this->_oldPre = [];
|
||||
$this->_curPre =
|
||||
array(
|
||||
'title' => '',
|
||||
|
||||
@@ -129,7 +129,7 @@ class Movie
|
||||
/**
|
||||
* Get count of all movieinfo rows filter by category.
|
||||
*/
|
||||
public function getMovieCount($cat, $maxage=-1, $excludedcats=array())
|
||||
public function getMovieCount($cat, $maxage=-1, $excludedcats=[])
|
||||
{
|
||||
|
||||
$browseby = $this->getBrowseBy();
|
||||
@@ -181,7 +181,7 @@ class Movie
|
||||
/**
|
||||
* Get movieinfo rows for browse list by limit.
|
||||
*/
|
||||
public function getMovieRange($cat, $start, $num, $orderby, $maxage=-1, $excludedcats=array())
|
||||
public function getMovieRange($cat, $start, $num, $orderby, $maxage=-1, $excludedcats=[])
|
||||
{
|
||||
|
||||
$browseby = $this->getBrowseBy();
|
||||
@@ -249,7 +249,7 @@ class Movie
|
||||
//
|
||||
$sql = sprintf("select r.*, releasenfo.id as nfoid, groups.name as grpname, concat(cp.title, ' > ', c.title) as categoryname from releases r left outer join category c on c.id = r.categoryid left outer join category cp on cp.id = c.parentid left outer join releasenfo on releasenfo.releaseid = r.id left outer join groups on groups.id = r.groupid where imdbid in (%s) and %s %s %s order by r.postdate desc", $imdbds, $catsrch, $maxagesql, $exccatlist);
|
||||
$allrows = $this->pdo->query($sql, true);
|
||||
$arr = array();
|
||||
$arr = [];
|
||||
|
||||
//
|
||||
// build array indexed by imdbid
|
||||
@@ -373,7 +373,7 @@ class Movie
|
||||
return "";
|
||||
|
||||
$tmpArr = explode(', ',$data[$field]);
|
||||
$newArr = array();
|
||||
$newArr = [];
|
||||
$i = 0;
|
||||
foreach($tmpArr as $ta) {
|
||||
if (trim($ta) == '') {
|
||||
@@ -419,7 +419,7 @@ class Movie
|
||||
return false;
|
||||
}
|
||||
|
||||
$mov = array();
|
||||
$mov = [];
|
||||
$mov['imdb_id'] = $imdbId;
|
||||
$mov['tmdb_id'] = (!isset($tmdb['tmdb_id']) || $tmdb['tmdb_id'] == '') ? "NULL" : $tmdb['tmdb_id'];
|
||||
|
||||
@@ -540,7 +540,7 @@ class Movie
|
||||
if (!$movie || !is_array($movie)) { return false; }
|
||||
if (isset($movie['status_code']) && $movie['status_code'] > 1) { return false; }
|
||||
|
||||
$ret = array();
|
||||
$ret = [];
|
||||
$ret['title'] = $movie['title'];
|
||||
$ret['tmdb_id'] = $movie['id'];
|
||||
$ret['imdb_id'] = str_replace('tt', '', $movie['imdb_id']);
|
||||
@@ -552,7 +552,7 @@ class Movie
|
||||
$ret['year'] = date("Y", strtotime($movie['release_date']));
|
||||
if (isset($movie['genres']) && sizeof($movie['genres']) > 0)
|
||||
{
|
||||
$genres = array();
|
||||
$genres = [];
|
||||
foreach($movie['genres'] as $genre)
|
||||
{
|
||||
$genres[] = $genre['name'];
|
||||
@@ -590,7 +590,7 @@ class Movie
|
||||
}
|
||||
if (!$movies || !isset($movies['results'])) { return false; }
|
||||
|
||||
$ret = array();
|
||||
$ret = [];
|
||||
$c=0;
|
||||
foreach($movies['results'] as $movie)
|
||||
{
|
||||
@@ -629,7 +629,7 @@ class Movie
|
||||
// make sure we got some data
|
||||
if ($buffer !== false && strlen($buffer))
|
||||
{
|
||||
$ret = array();
|
||||
$ret = [];
|
||||
foreach ($imdb_regex as $field => $regex)
|
||||
{
|
||||
if (preg_match($regex, $buffer, $matches))
|
||||
|
||||
@@ -78,7 +78,7 @@ class Music
|
||||
/**
|
||||
* Get count of all musicinfo rows by filter.
|
||||
*/
|
||||
public function getMusicCount($cat, $maxage=-1, $excludedcats=array())
|
||||
public function getMusicCount($cat, $maxage=-1, $excludedcats=[])
|
||||
{
|
||||
|
||||
$browseby = $this->getBrowseBy();
|
||||
@@ -128,7 +128,7 @@ class Music
|
||||
/**
|
||||
* Get musicinfo rows for browse list by filters and limit.
|
||||
*/
|
||||
public function getMusicRange($cat, $start, $num, $orderby, $maxage=-1, $excludedcats=array())
|
||||
public function getMusicRange($cat, $start, $num, $orderby, $maxage=-1, $excludedcats=[])
|
||||
{
|
||||
|
||||
$browseby = $this->getBrowseBy();
|
||||
@@ -272,7 +272,7 @@ class Music
|
||||
$gen = new Genres();
|
||||
$ri = new ReleaseImage();
|
||||
|
||||
$mus = array();
|
||||
$mus = [];
|
||||
$amaz = $this->fetchAmazonProperties($artist." ".$album);
|
||||
if (!$amaz)
|
||||
return false;
|
||||
@@ -281,7 +281,7 @@ class Music
|
||||
|
||||
//load genres
|
||||
$defaultGenres = $gen->getGenres(Genres::MUSIC_TYPE);
|
||||
$genreassoc = array();
|
||||
$genreassoc = [];
|
||||
foreach($defaultGenres as $dg) {
|
||||
$genreassoc[$dg['id']] = strtolower($dg['title']);
|
||||
}
|
||||
@@ -485,7 +485,7 @@ class Music
|
||||
*/
|
||||
public function parseArtist($releasename)
|
||||
{
|
||||
$result = array();
|
||||
$result = [];
|
||||
/*TODO: FIX VA lookups
|
||||
if (substr($releasename, 0, 3) == 'VA-') {
|
||||
$releasename = trim(str_replace('VA-', '', $releasename));
|
||||
@@ -568,7 +568,7 @@ class Music
|
||||
//load genres
|
||||
$gen = new Genres();
|
||||
$defaultGenres = $gen->getGenres(Genres::MUSIC_TYPE);
|
||||
$genreassoc = array();
|
||||
$genreassoc = [];
|
||||
foreach($defaultGenres as $dg)
|
||||
$genreassoc[$dg['id']] = strtolower($dg['title']);
|
||||
|
||||
|
||||
@@ -1094,7 +1094,7 @@ class NNTP extends Net_NNTP_Client
|
||||
*/
|
||||
function decodeYenc2($yencodedvar)
|
||||
{
|
||||
$input = array();
|
||||
$input = [];
|
||||
preg_match("/^(=ybegin.*=yend[^$]*)$/ims", $yencodedvar, $input);
|
||||
if (isset($input[1])) {
|
||||
$ret = "";
|
||||
|
||||
@@ -74,7 +74,7 @@ Class NZBContents
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public function __construct(array $options = array())
|
||||
public function __construct(array $options = [])
|
||||
{
|
||||
$defaults = [
|
||||
'Echo' => false,
|
||||
|
||||
@@ -270,7 +270,7 @@ final class NZBVortex
|
||||
* sendRequest()
|
||||
* @return array
|
||||
*/
|
||||
protected function sendRequest($path, $params = array())
|
||||
protected function sendRequest($path, $params = [])
|
||||
{
|
||||
$user = new Users;
|
||||
$data = $user->getById($user->currentUserId());
|
||||
|
||||
@@ -126,7 +126,7 @@ class NameFixer
|
||||
/**
|
||||
* @param array $options Class instances / Echo to cli.
|
||||
*/
|
||||
public function __construct(array $options = array())
|
||||
public function __construct(array $options = [])
|
||||
{
|
||||
$defaults = [
|
||||
'Echo' => true,
|
||||
@@ -710,7 +710,7 @@ class NameFixer
|
||||
return $join;
|
||||
}
|
||||
|
||||
public function getPreFileNames($args = array())
|
||||
public function getPreFileNames($args = [])
|
||||
{
|
||||
$timestart = time();
|
||||
$counter = $counted = 0;
|
||||
@@ -955,7 +955,7 @@ class NameFixer
|
||||
// Look for a TV name.
|
||||
public function tvCheck($release, $echo, $type, $namestatus, $show)
|
||||
{
|
||||
$result = array();
|
||||
$result = [];
|
||||
|
||||
if ($this->done === false && $this->relid !== $release["releaseid"]) {
|
||||
|
||||
@@ -982,7 +982,7 @@ class NameFixer
|
||||
// Look for a movie name.
|
||||
public function movieCheck($release, $echo, $type, $namestatus, $show)
|
||||
{
|
||||
$result = array();
|
||||
$result = [];
|
||||
|
||||
if ($this->done === false && $this->relid !== $release["releaseid"]) {
|
||||
|
||||
@@ -1019,7 +1019,7 @@ class NameFixer
|
||||
// Look for a game name.
|
||||
public function gameCheck($release, $echo, $type, $namestatus, $show)
|
||||
{
|
||||
$result = array();
|
||||
$result = [];
|
||||
|
||||
if ($this->done === false && $this->relid !== $release["releaseid"]) {
|
||||
|
||||
@@ -1040,7 +1040,7 @@ class NameFixer
|
||||
// Look for a app name.
|
||||
public function appCheck($release, $echo, $type, $namestatus, $show)
|
||||
{
|
||||
$result = array();
|
||||
$result = [];
|
||||
|
||||
if ($this->done === false && $this->relid !== $release["releaseid"]) {
|
||||
|
||||
@@ -1059,7 +1059,7 @@ class NameFixer
|
||||
// TV.
|
||||
public function nfoCheckTV($release, $echo, $type, $namestatus, $show)
|
||||
{
|
||||
$result = array();
|
||||
$result = [];
|
||||
|
||||
if ($this->done === false && $this->relid !== $release["releaseid"]) {
|
||||
|
||||
@@ -1074,7 +1074,7 @@ class NameFixer
|
||||
// Movies.
|
||||
public function nfoCheckMov($release, $echo, $type, $namestatus, $show)
|
||||
{
|
||||
$result = array();
|
||||
$result = [];
|
||||
|
||||
if ($this->done === false && $this->relid !== $release["releaseid"]) {
|
||||
|
||||
@@ -1091,7 +1091,7 @@ class NameFixer
|
||||
// Music.
|
||||
public function nfoCheckMus($release, $echo, $type, $namestatus, $show)
|
||||
{
|
||||
$result = array();
|
||||
$result = [];
|
||||
|
||||
if ($this->done === false && $this->relid !== $release["releaseid"]) {
|
||||
|
||||
@@ -1105,7 +1105,7 @@ class NameFixer
|
||||
// Title (year)
|
||||
public function nfoCheckTY($release, $echo, $type, $namestatus, $show)
|
||||
{
|
||||
$result = array();
|
||||
$result = [];
|
||||
|
||||
if ($this->done === false && $this->relid !== $release["releaseid"]) {
|
||||
if (preg_match('/(\w[-\w`~!@#$%^&*()_+={}|"<>?\[\]\\;\',.\/ ]+\s?\((19|20)\d\d\))/i', $release["textstring"], $result) && !preg_match('/\.pdf|Audio ?Book/i', $release["textstring"])) {
|
||||
@@ -1273,7 +1273,7 @@ class NameFixer
|
||||
// Games.
|
||||
public function nfoCheckG($release, $echo, $type, $namestatus, $show)
|
||||
{
|
||||
$result = array();
|
||||
$result = [];
|
||||
|
||||
if ($this->done === false && $this->relid !== $release["releaseid"]) {
|
||||
|
||||
@@ -1298,7 +1298,7 @@ class NameFixer
|
||||
|
||||
if (preg_match('/Supplier.+?IGUANA/i', $release["textstring"])) {
|
||||
$releasename = '';
|
||||
$result = array();
|
||||
$result = [];
|
||||
if (preg_match('/\w[-\w`~!@#$%^&*()+={}|:"<>?\[\]\\;\',.\/ ]+\s\((19|20)\d\d\)/i', $release["textstring"], $result)) {
|
||||
$releasename = $result[0];
|
||||
} else if (preg_match('/\s\[\*\] (English|Dutch|French|German|Spanish)\b/i', $release["textstring"], $result)) {
|
||||
@@ -1329,7 +1329,7 @@ class NameFixer
|
||||
|
||||
public function fileCheck($release, $echo, $type, $namestatus, $show)
|
||||
{
|
||||
$result = array();
|
||||
$result = [];
|
||||
|
||||
if ($this->done === false && $this->relid !== $release["releaseid"]) {
|
||||
|
||||
|
||||
+13
-13
@@ -79,12 +79,12 @@ class Nfo
|
||||
//
|
||||
|
||||
// Array of all possible matches to return
|
||||
$nfo_idx = array();
|
||||
$nfo_idx = [];
|
||||
|
||||
// Search for all entries that have a single segment
|
||||
if (empty($nzbInfo->segmentfiles))
|
||||
// Nothing to Return
|
||||
return array();
|
||||
return [];
|
||||
|
||||
// Fetch Meta Information
|
||||
if (isset($nzbInfo->metadata['name']))
|
||||
@@ -92,7 +92,7 @@ class Nfo
|
||||
else
|
||||
$name = "";
|
||||
|
||||
$unordered_list=array();
|
||||
$unordered_list=[];
|
||||
foreach($nzbInfo->segmentfiles as $segment){
|
||||
if ($segment['filesize'] > Nfo::NFO_MAX_FILESIZE)
|
||||
continue;
|
||||
@@ -298,8 +298,8 @@ class Nfo
|
||||
// The function strips indexes that appear invalid
|
||||
// and stores the most ideal match per release
|
||||
|
||||
$parsed_blob = array();
|
||||
$parsed_meta = array();
|
||||
$parsed_blob = [];
|
||||
$parsed_meta = [];
|
||||
|
||||
foreach($nfometa as $uid => $info){
|
||||
$ideal = Null;
|
||||
@@ -372,7 +372,7 @@ class Nfo
|
||||
}
|
||||
|
||||
private function _nfo_grab($nfometa, &$blobhash){
|
||||
// nfometa should be an array() of segments from nzb file
|
||||
// nfometa should be an [] of segments from nzb file
|
||||
// it will then populate the blobhash which uses the segments
|
||||
// as hash entries for the blob data.
|
||||
// nfometa is an array of arrays simiar to the following
|
||||
@@ -413,7 +413,7 @@ class Nfo
|
||||
// no error handling is needed here
|
||||
$nntp->doConnect(1, true);
|
||||
foreach($nfometa as $uid => $matches){
|
||||
$blobhash[$uid] = array();
|
||||
$blobhash[$uid] = [];
|
||||
foreach($matches as $idx => $match){
|
||||
$fetched = false;
|
||||
foreach($match["groups"] as $group){
|
||||
@@ -455,7 +455,7 @@ class Nfo
|
||||
// in a try catch block with a silent exception catcher
|
||||
$retries = nfo::USENET_RETRY_COUNT;
|
||||
set_error_handler('nfoHandleError');
|
||||
$_blobhash = array();
|
||||
$_blobhash = [];
|
||||
while($retries >0){
|
||||
try{
|
||||
$this->_nfo_grab($nfometa, $_blobhash);
|
||||
@@ -467,7 +467,7 @@ class Nfo
|
||||
// Decrement retry count
|
||||
$retries--;
|
||||
// Reset blobhash
|
||||
$_blobhash = array();
|
||||
$_blobhash = [];
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -495,7 +495,7 @@ class Nfo
|
||||
$batch=Nfo::NNTP_BATCH_COUNT;
|
||||
|
||||
// Build NFO List
|
||||
$nfometa = array();
|
||||
$nfometa = [];
|
||||
|
||||
// Missing NFO Query (oldest first so they don't expire on us)
|
||||
$mnfo = "SELECT id,guid, name FROM releases r ".
|
||||
@@ -551,7 +551,7 @@ class Nfo
|
||||
|
||||
if(!($processed%$batch))
|
||||
{
|
||||
$nfoblob = array();
|
||||
$nfoblob = [];
|
||||
if($this->verbose) echo "NfoProc : Retrieval ...";
|
||||
if($this->nfo_grab($nfometa, $nfoblob)){
|
||||
$before = array_keys($nfoblob);
|
||||
@@ -563,11 +563,11 @@ class Nfo
|
||||
if($this->verbose) echo "\n";
|
||||
|
||||
// Reset nfo list array
|
||||
$nfometa = array();
|
||||
$nfometa = [];
|
||||
}
|
||||
}
|
||||
if(($processed%$batch)){
|
||||
$nfoblob = array();
|
||||
$nfoblob = [];
|
||||
if($this->verbose) echo "NfoProc : Retrieval ...";
|
||||
if($this->nfo_grab($nfometa, $nfoblob)){
|
||||
$before = array_keys($nfoblob);
|
||||
|
||||
@@ -415,7 +415,7 @@ class Parsing
|
||||
|
||||
//The Big One
|
||||
if (preg_match_all('/([a-z0-9\ ]+)\.{1,}(\:|\[)(?P<name>.*)(\s{2}|\s{1})/i', $nfo, $matches) && $foundName == "") {
|
||||
$lut = array();
|
||||
$lut = [];
|
||||
foreach ($matches[1] as $key => $k) {
|
||||
$lut[str_replace(' ', '', strtolower(trim($k)))] = trim($matches[3][$key]);
|
||||
}
|
||||
@@ -1419,7 +1419,7 @@ class Parsing
|
||||
}
|
||||
}
|
||||
|
||||
$this->cleanup = array('nuke' => array(), 'misc' => array());
|
||||
$this->cleanup = array('nuke' => [], 'misc' => []);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -54,7 +54,7 @@ class Popporn
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $_res = array();
|
||||
protected $_res = [];
|
||||
|
||||
/**
|
||||
* This is set in the getAll method
|
||||
@@ -228,7 +228,7 @@ class Popporn
|
||||
{
|
||||
$cast = false;
|
||||
$director = false;
|
||||
$er = array();
|
||||
$er = [];
|
||||
if ($ret = $this->_html->find('div#lside', 0)) {
|
||||
foreach ($ret->find("text") as $e) {
|
||||
$e = trim($e->innertext);
|
||||
@@ -272,7 +272,7 @@ class Popporn
|
||||
*/
|
||||
public function genres()
|
||||
{
|
||||
$genres = array();
|
||||
$genres = [];
|
||||
if ($ret = $this->_html->find('div[id=thekeywords], p[class=keywords]', 1)) {
|
||||
foreach ($ret->find('a') as $e) {
|
||||
$genres[] = trim($e->plaintext);
|
||||
|
||||
@@ -105,7 +105,7 @@ class PostProcess
|
||||
//
|
||||
if($this->pdo->getSetting('removespam') != 0)
|
||||
{
|
||||
$spamIDs = array();
|
||||
$spamIDs = [];
|
||||
|
||||
//
|
||||
// all releases where the only file inside the rars is *.exe and they are not in the PC category
|
||||
@@ -592,7 +592,7 @@ class PostProcess
|
||||
*/
|
||||
public function processReleaseFiles($fetchedBinary, $relid)
|
||||
{
|
||||
$retval = array();
|
||||
$retval = [];
|
||||
$rar = new \ArchiveInfo();
|
||||
$rf = new ReleaseFiles;
|
||||
|
||||
@@ -749,7 +749,7 @@ class PostProcess
|
||||
// returns 1 if encrypted rar
|
||||
// returns 2 if passworded rar
|
||||
// returns array of files in the rar if normal rar
|
||||
$filelist = array();
|
||||
$filelist = [];
|
||||
$rar = new ArchiveInfo;
|
||||
if ($rar->open($rarfile))
|
||||
{
|
||||
|
||||
@@ -304,7 +304,7 @@ class PowerProcess {
|
||||
$this->InstallSignalHandler();
|
||||
|
||||
// Init the Thread Queue
|
||||
$this->myThreads = array();
|
||||
$this->myThreads = [];
|
||||
|
||||
// Log completion of startup
|
||||
$this->Log("Startup process complete",true);
|
||||
|
||||
@@ -39,7 +39,7 @@ Class PreHash
|
||||
/**
|
||||
* @param array $options
|
||||
*/
|
||||
public function __construct(array $options = array())
|
||||
public function __construct(array $options = [])
|
||||
{
|
||||
$defaults = [
|
||||
'Echo' => false,
|
||||
|
||||
@@ -92,7 +92,7 @@ class ReleaseCleaning
|
||||
|
||||
public function releaseCleaner($subject, $fromName, $size, $groupName, $usepre = false)
|
||||
{
|
||||
$match = $matches = array();
|
||||
$match = $matches = [];
|
||||
$this->groupName = $groupName;
|
||||
$this->subject = $subject;
|
||||
$this->fromName = $fromName;
|
||||
|
||||
@@ -47,7 +47,7 @@ abstract class RequestID
|
||||
*
|
||||
* @return int Quantity of releases matched to a request id.
|
||||
*/
|
||||
public function lookupRequestIDs(array $options = array())
|
||||
public function lookupRequestIDs(array $options = [])
|
||||
{
|
||||
$curOptions = [
|
||||
'charGUID' => '',
|
||||
@@ -131,7 +131,7 @@ abstract class RequestID
|
||||
*/
|
||||
protected function _siftReqId()
|
||||
{
|
||||
$requestID = array();
|
||||
$requestID = [];
|
||||
switch (true) {
|
||||
case preg_match('/\[\s*#?scnzb@?efnet\s*\]\[(\d+)\]/', $this->_release['name'], $requestID):
|
||||
case preg_match('/\[\s*(\d+)\s*\]/', $this->_release['name'], $requestID):
|
||||
|
||||
@@ -11,7 +11,7 @@ class RequestIDLocal extends RequestID
|
||||
/**
|
||||
* @param array $options Class instances / Echo to cli?
|
||||
*/
|
||||
public function __construct(array $options = array())
|
||||
public function __construct(array $options = [])
|
||||
{
|
||||
parent::__construct($options);
|
||||
}
|
||||
@@ -158,7 +158,7 @@ class RequestIDLocal extends RequestID
|
||||
'(avi|jpg|nzb|m3u|mkv|par2|part\d+|nfo|sample|sfv|rar|r?\d{1,3}|\d+|zip)*)\s*\".*/i'
|
||||
;
|
||||
|
||||
$matches = array();
|
||||
$matches = [];
|
||||
switch (true) {
|
||||
case preg_match($regex1, $this->_release['name'], $matches):
|
||||
case preg_match($regex2, $this->_release['name'], $matches):
|
||||
@@ -189,7 +189,7 @@ class RequestIDLocal extends RequestID
|
||||
return false;
|
||||
}
|
||||
|
||||
private $groupIDCache = array();
|
||||
private $groupIDCache = [];
|
||||
|
||||
/**
|
||||
* Attempts to remap the release groupid by extracting the new group name from the release usenet name.
|
||||
|
||||
@@ -28,7 +28,7 @@ class RequestIDWeb extends RequestID
|
||||
*
|
||||
* @param array $options Class instances / Echo to cli?
|
||||
*/
|
||||
public function __construct(array $options = array())
|
||||
public function __construct(array $options = [])
|
||||
{
|
||||
parent::__construct($options);
|
||||
$this->_request_hours = ($this->pdo->getSetting('request_hours') != '') ? (int)$this->pdo->getSetting('request_hours') : 1;
|
||||
@@ -106,7 +106,7 @@ class RequestIDWeb extends RequestID
|
||||
protected function _processReleases()
|
||||
{
|
||||
// Array to store results.
|
||||
$requestArray = array();
|
||||
$requestArray = [];
|
||||
|
||||
if ($this->_releases instanceof \Traversable) {
|
||||
// Loop all the results.
|
||||
|
||||
@@ -59,7 +59,7 @@ Class Sharing
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $siteSettings = array();
|
||||
protected $siteSettings = [];
|
||||
|
||||
/**
|
||||
* Group to work in.
|
||||
|
||||
@@ -59,7 +59,7 @@ class Sites
|
||||
if ($site->sabcompletedir != "" && !file_exists($site->sabcompletedir))
|
||||
return Sites::ERR_SABCOMPLETEPATH;
|
||||
|
||||
$sql = $sqlKeys = array();
|
||||
$sql = $sqlKeys = [];
|
||||
foreach ($form as $settingK => $settingV) {
|
||||
$sql[] = sprintf("WHEN %s THEN %s", $db->escapeString($settingK), $db->escapeString(trim($settingV)));
|
||||
$sqlKeys[] = $db->escapeString($settingK);
|
||||
@@ -116,7 +116,7 @@ class Sites
|
||||
|
||||
$patchpath = WWW_DIR . "../db/patch/0.2.3/";
|
||||
$patchfiles = glob($patchpath . "*.sql");
|
||||
$missingpatch = array();
|
||||
$missingpatch = [];
|
||||
foreach ($patchfiles as $file) {
|
||||
$filecontents = file_get_contents($file);
|
||||
if (preg_match("/Rev\: (\d+)/", $filecontents, $matches)) {
|
||||
|
||||
@@ -47,7 +47,7 @@ class Sphinx
|
||||
*/
|
||||
public function runCmd($cmd, $stdout=true)
|
||||
{
|
||||
$output = array();
|
||||
$output = [];
|
||||
$handle = popen($cmd, "r");
|
||||
while ($line = fgets($handle)) {
|
||||
if (\newznab\utility\Utility::startsWith($line, "Sphinx") ||
|
||||
@@ -241,8 +241,8 @@ class Sphinx
|
||||
public function indexDetails($index, $main=False) {
|
||||
$details = array(
|
||||
"enabled" => false,
|
||||
"field_list" => array(),
|
||||
"attr_list" => array()
|
||||
"field_list" => [],
|
||||
"attr_list" => []
|
||||
);
|
||||
|
||||
if ($this->isIndexEnabled($index)) {
|
||||
@@ -428,9 +428,9 @@ class Sphinx
|
||||
* @param boolean Whether or not to include the delta indexes as well.
|
||||
* @return array An array of string of the enabled indexes.
|
||||
*/
|
||||
public function getAllEnabledIndexes($deltas=false, $exclude=array())
|
||||
public function getAllEnabledIndexes($deltas=false, $exclude=[])
|
||||
{
|
||||
$enabled = array();
|
||||
$enabled = [];
|
||||
foreach($this->indexes as $index) {
|
||||
if ($this->isIndexEnabled($index) && !in_array($index, $exclude)) {
|
||||
$enabled[] = $index;
|
||||
@@ -651,7 +651,7 @@ class Sphinx
|
||||
}
|
||||
|
||||
// Get the query metadata.
|
||||
$meta = array();
|
||||
$meta = [];
|
||||
$mresult = mysqli_query($sdb,"SHOW META");
|
||||
if (!$mresult) {
|
||||
return false;
|
||||
@@ -660,7 +660,7 @@ class Sphinx
|
||||
$meta[$row[0]] = $row[1];
|
||||
}
|
||||
|
||||
$results = array();
|
||||
$results = [];
|
||||
if ($result)
|
||||
{
|
||||
while($row = mysqli_fetch_assoc($result)) {
|
||||
@@ -679,7 +679,7 @@ class Sphinx
|
||||
$result = $ndb->queryDirect($sql);
|
||||
if ($result)
|
||||
{
|
||||
$results = array();
|
||||
$results = [];
|
||||
while ($row = $ndb->getAssocArray($result)) {
|
||||
$results[] = $row;
|
||||
}
|
||||
@@ -714,10 +714,10 @@ class Sphinx
|
||||
* @param string $lookupQuery
|
||||
*
|
||||
*/
|
||||
public function buildQuery($search, $cat=array(), $offset=0, $limit=100,
|
||||
public function buildQuery($search, $cat=[], $offset=0, $limit=100,
|
||||
$order=array("postdate", "desc"), $maxage=-1,
|
||||
$excludedcats=array(), $grp=array(),
|
||||
$indexes=array(), $lookup=true, $where=array(),
|
||||
$excludedcats=[], $grp=[],
|
||||
$indexes=[], $lookup=true, $where=[],
|
||||
&$lookupQuery="")
|
||||
{
|
||||
$ndb = new newznab\db\Settings;
|
||||
@@ -735,7 +735,7 @@ class Sphinx
|
||||
|
||||
// Create a comma separated string of indexes, but only of enabled
|
||||
// indexes
|
||||
$searchIndexes = array();
|
||||
$searchIndexes = [];
|
||||
foreach($indexes as $index) {
|
||||
if ($this->isIndexEnabled($index)) {
|
||||
$searchIndexes[] = $index;
|
||||
@@ -806,7 +806,7 @@ class Sphinx
|
||||
|
||||
// Build the category query. If any of the categories are a "parent"
|
||||
// then we need to explicitly include their children as well.
|
||||
$categoryIDs = array();
|
||||
$categoryIDs = [];
|
||||
if (count($cat) > 0 && $cat[0] != -1) {
|
||||
foreach ($cat as $category) {
|
||||
if ($category != -1) {
|
||||
@@ -908,10 +908,10 @@ class Sphinx
|
||||
* @param boolean $lookup Retrieve latest data from database.
|
||||
* @return array|false
|
||||
*/
|
||||
public function search($search, $cat=array(), $offset=0, $limit=1000,
|
||||
public function search($search, $cat=[], $offset=0, $limit=1000,
|
||||
$order=array("postdate", "desc"), $maxage=-1,
|
||||
$excludedcats=array(), $grp=array(),
|
||||
$indexes=array(), $lookup=true, $minsize=-1, $maxsize=-1)
|
||||
$excludedcats=[], $grp=[],
|
||||
$indexes=[], $lookup=true, $minsize=-1, $maxsize=-1)
|
||||
{
|
||||
if (count($indexes) == 0) {
|
||||
// Remove predb from the default list of indexes to search
|
||||
@@ -947,7 +947,7 @@ class Sphinx
|
||||
. "AND releases.id IN (%s)";
|
||||
}
|
||||
|
||||
$where = array();
|
||||
$where = [];
|
||||
if ($minsize != -1) {
|
||||
$where[] = sprintf("size > %d ", $minsize);
|
||||
}
|
||||
@@ -967,7 +967,7 @@ class Sphinx
|
||||
*/
|
||||
public function searchbyRageId($rageId, $series="", $episode="", $offset=0,
|
||||
$limit=100, $name="", $cat=array(-1),
|
||||
$maxage=-1, $indexes=array(), $lookup=true)
|
||||
$maxage=-1, $indexes=[], $lookup=true)
|
||||
{
|
||||
$db = new newznab\db\Settings();
|
||||
$order = array("postdate", "desc");
|
||||
@@ -989,7 +989,7 @@ class Sphinx
|
||||
$search[] = sprintf("@episode %s", $db->escapeString($episode));
|
||||
}
|
||||
|
||||
$where = array();
|
||||
$where = [];
|
||||
if ($rageId != "-1") {
|
||||
$where[] = "rageid = ".$rageId;
|
||||
}
|
||||
@@ -1022,7 +1022,7 @@ class Sphinx
|
||||
. "AND releases.id IN (%s)";
|
||||
}
|
||||
$sphinxQuery = $this->buildQuery($search, $cat, $offset, $limit, $order,
|
||||
$maxage, array(), array(), $indexes,
|
||||
$maxage, [], [], $indexes,
|
||||
$lookup, $where, $lookupQuery);
|
||||
return $this->searchDirect($sphinxQuery, $lookupQuery, 180);
|
||||
}
|
||||
@@ -1033,12 +1033,12 @@ class Sphinx
|
||||
*/
|
||||
public function searchbyImdbId($imdbId, $offset=0, $limit=100, $name="",
|
||||
$cat=array(-1), $genre="", $maxage=-1,
|
||||
$indexes=array(), $lookup=true)
|
||||
$indexes=[], $lookup=true)
|
||||
{
|
||||
$db = new newznab\db\Settings();
|
||||
$search = array();
|
||||
$search = [];
|
||||
$order = array("postdate", "desc");
|
||||
$where = array();
|
||||
$where = [];
|
||||
if ($imdbId != "-1" && is_numeric($imdbId)) {
|
||||
// Pad id with zeros just in case.
|
||||
$imdbId = str_pad($imdbId, 7, "0", STR_PAD_LEFT);
|
||||
@@ -1088,7 +1088,7 @@ class Sphinx
|
||||
. "AND releases.id IN (%s)";
|
||||
}
|
||||
$sphinxQuery = $this->buildQuery($search, $cat, $offset, $limit, $order,
|
||||
$maxage, array(), array(), $indexes,
|
||||
$maxage, [], [], $indexes,
|
||||
$lookup, $where, $lookupQuery);
|
||||
return $this->searchDirect($sphinxQuery, $lookupQuery, 180);
|
||||
}
|
||||
@@ -1099,12 +1099,12 @@ class Sphinx
|
||||
*/
|
||||
public function searchAudio($artist, $album, $label, $track, $year,
|
||||
$genre=array(-1), $offset=0, $limit=100,
|
||||
$cat=array(-1), $maxage=-1, $indexes=array(),
|
||||
$cat=array(-1), $maxage=-1, $indexes=[],
|
||||
$lookup=true)
|
||||
{
|
||||
$db = new newznab\db\Settings();
|
||||
$search = array();
|
||||
$where = array();
|
||||
$search = [];
|
||||
$where = [];
|
||||
$order = array("postdate", "desc");
|
||||
if ($artist != "") {
|
||||
$search[] = sprintf("@musicinfo_artist %s", $db->escapeString($artist));
|
||||
@@ -1166,7 +1166,7 @@ class Sphinx
|
||||
. "AND releases.id IN (%s)";
|
||||
}
|
||||
$sphinxQuery = $this->buildQuery($search, $cat, $offset, $limit, $order,
|
||||
$maxage, array(), array(), $indexes,
|
||||
$maxage, [], [], $indexes,
|
||||
$lookup, $where, $lookupQuery);
|
||||
return $this->searchDirect($sphinxQuery, $lookupQuery, 180);
|
||||
}
|
||||
@@ -1176,11 +1176,11 @@ class Sphinx
|
||||
* presents the same interface as :php:meth:`Releases::searchBook`.
|
||||
*/
|
||||
public function searchBook($author, $title, $offset=0, $limit=100,
|
||||
$maxage=-1, $indexes=array(), $lookup=true)
|
||||
$maxage=-1, $indexes=[], $lookup=true)
|
||||
{
|
||||
$db = new newznab\db\Settings();
|
||||
$order = array("postdate", "desc");
|
||||
$search = array();
|
||||
$search = [];
|
||||
if ($author != "") {
|
||||
$search[] = sprintf("@bookinfo_author %s", $db->escapeString($author));
|
||||
}
|
||||
@@ -1228,8 +1228,8 @@ class Sphinx
|
||||
}
|
||||
|
||||
$sphinxQuery = $this->buildQuery($search, array(-1), $offset, $limit,
|
||||
$order, $maxage, array(), array(),
|
||||
$indexes, $lookup, array(), $lookupQuery);
|
||||
$order, $maxage, [], [],
|
||||
$indexes, $lookup, [], $lookupQuery);
|
||||
return $this->searchDirect($sphinxQuery, $lookupQuery, 180);
|
||||
}
|
||||
|
||||
@@ -1238,12 +1238,12 @@ class Sphinx
|
||||
* presents the same interface as :php:meth:`Releases::searchbyAnidbId`.
|
||||
*/
|
||||
public function searchbyAnidbId($anidbID, $epno='', $offset=0, $limit=100,
|
||||
$name='', $maxage=-1, $indexes=array(),
|
||||
$name='', $maxage=-1, $indexes=[],
|
||||
$lookup=true)
|
||||
{
|
||||
$db = new newznab\db\Settings();
|
||||
$where = array();
|
||||
$search = array();
|
||||
$where = [];
|
||||
$search = [];
|
||||
$order = array("postdate", "desc");
|
||||
if ($anidbID > -1) {
|
||||
$where[] = sprintf("anidbid = %d", $anidbID);
|
||||
@@ -1279,7 +1279,7 @@ class Sphinx
|
||||
. "AND releases.id IN (%s)";
|
||||
}
|
||||
$sphinxQuery = $this->buildQuery($search, array(-1), $offset, $limit,
|
||||
$order, $maxage, array(), array(),
|
||||
$order, $maxage, [], [],
|
||||
$indexes, $lookup, $where, $lookupQuery);
|
||||
return $this->searchDirect($sphinxQuery, $lookupQuery, 180);
|
||||
}
|
||||
|
||||
@@ -65,12 +65,12 @@ class Steam
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $_postParams = array();
|
||||
protected $_postParams = [];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $_res = array();
|
||||
protected $_res = [];
|
||||
|
||||
/**
|
||||
* @var
|
||||
@@ -126,7 +126,7 @@ class Steam
|
||||
public function details()
|
||||
{
|
||||
if ($this->_ret = $this->_html->find("div.details_block", 0)) {
|
||||
$textarr = array();
|
||||
$textarr = [];
|
||||
foreach ($this->_ret->find('text') as $text) {
|
||||
$text = trim($text->plaintext);
|
||||
if (!empty($text)) {
|
||||
@@ -180,7 +180,7 @@ class Steam
|
||||
*/
|
||||
public function getAll()
|
||||
{
|
||||
$results = array();
|
||||
$results = [];
|
||||
if (isset($this->_directURL)) {
|
||||
$results['steamgameid'] = $this->_steamGameID;
|
||||
$results['directurl'] = $this->_directURL;
|
||||
|
||||
@@ -416,18 +416,18 @@ class TheTVDB
|
||||
//'seriesname' => ((string) $TheTVDBAPIXML->Series->SeriesName != '') ? (string) $TheTVDBAPIXML->Series->SeriesName : $seriesName,
|
||||
'seriesname' => $seriesName,
|
||||
'status' => (string) $TheTVDBAPIXML->Series->Status,
|
||||
'episodetvdbID' => isset($episodetvdbIDArray) ? $episodetvdbIDArray : array(),
|
||||
'episodenumber' => isset($episodenumberArray) ? $episodenumberArray : array(),
|
||||
'episodeseason' => isset($episodeseasonArray) ? $episodeseasonArray : array(),
|
||||
'episodedirector' => isset($episodedirectorArray) ? $episodedirectorArray : array(),
|
||||
'episodename' => isset($episodenameArray) ? $episodenameArray : array(),
|
||||
'episodefirstaired' => isset($episodefirstairedArray) ? $episodefirstairedArray : array(),
|
||||
'episodegueststars' => isset($episodegueststarsArray) ? $episodegueststarsArray : array(),
|
||||
'episodeimdbID' => isset($episodeimdbID) ? $episodeimdbID : array(),
|
||||
'episodeoverview' => isset($episodeoverviewArray) ? $episodeoverviewArray : array(),
|
||||
'episoderating' => isset($episoderatingArray) ? $episoderatingArray : array(),
|
||||
'episodewriter' => isset($episodewriterArray) ? $episodewriterArray : array(),
|
||||
'episodeabsolutenumber' => isset($episodeabsolutenumberArray) ? $episodeabsolutenumberArray : array(),
|
||||
'episodetvdbID' => isset($episodetvdbIDArray) ? $episodetvdbIDArray : [],
|
||||
'episodenumber' => isset($episodenumberArray) ? $episodenumberArray : [],
|
||||
'episodeseason' => isset($episodeseasonArray) ? $episodeseasonArray : [],
|
||||
'episodedirector' => isset($episodedirectorArray) ? $episodedirectorArray : [],
|
||||
'episodename' => isset($episodenameArray) ? $episodenameArray : [],
|
||||
'episodefirstaired' => isset($episodefirstairedArray) ? $episodefirstairedArray : [],
|
||||
'episodegueststars' => isset($episodegueststarsArray) ? $episodegueststarsArray : [],
|
||||
'episodeimdbID' => isset($episodeimdbID) ? $episodeimdbID : [],
|
||||
'episodeoverview' => isset($episodeoverviewArray) ? $episodeoverviewArray : [],
|
||||
'episoderating' => isset($episoderatingArray) ? $episoderatingArray : [],
|
||||
'episodewriter' => isset($episodewriterArray) ? $episodewriterArray : [],
|
||||
'episodeabsolutenumber' => isset($episodeabsolutenumberArray) ? $episodeabsolutenumberArray : [],
|
||||
);
|
||||
|
||||
return $TheTVDBAPIArray;
|
||||
|
||||
@@ -57,7 +57,7 @@ class Tmux
|
||||
|
||||
public function getConnectionsInfo($constants)
|
||||
{
|
||||
$runVar = array();
|
||||
$runVar = [];
|
||||
$runVar['connections']['port_a'] = $runVar['connections']['host_a'] = $runVar['connections']['ip_a'] = false;
|
||||
|
||||
if ($constants['nntpproxy'] == 0) {
|
||||
@@ -118,7 +118,7 @@ class Tmux
|
||||
$port = 'port';
|
||||
break;
|
||||
}
|
||||
$runVar = array();
|
||||
$runVar = [];
|
||||
|
||||
$runVar['conncounts'][$which]['active'] = $runVar['conncounts'][$which]['total'] = 0;
|
||||
|
||||
@@ -347,7 +347,7 @@ class Tmux
|
||||
|
||||
public function relativeTime($_time)
|
||||
{
|
||||
$d = array();
|
||||
$d = [];
|
||||
$d[0] = [1, "sec"];
|
||||
$d[1] = [60, "min"];
|
||||
$d[2] = [3600, "hr"];
|
||||
|
||||
@@ -147,7 +147,7 @@ class TvRage
|
||||
|
||||
$countries = $this->pdo->query("select distinct(country) as country from tvrage where country != ''");
|
||||
$showsindb = $this->pdo->query("select distinct(rageid) as rageid from tvrage");
|
||||
$showarray = array();
|
||||
$showarray = [];
|
||||
foreach($showsindb as $show)
|
||||
{
|
||||
$showarray[] = $show['rageid'];
|
||||
@@ -175,7 +175,7 @@ class TvRage
|
||||
{
|
||||
$tzOffset = 60*60*6;
|
||||
$yesterday = strtotime("-1 day") - $tzOffset;
|
||||
$xmlSchedule = array();
|
||||
$xmlSchedule = [];
|
||||
|
||||
foreach ($sched as $dayObj)
|
||||
{
|
||||
@@ -232,7 +232,7 @@ class TvRage
|
||||
foreach ($res as $arr)
|
||||
{
|
||||
$prev_ep = $next_ep = "";
|
||||
$query = array();
|
||||
$query = [];
|
||||
|
||||
// previous episode
|
||||
if (isset($epInfo['prev']) && $epInfo['prev']['episode'] != '')
|
||||
@@ -635,14 +635,14 @@ class TvRage
|
||||
if (isset($arrXml['show']) && is_array($arrXml['show']))
|
||||
{
|
||||
// we got a valid xml response
|
||||
$titleMatches = array();
|
||||
$urlMatches = array();
|
||||
$akaMatches = array();
|
||||
$titleMatches = [];
|
||||
$urlMatches = [];
|
||||
$akaMatches = [];
|
||||
|
||||
if (isset($arrXml['show']['showid']))
|
||||
{
|
||||
// we got exactly 1 match so lets convert it to an array so we can use it in the logic below
|
||||
$newArr = array();
|
||||
$newArr = [];
|
||||
$newArr[] = $arrXml['show'];
|
||||
unset($arrXml);
|
||||
$arrXml['show'] = $newArr;
|
||||
@@ -988,7 +988,7 @@ class TvRage
|
||||
$showInfo['season'] = sprintf('S%02d', $showInfo['season']);
|
||||
//check for multi episode release
|
||||
if (is_array($showInfo['episode'])) {
|
||||
$tmpArr = array();
|
||||
$tmpArr = [];
|
||||
foreach ($showInfo['episode'] as $ep) {
|
||||
$tmpArr[] = sprintf('E%02d', $ep);
|
||||
}
|
||||
|
||||
@@ -33,14 +33,14 @@ class zipfile
|
||||
*
|
||||
* @var array $datasec
|
||||
*/
|
||||
var $datasec = array();
|
||||
var $datasec = [];
|
||||
|
||||
/**
|
||||
* Central directory
|
||||
*
|
||||
* @var array $ctrl_dir
|
||||
*/
|
||||
var $ctrl_dir = array();
|
||||
var $ctrl_dir = [];
|
||||
|
||||
/**
|
||||
* End of central directory record
|
||||
|
||||
@@ -38,7 +38,7 @@ class AniDB
|
||||
/**
|
||||
* @param array $options Class instances / Echo to cli.
|
||||
*/
|
||||
public function __construct(array $options = array())
|
||||
public function __construct(array $options = [])
|
||||
{
|
||||
$defaults = [
|
||||
'Echo' => false,
|
||||
@@ -199,7 +199,7 @@ class AniDB
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function matchAnimeRelease($release = array())
|
||||
private function matchAnimeRelease($release = [])
|
||||
{
|
||||
$matched = false;
|
||||
$type = 'Local';
|
||||
|
||||
@@ -309,7 +309,7 @@ class ProcessAdditional
|
||||
$this->_unrarPath = false;
|
||||
|
||||
// Pass the binary extractors to ArchiveInfo.
|
||||
$clients = array();
|
||||
$clients = [];
|
||||
if ($this->pdo->getSetting('unrarpath') != '') {
|
||||
$clients += array(\ArchiveInfo::TYPE_RAR => $this->pdo->getSetting('unrarpath'));
|
||||
$this->_unrarPath = $this->pdo->getSetting('unrarpath');
|
||||
@@ -527,7 +527,7 @@ class ProcessAdditional
|
||||
if (is_array($this->_releases)) {
|
||||
$this->_totalReleases = count($this->_releases);
|
||||
} else {
|
||||
$this->_releases = array();
|
||||
$this->_releases = [];
|
||||
$this->_totalReleases = 0;
|
||||
}
|
||||
}
|
||||
@@ -640,7 +640,7 @@ class ProcessAdditional
|
||||
* @void
|
||||
* @access protected
|
||||
*/
|
||||
protected function _recursivePathDelete($path, $ignoredFolders = array())
|
||||
protected function _recursivePathDelete($path, $ignoredFolders = [])
|
||||
{
|
||||
if (is_dir($path)) {
|
||||
|
||||
@@ -1056,7 +1056,7 @@ class ProcessAdditional
|
||||
break;
|
||||
}
|
||||
|
||||
$fileName = array();
|
||||
$fileName = [];
|
||||
if (preg_match('/[^\/\\\\]*\.[a-zA-Z0-9]*$/', $file['name'], $fileName)) {
|
||||
$fileName = $fileName[0];
|
||||
} else {
|
||||
@@ -1184,7 +1184,7 @@ class ProcessAdditional
|
||||
$nestedLevels++;
|
||||
}
|
||||
|
||||
$fileType = array();
|
||||
$fileType = [];
|
||||
|
||||
// Get all the remaining files in the temp dir.
|
||||
$files = $this->_getTempDirectoryContents();
|
||||
@@ -2535,8 +2535,8 @@ class ProcessAdditional
|
||||
|
||||
$this->_NZBHasCompressedFile = false;
|
||||
|
||||
$this->_sampleMessageIDs = $this->_JPGMessageIDs = $this->_MediaInfoMessageIDs = array();
|
||||
$this->_AudioInfoMessageIDs = $this->_RARFileMessageIDs = array();
|
||||
$this->_sampleMessageIDs = $this->_JPGMessageIDs = $this->_MediaInfoMessageIDs = [];
|
||||
$this->_AudioInfoMessageIDs = $this->_RARFileMessageIDs = [];
|
||||
$this->_AudioInfoExtension = '';
|
||||
|
||||
$this->_addedFileInfo = 0;
|
||||
|
||||
@@ -55,7 +55,7 @@ switch($action)
|
||||
else
|
||||
{
|
||||
$page->title = "Binary Black/Whitelist Add";
|
||||
$r = array();
|
||||
$r = [];
|
||||
$r["status"] = 1;
|
||||
$r["optype"] = 1;
|
||||
$r["msgcol"] = 1;
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ $page = new AdminPage();
|
||||
|
||||
$page->title = "Admin Hangout";
|
||||
|
||||
$statusmsgs = array();
|
||||
$statusmsgs = [];
|
||||
|
||||
//
|
||||
// status messages
|
||||
|
||||
@@ -10,7 +10,7 @@ $id = 0;
|
||||
|
||||
//get the user roles
|
||||
$userroles = $users->getRoles();
|
||||
$roles = array();
|
||||
$roles = [];
|
||||
foreach ($userroles as $r) {
|
||||
$roles[$r['ID']] = $r['name'];
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ $previewcat="-1";
|
||||
if (isset($_REQUEST["previewcat"]))
|
||||
$previewcat = $_REQUEST["previewcat"];
|
||||
|
||||
$catarray = array();
|
||||
$catarray = [];
|
||||
$catarray[] = $previewcat;
|
||||
|
||||
$releasecount = $releases->getPreviewCount($previewtype, $catarray);
|
||||
|
||||
@@ -44,7 +44,7 @@ switch($action)
|
||||
}
|
||||
else
|
||||
{
|
||||
$r = array();
|
||||
$r = [];
|
||||
$r["status"] = 1;
|
||||
}
|
||||
$page->smarty->assign('regex', $r);
|
||||
|
||||
@@ -16,7 +16,7 @@ $numarticlesdefault = 20000;
|
||||
$groupList = $groups->getAll();
|
||||
array_unshift($groupList, array('ID'=>0, 'name'=>'All Groups'));
|
||||
|
||||
$gid = $gnames = array();
|
||||
$gid = $gnames = [];
|
||||
$groupname = (isset($_REQUEST['groupname']) && !empty($_REQUEST['groupname'])) ? $_REQUEST['groupname'] : '';
|
||||
$groupID = isset($_REQUEST['groupID']) ? $_REQUEST['groupID'] : '0';
|
||||
$regex = (isset($_REQUEST['regex']) && !empty($_REQUEST['regex'])) ? $_REQUEST['regex'] : '/^(?P<name>.*)$/i';
|
||||
|
||||
@@ -12,7 +12,7 @@ $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view';
|
||||
|
||||
//get the user roles
|
||||
$userroles = $users->getRoles();
|
||||
$roles = array();
|
||||
$roles = [];
|
||||
foreach ($userroles as $r) {
|
||||
$roles[$r['ID']] = $r['name'];
|
||||
}
|
||||
@@ -21,7 +21,7 @@ switch($action)
|
||||
{
|
||||
case 'add':
|
||||
$page->title = "User Roles Add";
|
||||
$role = array();
|
||||
$role = [];
|
||||
$role["name"] = '';
|
||||
$role["apirequests"] = '';
|
||||
$role["downloadrequests"] = '';
|
||||
@@ -43,7 +43,7 @@ switch($action)
|
||||
$ret = $users->updateRole($_POST['id'], $_POST['name'], $_POST['apirequests'], $_POST['downloadrequests'], $_POST['defaultinvites'], $_POST['isdefault'], $_POST['canpreview'], $_POST['canpre'], $_POST['hidetads']);
|
||||
header("Location:".WWW_TOP."/role-list.php");
|
||||
|
||||
$_POST['exccat'] = (!isset($_POST['exccat']) || !is_array($_POST['exccat'])) ? array() : $_POST['exccat'];
|
||||
$_POST['exccat'] = (!isset($_POST['exccat']) || !is_array($_POST['exccat'])) ? [] : $_POST['exccat'];
|
||||
$users->addRoleCategoryExclusions($_POST['id'], $_POST['exccat']);
|
||||
}
|
||||
|
||||
|
||||
@@ -143,8 +143,8 @@ $page->smarty->assign('coversPath', NN_COVERS);
|
||||
$result = $page->settings->query("SELECT id, title FROM category WHERE id in (3030, 7010, 7020, 7040, 7060)");
|
||||
|
||||
// setup the display lists for these categories, this could have been static, but then if names changed they would be wrong
|
||||
$book_reqids_ids = array();
|
||||
$book_reqids_names = array();
|
||||
$book_reqids_ids = [];
|
||||
$book_reqids_names = [];
|
||||
foreach ($result as $bookcategory)
|
||||
{
|
||||
$book_reqids_ids[] = $bookcategory["id"];
|
||||
|
||||
@@ -13,7 +13,7 @@ switch($action)
|
||||
{
|
||||
case 'add':
|
||||
$page->title = "Spotnab Source Add";
|
||||
$source = array();
|
||||
$source = [];
|
||||
$source["description"] = '';
|
||||
$row = $spotnab->getDefaultValue('spotnabsources','username');
|
||||
$source["username"] = $row[0]["Default"];
|
||||
|
||||
@@ -10,7 +10,7 @@ $page->title = "User List";
|
||||
|
||||
$usercount = $users->getCount();
|
||||
$userroles = $users->getRoles();
|
||||
$roles = array();
|
||||
$roles = [];
|
||||
foreach ($userroles as $r) {
|
||||
$roles[$r['id']] = $r['name'];
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ if (isset($_REQUEST['del'])) {
|
||||
$usermovies = $um->delMovie($page->users->currentUserId(), $_REQUEST['del']);
|
||||
} else if (isset($_REQUEST['add'])) {
|
||||
// Derive cats from user preferences.
|
||||
$cats = array();
|
||||
$cats = [];
|
||||
$cats[] = '2030';
|
||||
$cats[] = '2040';
|
||||
|
||||
@@ -40,7 +40,7 @@ if (isset($_REQUEST['del'])) {
|
||||
$searchm = $tmdb->searchMovie($_REQUEST['id']);
|
||||
if ($searchm !== false) {
|
||||
if (isset($searchm['results'])) {
|
||||
$obj = array();
|
||||
$obj = [];
|
||||
$limit = 0;
|
||||
foreach ($searchm['results'] as $movie) {
|
||||
$limit++;
|
||||
@@ -55,7 +55,7 @@ if (isset($_REQUEST['del'])) {
|
||||
}
|
||||
}
|
||||
}
|
||||
$imdbids = array();
|
||||
$imdbids = [];
|
||||
|
||||
if (isset($obj) && count($obj) > 0) {
|
||||
foreach ($obj as $movie) {
|
||||
@@ -67,7 +67,7 @@ if (isset($_REQUEST['del'])) {
|
||||
if (count($imdbids) == 0) {
|
||||
print "<h3 style='padding-top:30px;'>No results found</h3>";
|
||||
} else {
|
||||
$ourmovieimdbs = array();
|
||||
$ourmovieimdbs = [];
|
||||
if (count($imdbids) > 0) {
|
||||
$m = new Film(['Settings' => $page->settings, 'TMDb' => $tmdb]);
|
||||
$allmovies = $m->getMovieInfoMultiImdb($imdbids);
|
||||
@@ -78,7 +78,7 @@ if (isset($_REQUEST['del'])) {
|
||||
}
|
||||
}
|
||||
|
||||
$userimdbs = array();
|
||||
$userimdbs = [];
|
||||
$usermovies = $um->getMovies($page->users->currentUserId());
|
||||
foreach ($usermovies as $umovie) {
|
||||
$userimdbs[$umovie['imdbid']] = $umovie['imdbid'];
|
||||
|
||||
+4
-4
@@ -20,7 +20,7 @@ if (isset($_GET['id']) && ctype_digit($_GET['id'])) {
|
||||
$page->smarty->assign('nodata', 'No releases for this series.');
|
||||
} else {
|
||||
// Sort releases by season, episode, date posted.
|
||||
$season = $episode = $posted = array();
|
||||
$season = $episode = $posted = [];
|
||||
|
||||
foreach ($releases as $rlk => $rlv) {
|
||||
$season[$rlk] = $rlv['season'];
|
||||
@@ -30,7 +30,7 @@ if (isset($_GET['id']) && ctype_digit($_GET['id'])) {
|
||||
|
||||
array_multisort($episode, SORT_DESC, $posted, SORT_DESC, $releases);
|
||||
|
||||
$seasons = array();
|
||||
$seasons = [];
|
||||
foreach ($releases as $r) {
|
||||
$seasons[$r['season']][$r['episode']][] = $r;
|
||||
}
|
||||
@@ -38,7 +38,7 @@ if (isset($_GET['id']) && ctype_digit($_GET['id'])) {
|
||||
$page->smarty->assign('seasons', $seasons);
|
||||
$page->smarty->assign('anidb', $anidb);
|
||||
|
||||
$animeEpisodeTitles = array();
|
||||
$animeEpisodeTitles = [];
|
||||
foreach ($releases as $r) {
|
||||
$animeEpisodeTitles[$r['tvtitle']][] = $r;
|
||||
}
|
||||
@@ -82,7 +82,7 @@ if (isset($_GET['id']) && ctype_digit($_GET['id'])) {
|
||||
$page->meta_keywords = 'view,anime,series,description,details';
|
||||
$page->meta_description = 'View Anime List';
|
||||
|
||||
$animelist = array();
|
||||
$animelist = [];
|
||||
if ($masterserieslist instanceof \Traversable) {
|
||||
foreach ($masterserieslist as $s) {
|
||||
if (preg_match('/^[0-9]/', $s['title'])) {
|
||||
|
||||
+4
-4
@@ -224,7 +224,7 @@ switch ($function) {
|
||||
if ($data)
|
||||
$reldata = $data;
|
||||
else
|
||||
$reldata = array();
|
||||
$reldata = [];
|
||||
|
||||
$page->smarty->assign('comments',$reldata);
|
||||
$page->smarty->assign('rsstitle',"API Comments");
|
||||
@@ -306,7 +306,7 @@ switch ($function) {
|
||||
case "mu":
|
||||
if (isset($_GET["artist"]) && $_GET["artist"]=="" && isset($_GET["album"]) && $_GET["album"]=="")
|
||||
showApiError(200);
|
||||
$categoryId = array();
|
||||
$categoryId = [];
|
||||
if (isset($_GET["cat"]))
|
||||
$categoryId = explode(",",$_GET["cat"]);
|
||||
else
|
||||
@@ -323,7 +323,7 @@ switch ($function) {
|
||||
$maxage = $_GET["maxage"];
|
||||
}
|
||||
|
||||
$genreId = array();
|
||||
$genreId = [];
|
||||
if (isset($_GET["genre"]))
|
||||
$genreId = explode(",",$_GET["genre"]);
|
||||
else
|
||||
@@ -560,7 +560,7 @@ function maxAge()
|
||||
*/
|
||||
function categoryid()
|
||||
{
|
||||
$categoryID = array();
|
||||
$categoryID = [];
|
||||
$categoryID[] = -1;
|
||||
if (isset($_GET['cat'])) {
|
||||
$categoryIDs = $_GET['cat'];
|
||||
|
||||
@@ -9,7 +9,7 @@ $cat = new Category(['Settings' => $page->settings]);
|
||||
$gen = new Genres(['Settings' => $page->settings]);
|
||||
|
||||
$concats = $cat->getChildren(Category::CAT_PARENT_GAME);
|
||||
$ctmp = array();
|
||||
$ctmp = [];
|
||||
foreach ($concats as $ccat) {
|
||||
$ctmp[$ccat['id']] = $ccat;
|
||||
}
|
||||
@@ -18,7 +18,7 @@ if (isset($_REQUEST["t"]) && array_key_exists($_REQUEST['t'], $ctmp)) {
|
||||
$category = $_REQUEST["t"] + 0;
|
||||
}
|
||||
|
||||
$catarray = array();
|
||||
$catarray = [];
|
||||
$catarray[] = $category;
|
||||
|
||||
$page->smarty->assign('catlist', $ctmp);
|
||||
@@ -30,7 +30,7 @@ $offset = (isset($_REQUEST["offset"]) && ctype_digit($_REQUEST['offset'])) ? $_R
|
||||
$ordering = $console->getConsoleOrdering();
|
||||
$orderby = isset($_REQUEST["ob"]) && in_array($_REQUEST['ob'], $ordering) ? $_REQUEST["ob"] : '';
|
||||
|
||||
$results = $consoles = array();
|
||||
$results = $consoles = [];
|
||||
$results = $console->getConsoleRange($catarray, $offset, ITEMS_PER_COVER_PAGE, $orderby, $page->userdata["categoryexclusions"]);
|
||||
|
||||
$maxwords = 50;
|
||||
@@ -52,7 +52,7 @@ $title = (isset($_REQUEST['title']) && !empty($_REQUEST['title'])) ? stripslashe
|
||||
$page->smarty->assign('title', $title);
|
||||
|
||||
$genres = $gen->getGenres(Genres::CONSOLE_TYPE, true);
|
||||
$tmpgnr = array();
|
||||
$tmpgnr = [];
|
||||
foreach ($genres as $gn) {
|
||||
$tmpgnr[$gn['id']] = $gn['title'];
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ if (isset($_GET["id"]))
|
||||
$rageinfo = $tvrage->getByRageID($data["rageid"]);
|
||||
if (count($rageinfo) > 0)
|
||||
{
|
||||
$seriesnames = $seriesdescription = $seriescountry = $seriesgenre = $seriesimg = $seriesid = array();
|
||||
$seriesnames = $seriesdescription = $seriescountry = $seriesgenre = $seriesimg = $seriesid = [];
|
||||
foreach($rageinfo as $r)
|
||||
{
|
||||
$seriesnames[] = $r['releasetitle'];
|
||||
|
||||
@@ -40,11 +40,11 @@ if (!Utility::startsWith(realpath($path), realpath($basepath)))
|
||||
|
||||
$files = glob(preg_replace('/(\*|\?|\[)/', '[$1]', $path)."/*");
|
||||
|
||||
$items = array();
|
||||
$dirs = array();
|
||||
$items = [];
|
||||
$dirs = [];
|
||||
foreach($files as $f)
|
||||
{
|
||||
$i = array();
|
||||
$i = [];
|
||||
$i["name"] = basename($f);
|
||||
$i["isdir"] = (is_dir($f)?1:0);
|
||||
$i["fullname"] = $f;
|
||||
|
||||
+4
-4
@@ -9,7 +9,7 @@ $cat = new Category(['Settings' => $page->settings]);
|
||||
$gen = new Genres(['Settings' => $page->settings]);
|
||||
|
||||
$concats = $cat->getChildren(Category::CAT_PARENT_PC);
|
||||
$ctmp = array();
|
||||
$ctmp = [];
|
||||
foreach ($concats as $ccat) {
|
||||
$ctmp[$ccat['id']] = $ccat;
|
||||
}
|
||||
@@ -18,7 +18,7 @@ if (isset($_REQUEST["t"]) && array_key_exists($_REQUEST['t'], $ctmp)) {
|
||||
$category = $_REQUEST["t"] + 0;
|
||||
}
|
||||
|
||||
$catarray = array();
|
||||
$catarray = [];
|
||||
$catarray[] = $category;
|
||||
|
||||
$page->smarty->assign('catlist', $ctmp);
|
||||
@@ -31,7 +31,7 @@ $ordering = $games->getGamesOrdering();
|
||||
|
||||
$orderby = isset($_REQUEST["ob"]) && in_array($_REQUEST['ob'], $ordering) ? $_REQUEST["ob"] : '';
|
||||
|
||||
$results = $games2 = array();
|
||||
$results = $games2 = [];
|
||||
$results = $games->getGamesRange($catarray, $offset, ITEMS_PER_COVER_PAGE, $orderby, -1, $page->userdata["categoryexclusions"]);
|
||||
$maxwords = 50;
|
||||
foreach ($results as $result) {
|
||||
@@ -53,7 +53,7 @@ $title = (isset($_REQUEST['title']) && !empty($_REQUEST['title'])) ? stripslashe
|
||||
$page->smarty->assign('title', $title);
|
||||
|
||||
$genres = $gen->getGenres(Genres::GAME_TYPE, true);
|
||||
$tmpgnr = array();
|
||||
$tmpgnr = [];
|
||||
foreach ($genres as $gn) {
|
||||
$tmpgnr[$gn['id']] = $gn['title'];
|
||||
}
|
||||
|
||||
@@ -12,17 +12,17 @@ if (isset($_REQUEST["del"])) {
|
||||
|
||||
$cat = new Category(['Settings' => $page->settings]);
|
||||
$tmpcats = $cat->getChildren(Category::CAT_PARENT_MOVIE);
|
||||
$categories = array();
|
||||
$categories = [];
|
||||
foreach ($tmpcats as $c) {
|
||||
$categories[$c['id']] = $c['title'];
|
||||
}
|
||||
|
||||
$movies = $um->getMovies($page->users->currentUserId());
|
||||
$results = array();
|
||||
$results = [];
|
||||
foreach ($movies as $mov => $m) {
|
||||
$movcats = explode('|', $m['categoryid']);
|
||||
if (is_array($movcats) && sizeof($movcats) > 0) {
|
||||
$catarr = array();
|
||||
$catarr = [];
|
||||
foreach ($movcats as $movcat) {
|
||||
if (!empty($movcat)) {
|
||||
$catarr[] = $categories[$movcat];
|
||||
|
||||
@@ -12,7 +12,7 @@ $error = false;
|
||||
// Array with all the possible poster wall types.
|
||||
$startTypes = array('Books', 'Console', 'Movies', 'XXX', 'Audio', 'PC', 'TV'/*, 'Recent'*/);
|
||||
// Array that will contain the poster wall types (the above array minus whatever they have disabled in admin).
|
||||
$types = array();
|
||||
$types = [];
|
||||
// Get the names of all enabled parent categories.
|
||||
$categories = $category->getEnabledParentNames();
|
||||
// Loop through our possible ones and check if they are in the enabled categories.
|
||||
|
||||
@@ -15,7 +15,7 @@ if (isset($_GET["id"]) && ctype_digit($_GET['id'])) {
|
||||
$category = $_REQUEST["t"];
|
||||
}
|
||||
|
||||
$catarray = array();
|
||||
$catarray = [];
|
||||
$catarray[] = $category;
|
||||
|
||||
$rel = $releases->searchbyRageId($_GET["id"], '', '', 0, 1000, "", $catarray, -1);
|
||||
@@ -29,7 +29,7 @@ if (isset($_GET["id"]) && ctype_digit($_GET['id'])) {
|
||||
$myshows = $us->getShow($page->users->currentUserId(), $rage[0]['rageid']);
|
||||
|
||||
// Sort releases by season, episode, date posted.
|
||||
$season = $episode = $posted = array();
|
||||
$season = $episode = $posted = [];
|
||||
foreach ($rel as $rlk => $rlv) {
|
||||
$season[$rlk] = $rlv['season'];
|
||||
$episode[$rlk] = $rlv['episode'];
|
||||
@@ -37,7 +37,7 @@ if (isset($_GET["id"]) && ctype_digit($_GET['id'])) {
|
||||
}
|
||||
array_multisort($season, SORT_DESC, $episode, SORT_DESC, $posted, SORT_DESC, $rel);
|
||||
|
||||
$seasons = array();
|
||||
$seasons = [];
|
||||
foreach ($rel as $r) {
|
||||
$seasons[$r['season']][$r['episode']][] = $r;
|
||||
}
|
||||
@@ -47,7 +47,7 @@ if (isset($_GET["id"]) && ctype_digit($_GET['id'])) {
|
||||
$page->smarty->assign('myshows', $myshows);
|
||||
|
||||
//get series name(s), description, country and genre
|
||||
$seriesnames = $seriesdescription = $seriescountry = $seriesgenre = array();
|
||||
$seriesnames = $seriesdescription = $seriescountry = $seriesgenre = [];
|
||||
foreach ($rage as $r) {
|
||||
$seriesnames[] = $r['releasetitle'];
|
||||
if (!empty($r['description'])) {
|
||||
@@ -101,7 +101,7 @@ if (isset($_GET["id"]) && ctype_digit($_GET['id'])) {
|
||||
$page->meta_keywords = "view,series,tv,show,description,details";
|
||||
$page->meta_description = "View Series List";
|
||||
|
||||
$serieslist = array();
|
||||
$serieslist = [];
|
||||
foreach ($masterserieslist as $s) {
|
||||
if (preg_match('/^[0-9]/', $s['releasetitle'])) {
|
||||
$thisrange = '0-9';
|
||||
|
||||
+3
-3
@@ -8,7 +8,7 @@ $movie = new XXX();
|
||||
$cat = new Category();
|
||||
|
||||
$moviecats = $cat->getChildren(Category::CAT_PARENT_XXX);
|
||||
$mtmp = array();
|
||||
$mtmp = [];
|
||||
foreach ($moviecats as $mcat) {
|
||||
$mtmp[$mcat['id']] = $mcat;
|
||||
}
|
||||
@@ -16,7 +16,7 @@ $category = Category::CAT_PARENT_XXX;
|
||||
if (isset($_REQUEST['t']) && array_key_exists($_REQUEST['t'], $mtmp)) {
|
||||
$category = $_REQUEST['t'] + 0;
|
||||
}
|
||||
$catarray = array();
|
||||
$catarray = [];
|
||||
$catarray[] = $category;
|
||||
|
||||
$page->smarty->assign('catlist', $mtmp);
|
||||
@@ -28,7 +28,7 @@ $offset = (isset($_REQUEST['offset']) && ctype_digit($_REQUEST['offset'])) ? $_R
|
||||
$ordering = $movie->getXXXOrdering();
|
||||
$orderby = isset($_REQUEST['ob']) && in_array($_REQUEST['ob'], $ordering) ? $_REQUEST['ob'] : '';
|
||||
|
||||
$results = $movies = array();
|
||||
$results = $movies = [];
|
||||
$results = $movie->getXXXRange($catarray, $offset, ITEMS_PER_COVER_PAGE, $orderby, -1, $page->userdata['categoryexclusions']);
|
||||
foreach ($results as $result) {
|
||||
$result['genre'] = $movie->makeFieldLinks($result, 'genre');
|
||||
|
||||
Reference in New Issue
Block a user