diff --git a/classes/ajax_start.php b/classes/ajax_start.php
index a5ed2b80..babe71d9 100644
--- a/classes/ajax_start.php
+++ b/classes/ajax_start.php
@@ -14,7 +14,7 @@
$LoginCookie = $Enc->decrypt($_COOKIE['session']);
}
if (isset($LoginCookie)) {
- list($SessionID, $UserID) = explode("|~|",$Enc->decrypt($LoginCookie));
+ list($SessionID, $UserID) = explode("|~|", $Enc->decrypt($LoginCookie));
if (!$UserID || !$SessionID) {
die('Not logged in!');
@@ -49,8 +49,8 @@ function is_number($Str) {
function display_str($Str) {
if ($Str != '') {
$Str = make_utf8($Str);
- $Str = mb_convert_encoding($Str,'HTML-ENTITIES','UTF-8');
- $Str = preg_replace("/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,5};)/m","&",$Str);
+ $Str = mb_convert_encoding($Str, 'HTML-ENTITIES', 'UTF-8');
+ $Str = preg_replace("/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,5};)/m", '&', $Str);
$Replace = array(
"'",'"',"<",">",
@@ -62,7 +62,7 @@ function display_str($Str) {
'€','‚','ƒ','„','…','†','‡','ˆ','‰','Š','‹','Œ','Ž','‘','’','“','”','•','–','—','˜','™','š','›','œ','ž','Ÿ'
);
- $Str = str_replace($Replace,$With,$Str);
+ $Str = str_replace($Replace, $With, $Str);
}
return $Str;
}
diff --git a/classes/artists.class.php b/classes/artists.class.php
index 6ed0eea4..b88ac4fc 100644
--- a/classes/artists.class.php
+++ b/classes/artists.class.php
@@ -49,7 +49,7 @@ public static function get_artists($GroupIDs) {
ORDER BY ta.GroupID ASC,
ta.Importance ASC,
aa.Name ASC;");
- while (list($GroupID,$ArtistID,$ArtistName,$ArtistImportance,$AliasID) = $DB->next_record(MYSQLI_BOTH, false)) {
+ while (list($GroupID, $ArtistID, $ArtistName, $ArtistImportance, $AliasID) = $DB->next_record(MYSQLI_BOTH, false)) {
$Results[$GroupID][$ArtistImportance][] = array('id' => $ArtistID, 'name' => $ArtistName, 'aliasid' => $AliasID);
$New[$GroupID][$ArtistImportance][] = array('id' => $ArtistID, 'name' => $ArtistName, 'aliasid' => $AliasID);
}
diff --git a/classes/artists_similar.class.php b/classes/artists_similar.class.php
index 92acb540..6337acde 100644
--- a/classes/artists_similar.class.php
+++ b/classes/artists_similar.class.php
@@ -72,7 +72,7 @@ function set_up() {
continue;
}
$this->Artists[$ArtistID] = new ARTIST($ArtistID, $Name);
- $this->Similar[$ArtistID] = array('ID'=>$ArtistID,'Score'=>$Score);
+ $this->Similar[$ArtistID] = array('ID' => $ArtistID, 'Score' => $Score);
$this->TotalScore += $Score;
$ArtistIDs[] = $ArtistID;
}
@@ -86,8 +86,8 @@ function set_up() {
JOIN artists_similar AS s2 ON s1.SimilarID=s2.SimilarID AND s1.ArtistID!=s2.ArtistID
JOIN artists_similar_scores AS ass ON ass.SimilarID=s1.SimilarID
JOIN artists_group AS a ON a.ArtistID=s2.ArtistID
- WHERE s1.ArtistID IN(".implode(',',$ArtistIDs).')
- AND s2.ArtistID IN('.implode(',',$ArtistIDs).')');
+ WHERE s1.ArtistID IN(".implode(',', $ArtistIDs).')
+ AND s2.ArtistID IN('.implode(',', $ArtistIDs).')');
// Build into array
while (list($Artist1ID, $Artist2ID) = $DB->next_record()) {
diff --git a/classes/charts.class.php b/classes/charts.class.php
index de35cb3b..3127a555 100644
--- a/classes/charts.class.php
+++ b/classes/charts.class.php
@@ -30,7 +30,7 @@ public function lines($Thickness, $Solid = 1, $Blank = 0) {
}
public function title($Title, $Color = '', $Size = '') {
- $this->URL .= '&chtt='.str_replace(array(' ',"\n"), array('+','|'), $Title);
+ $this->URL .= '&chtt='.str_replace(array(' ', "\n"), array('+', '|'), $Title);
if (!empty($Color)) {
$this->URL .= '&chts='.$Color;
}
diff --git a/classes/collages.class.php b/classes/collages.class.php
index cabcfc9d..3050c4d3 100644
--- a/classes/collages.class.php
+++ b/classes/collages.class.php
@@ -51,4 +51,32 @@ public static function decrease_subscriptions($CollageID) {
WHERE ID = '$CollageID'");
}
+ public static function create_personal_collage() {
+ global $DB, $LoggedUser;
+
+ $DB->query("
+ SELECT
+ COUNT(ID)
+ FROM collages
+ WHERE UserID = '$LoggedUser[ID]'
+ AND CategoryID = '0'
+ AND Deleted = '0'");
+ list($CollageCount) = $DB->next_record();
+
+ if ($CollageCount >= $LoggedUser['Permissions']['MaxCollages']) {
+ list($CollageID) = $DB->next_record();
+ header('Location: collage.php?id='.$CollageID);
+ die();
+ }
+ $NameStr = ($CollageCount > 0) ? ' no. ' . ($CollageCount + 1) : '';
+ $DB->query("
+ INSERT INTO collages
+ (Name, Description, CategoryID, UserID)
+ VALUES
+ ('$LoggedUser[Username]\'s personal collage$NameStr', 'Personal collage for $LoggedUser[Username]. The first 5 albums will appear on his or her [url=https:\/\/".SSL_SITE_URL."\/user.php?id=$LoggedUser[ID]]profile[\/url].', '0', $LoggedUser[ID])");
+ $CollageID = $DB->inserted_id();
+ header('Location: collage.php?id='.$CollageID);
+ die();
+ }
+
}
diff --git a/classes/cookie.class.php b/classes/cookie.class.php
index 1fc3bf72..ccc3a66b 100644
--- a/classes/cookie.class.php
+++ b/classes/cookie.class.php
@@ -12,7 +12,7 @@
/*
interface COOKIE_INTERFACE {
public function get($Key);
- public function set($Key,$Value,$Seconds,$LimitAccess);
+ public function set($Key, $Value, $Seconds, $LimitAccess);
public function del($Key);
public function flush();
@@ -31,12 +31,12 @@ public function get($Key) {
}
//Pass the 4th optional param as false to allow JS access to the cookie
- public function set($Key,$Value,$Seconds = 86400,$LimitAccess = SELF::LIMIT_ACCESS) {
- setcookie(SELF::PREFIX.$Key,$Value,time()+$Seconds,'/',SITE_URL,$_SERVER['SERVER_PORT'] === '443',$LimitAccess,false);
+ public function set($Key, $Value, $Seconds = 86400, $LimitAccess = SELF::LIMIT_ACCESS) {
+ setcookie(SELF::PREFIX.$Key, $Value, time() + $Seconds, '/', SITE_URL, $_SERVER['SERVER_PORT'] === '443', $LimitAccess, false);
}
public function del($Key) {
- setcookie(SELF::PREFIX.$Key,'',time()-24*3600); //3600 vs 1 second to account for potential clock desyncs
+ setcookie(SELF::PREFIX.$Key, '', time() - 24 * 3600); //3600 vs 1 second to account for potential clock desyncs
}
public function flush() {
diff --git a/classes/encrypt.class.php b/classes/encrypt.class.php
index 6bf214fc..54a4aa37 100644
--- a/classes/encrypt.class.php
+++ b/classes/encrypt.class.php
@@ -12,20 +12,20 @@
}
class CRYPT {
- public function encrypt($Str,$Key=ENCKEY) {
+ public function encrypt($Str, $Key = ENCKEY) {
srand();
- $Str=str_pad($Str, 32-strlen($Str));
- $IVSize=mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);
- $IV=mcrypt_create_iv($IVSize, MCRYPT_RAND);
- $CryptStr=mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $Key, $Str, MCRYPT_MODE_CBC, $IV);
+ $Str = str_pad($Str, 32 - strlen($Str));
+ $IVSize = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);
+ $IV = mcrypt_create_iv($IVSize, MCRYPT_RAND);
+ $CryptStr = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $Key, $Str, MCRYPT_MODE_CBC, $IV);
return base64_encode($IV.$CryptStr);
}
- public function decrypt($CryptStr,$Key=ENCKEY) {
- if ($CryptStr!='') {
- $IV=substr(base64_decode($CryptStr),0,16);
- $CryptStr=substr(base64_decode($CryptStr),16);
- return trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $Key, $CryptStr, MCRYPT_MODE_CBC,$IV));
+ public function decrypt($CryptStr, $Key = ENCKEY) {
+ if ($CryptStr != '') {
+ $IV = substr(base64_decode($CryptStr), 0, 16);
+ $CryptStr = substr(base64_decode($CryptStr), 16);
+ return trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $Key, $CryptStr, MCRYPT_MODE_CBC, $IV));
} else {
return '';
}
diff --git a/classes/format.class.php b/classes/format.class.php
index bb7df04e..8009c2c2 100644
--- a/classes/format.class.php
+++ b/classes/format.class.php
@@ -352,7 +352,7 @@ public static function human_format($Number) {
* @return Number of bytes it represents, e.g. (123.45 * 1024)
*/
public static function get_bytes($Size) {
- list($Value,$Unit) = sscanf($Size, "%f%s");
+ list($Value, $Unit) = sscanf($Size, "%f%s");
$Unit = ltrim($Unit);
if (empty($Unit)) {
return $Value ? round($Value) : 0;
@@ -487,7 +487,7 @@ public static function make_utf8($Str) {
$Encoding = 'UTF-8';
}
if (empty($Encoding)) {
- $Encoding = mb_detect_encoding($Str,'UTF-8, ISO-8859-1');
+ $Encoding = mb_detect_encoding($Str, 'UTF-8, ISO-8859-1');
}
if (empty($Encoding)) {
$Encoding = 'ISO-8859-1';
@@ -495,7 +495,7 @@ public static function make_utf8($Str) {
if ($Encoding == 'UTF-8') {
return $Str;
} else {
- return @mb_convert_encoding($Str,'UTF-8',$Encoding);
+ return @mb_convert_encoding($Str, 'UTF-8', $Encoding);
}
}
}
diff --git a/classes/image.class.php b/classes/image.class.php
index 1c6df30d..6540425b 100644
--- a/classes/image.class.php
+++ b/classes/image.class.php
@@ -46,7 +46,7 @@ function ellipse($x, $y, $Width, $Height, $Color) {
}
function text($x, $y, $Color, $Text) {
- return imagettftext ($this->Image, $this->FontSize,$this->TextAngle, $x, $y, $Color, $this->Font, $Text);
+ return imagettftext ($this->Image, $this->FontSize, $this->TextAngle, $x, $y, $Color, $this->Font, $Text);
}
function make_png($FileName = NULL) {
diff --git a/classes/irc.class.php b/classes/irc.class.php
index 3a1897b0..5a19f6bd 100644
--- a/classes/irc.class.php
+++ b/classes/irc.class.php
@@ -76,7 +76,7 @@ public function disconnect() {
public function get_channel() {
preg_match('/.+ PRIVMSG ([^:]+) :.+/', $this->Data, $Channel);
- if (preg_match('/#.+/',$Channel[1])) {
+ if (preg_match('/#.+/', $Channel[1])) {
return $Channel[1];
} else {
return false;
@@ -100,7 +100,7 @@ protected function get_irc_host() {
protected function get_word($Select=1) {
preg_match('/:.+ PRIVMSG [^:]+ :(.+)/', $this->Data, $Word);
- $Word = split(' ',$Word[1]);
+ $Word = split(' ', $Word[1]);
return trim($Word[$Select]);
}
@@ -131,7 +131,7 @@ protected function whois($Nick) {
/*
This function uses blacklisted_ip, which is no longer in RC2.
You can probably find it in old RC1 code kicking aronud if you need it.
- protected function ip_check($IP,$Gline=false,$Channel=BOT_REPORT_CHAN) {
+ protected function ip_check($IP, $Gline = false, $Channel = BOT_REPORT_CHAN) {
global $Cache, $DB;
if (blacklisted_ip($IP)) {
$this->send_to($Channel, 'TOR IP Detected: '.$IP);
@@ -148,7 +148,7 @@ protected function ip_check($IP,$Gline=false,$Channel=BOT_REPORT_CHAN) {
}*/
protected function listen() {
- global $Cache,$DB;
+ global $Cache, $DB;
$Cache->InternalCache = false;
stream_set_timeout($this->Socket, 10000000000);
while ($this->State == 1) {
@@ -163,7 +163,7 @@ protected function listen() {
}
if ($this->Whois !== false) {
- $Exp = explode(' ',$this->Data);
+ $Exp = explode(' ', $this->Data);
if ($Exp[1] == '307') {
$this->Identified[$this->Whois] = 1;
$this->send_to($this->LastChan, "$this->Whois correctly identified as a real person!");
@@ -185,7 +185,7 @@ protected function listen() {
}
}
- if (preg_match("/:([^!]+)![^\s]* PART #what.cd-disabled/", $this->Data, $Nick)) {
+ if (preg_match("/:([^!]+)![^\s]* PART ".BOT_DISABLED_CHAN.'/', $this->Data, $Nick)) {
if (isset($this->DisabledUsers[$Nick[1]])) {
$DB->query("DELETE FROM disable_list WHERE Nick = '" . $Nick[1] . "'");
$Cache->increment_value('num_disablees', -1);
@@ -193,7 +193,7 @@ protected function listen() {
}
}
- if (preg_match("/:([^!]+)![^\s]* KICK #what.cd-disabled.* /", $this->Data, $Nick)) {
+ if (preg_match("/:([^!]+)![^\s]* KICK ".BOT_DISABLED_CHAN.'.* /', $this->Data, $Nick)) {
$Nick = explode(" ", $Nick[0]);
if (isset($this->DisabledUsers[$Nick[3]])) {
$DB->query("DELETE FROM disable_list WHERE Nick = '" . $Nick[3] . "'");
@@ -210,11 +210,11 @@ protected function listen() {
$this->send_raw('PONG :'.$Ping[1]);
}
- if (preg_match('/.*PRIVMSG #.*/',$this->Data)) {
+ if (preg_match('/.*PRIVMSG #.*/', $this->Data)) {
$this->channel_events();
}
- if (preg_match("/.* PRIVMSG ".BOT_NICK." .*/",$this->Data)) {
+ if (preg_match("/.* PRIVMSG ".BOT_NICK." .*/", $this->Data)) {
$this->query_events();
}
}
diff --git a/classes/misc.class.php b/classes/misc.class.php
index c56c22dc..1dda6e5b 100644
--- a/classes/misc.class.php
+++ b/classes/misc.class.php
@@ -193,7 +193,7 @@ public static function create_thread($ForumID, $AuthorID, $Title, $PostBody) {
WHERE ID = '$TopicID'");
// Bump this topic to head of the cache
- list($Forum,,,$Stickies) = $Cache->get_value('forums_'.$ForumID);
+ list($Forum,,, $Stickies) = $Cache->get_value('forums_'.$ForumID);
if (!empty($Forum)) {
if (count($Forum) == TOPICS_PER_PAGE && $Stickies < TOPICS_PER_PAGE) {
array_pop($Forum);
@@ -407,7 +407,7 @@ public static function get_alias_tag($BadTag) {
* @param string $Message the message to write.
*/
public static function write_log($Message) {
- global $DB,$Time;
+ global $DB, $Time;
$DB->query("
INSERT INTO log (Message, Time)
VALUES ('" . db_string($Message) . "', '" . sqltime() . "')");
@@ -423,7 +423,7 @@ public static function write_log($Message) {
public static function sanitize_tag($Str) {
$Str = strtolower($Str);
$Str = preg_replace('/[^a-z0-9.]/', '', $Str);
- $Str = preg_replace('/(^[.,]*)|([.,]*$)/','',$Str);
+ $Str = preg_replace('/(^[.,]*)|([.,]*$)/', '', $Str);
$Str = htmlspecialchars($Str);
$Str = db_string(trim($Str));
return $Str;
diff --git a/classes/mysql.class.php b/classes/mysql.class.php
index 9b0eb306..ad3cdf24 100644
--- a/classes/mysql.class.php
+++ b/classes/mysql.class.php
@@ -248,7 +248,7 @@ function query($Query, $AutoHandle = 1) {
function query_unb($Query) {
$this->connect();
- mysqli_real_query($this->LinkID,$Query);
+ mysqli_real_query($this->LinkID, $Query);
}
function inserted_id() {
@@ -257,9 +257,9 @@ function inserted_id() {
}
}
- function next_record($Type=MYSQLI_BOTH, $Escape = true) { // $Escape can be true, false, or an array of keys to not escape
+ function next_record($Type = MYSQLI_BOTH, $Escape = true) { // $Escape can be true, false, or an array of keys to not escape
if ($this->LinkID) {
- $this->Record = mysqli_fetch_array($this->QueryID,$Type);
+ $this->Record = mysqli_fetch_array($this->QueryID, $Type);
$this->Row++;
if (!is_array($this->Record)) {
$this->QueryID = false;
@@ -302,7 +302,7 @@ function escape_str($Str) {
trigger_error('Attempted to escape array.');
return '';
}
- return mysqli_real_escape_string($this->LinkID,$Str);
+ return mysqli_real_escape_string($this->LinkID, $Str);
}
// Creates an array from a result set
@@ -310,7 +310,7 @@ function escape_str($Str) {
// Otherwise, use an integer
function to_array($Key = false, $Type = MYSQLI_BOTH, $Escape = true) {
$Return = array();
- while ($Row = mysqli_fetch_array($this->QueryID,$Type)) {
+ while ($Row = mysqli_fetch_array($this->QueryID, $Type)) {
if ($Escape !== false) {
$Row = Misc::display_array($Row, $Escape);
}
diff --git a/classes/permissions.class.php b/classes/permissions.class.php
index f8024779..3d312a47 100644
--- a/classes/permissions.class.php
+++ b/classes/permissions.class.php
@@ -6,13 +6,14 @@ class Permissions {
* @param string PermissionName
* @param string $MinClass Return false if the user's class level is below this.
*/
- public static function check_perms($PermissionName,$MinClass = 0) {
+ public static function check_perms($PermissionName, $MinClass = 0) {
global $LoggedUser;
return (
isset($LoggedUser['Permissions'][$PermissionName])
&& $LoggedUser['Permissions'][$PermissionName]
- && ($LoggedUser['Class']>=$MinClass
- || $LoggedUser['EffectiveClass']>=$MinClass)) ? true : false;
+ && ($LoggedUser['Class'] >= $MinClass
+ || $LoggedUser['EffectiveClass'] >= $MinClass)
+ ) ? true : false;
}
/**
diff --git a/classes/proxies.class.php b/classes/proxies.class.php
index af3206b0..942e20b6 100644
--- a/classes/proxies.class.php
+++ b/classes/proxies.class.php
@@ -1,7 +1,7 @@
//Useful: http://www.robtex.com/cnet/
$AllowedProxies = array(
- //Opera Turbo (may include opera owned IPs that aren't used for Turbo, but shouldn't run much risk of exploitation)
+ //Opera Turbo (may include Opera-owned IP addresses that aren't used for Turbo, but shouldn't run much risk of exploitation)
'64.255.180.*', //Norway
'64.255.164.*', //Norway
'80.239.242.*', //Poland
@@ -15,16 +15,16 @@
function proxyCheck($IP) {
global $AllowedProxies;
- for ($i=0,$il=count($AllowedProxies);$i<$il;++$i) {
+ for ($i = 0, $il = count($AllowedProxies); $i < $il; ++$i) {
//based on the wildcard principle it should never be shorter
if (strlen($IP) < strlen($AllowedProxies[$i])) {
continue;
}
//since we're matching bit for bit iterating from the start
- for ($j=0,$jl=strlen($IP);$j<$jl;++$j) {
+ for ($j = 0, $jl = strlen($IP); $j < $jl; ++$j) {
//completed iteration and no inequality
- if ($j == $jl-1 && $IP[$j] === $AllowedProxies[$i][$j]) {
+ if ($j == $jl - 1 && $IP[$j] === $AllowedProxies[$i][$j]) {
return true;
}
diff --git a/classes/templates.class.php b/classes/templates.class.php
index 1c9f5f50..2ae75ef7 100644
--- a/classes/templates.class.php
+++ b/classes/templates.class.php
@@ -2,7 +2,7 @@
// Example :
// $TPL = new TEMPLATE;
// $TPL->open('inv.tpl');
-// $TPL->set('ADDRESS1',$TPL->str_align(57,$UADDRESS1,'l',' '));
+// $TPL->set('ADDRESS1', $TPL->str_align(57, $UADDRESS1, 'l', ' '));
// $TPL->get();
class TEMPLATE {
diff --git a/classes/text.class.php b/classes/text.class.php
index a385af0f..8cfcaf8c 100644
--- a/classes/text.class.php
+++ b/classes/text.class.php
@@ -132,7 +132,7 @@ public function full_format ($Str, $OutputTOC = true, $Min = 3) {
$Str = preg_replace('/'.$URLPrefix.'\s+/i', '$1', $Str);
$Str = preg_replace('/(?TOC) {
@@ -647,11 +647,11 @@ private function to_html ($Array) {
$Group = $Groups['matches'][$Matches[2]];
$Str .= Artists::display_artists($Group['ExtendedArtists']).''.$Group['Name'].'';
} else {
- $Str .= '[torrent]'.str_replace('[inlineurl]','',$Block['Val']).'[/torrent]';
+ $Str .= '[torrent]'.str_replace('[inlineurl]', '', $Block['Val']).'[/torrent]';
}
}
} else {
- $Str .= '[torrent]'.str_replace('[inlineurl]','',$Block['Val']).'[/torrent]';
+ $Str .= '[torrent]'.str_replace('[inlineurl]', '', $Block['Val']).'[/torrent]';
}
break;
case 'wiki':
diff --git a/classes/tools.class.php b/classes/tools.class.php
index 7ff0d8f3..00e89970 100644
--- a/classes/tools.class.php
+++ b/classes/tools.class.php
@@ -169,8 +169,8 @@ public static function disable_users($UserIDs, $AdminComment, $BanReason = 1) {
i.BanDate='".sqltime()."',
i.BanReason='$BanReason',
i.RatioWatchDownload=".($BanReason == 2 ? 'm.Downloaded' : "'0'")."
- WHERE m.ID IN(".implode(',',$UserIDs).") ");
- $Cache->decrement('stats_user_count',$DB->affected_rows());
+ WHERE m.ID IN(".implode(',', $UserIDs).') ');
+ $Cache->decrement('stats_user_count', $DB->affected_rows());
foreach ($UserIDs as $UserID) {
$Cache->delete_value('enabled_'.$UserID);
$Cache->delete_value('user_info_'.$UserID);
@@ -197,7 +197,7 @@ public static function disable_users($UserIDs, $AdminComment, $BanReason = 1) {
$DB->query("
SELECT torrent_pass
FROM users_main
- WHERE ID in (".implode(', ',$UserIDs).')');
+ WHERE ID in (".implode(', ', $UserIDs).')');
$PassKeys = $DB->collect('torrent_pass');
$Concat = '';
foreach ($PassKeys as $PassKey) {
diff --git a/classes/torrent.class.php b/classes/torrent.class.php
index 55ba4eda..2f66a081 100644
--- a/classes/torrent.class.php
+++ b/classes/torrent.class.php
@@ -277,7 +277,7 @@ function file_list() {
$FileSize = $File->Val['length'];
$TotalSize += $FileSize;
- $FileName = ltrim(implode('/',$File->Val[$PathKey]->Val), '/');
+ $FileName = ltrim(implode('/', $File->Val[$PathKey]->Val), '/');
$FileSizes[] = $FileSize;
$FileNames[] = $FileName;
}
diff --git a/classes/torrent_32bit.class.php b/classes/torrent_32bit.class.php
index d36c7d62..2af39f47 100644
--- a/classes/torrent_32bit.class.php
+++ b/classes/torrent_32bit.class.php
@@ -266,7 +266,7 @@ function file_list() {
$FileSize = substr($File->Val['length'], 7);
$TotalSize += $FileSize;
- $FileName = ltrim(implode('/',$File->Val[$PathKey]->Val), '/');
+ $FileName = ltrim(implode('/', $File->Val[$PathKey]->Val), '/');
$FileSizes[] = $FileSize;
$FileNames[] = $FileName;
}
diff --git a/classes/torrents.class.php b/classes/torrents.class.php
index 8f4f5523..5b141457 100644
--- a/classes/torrents.class.php
+++ b/classes/torrents.class.php
@@ -213,7 +213,7 @@ public static function torrent_properties(&$Torrent, &$Flags) {
* @param boolean $Hidden Currently does fuck all. TODO: Fix that.
*/
public static function write_group_log($GroupID, $TorrentID, $UserID, $Message, $Hidden) {
- global $DB,$Time;
+ global $DB, $Time;
$DB->query("
INSERT INTO group_log
(GroupID, TorrentID, UserID, Info, Time, Hidden)
@@ -371,7 +371,7 @@ public static function delete_group($GroupID) {
$DB->query("
UPDATE collages
SET NumTorrents=NumTorrents-1
- WHERE ID IN (".implode(', ',$CollageIDs).')');
+ WHERE ID IN (".implode(', ', $CollageIDs).')');
$DB->query("
DELETE FROM collages_torrents
WHERE GroupID='$GroupID'");
@@ -659,7 +659,7 @@ public static function torrent_info($Data, $ShowMedia = false, $ShowEdition = fa
$EditionInfo = array();
if (!empty($Data['RemasterYear'])) { $EditionInfo[] = $Data['RemasterYear']; }
if (!empty($Data['RemasterTitle'])) { $EditionInfo[] = $Data['RemasterTitle']; }
- if (count($EditionInfo)) { $Info[] = implode(' ',$EditionInfo); }
+ if (count($EditionInfo)) { $Info[] = implode(' ', $EditionInfo); }
}
if ($Data['IsSnatched']) { $Info[] = Format::torrent_label('Snatched!'); }
if ($Data['FreeTorrent'] == '1') { $Info[] = Format::torrent_label('Freeleech!'); }
diff --git a/classes/users.class.php b/classes/users.class.php
index 3f20236b..37a3df76 100644
--- a/classes/users.class.php
+++ b/classes/users.class.php
@@ -184,13 +184,13 @@ public static function user_heavy_info($UserID) {
foreach ($PermIDs AS $PermID) {
$Perms = Permissions::get_permissions($PermID);
if (!empty($Perms['PermittedForums'])) {
- $PermittedForums = array_merge($PermittedForums, array_map('trim', explode(',',$Perms['PermittedForums'])));
+ $PermittedForums = array_merge($PermittedForums, array_map('trim', explode(',', $Perms['PermittedForums'])));
}
}
$Perms = Permissions::get_permissions($HeavyInfo['PermissionID']);
unset($HeavyInfo['PermissionID']);
if (!empty($Perms['PermittedForums'])) {
- $PermittedForums = array_merge($PermittedForums, array_map('trim', explode(',',$Perms['PermittedForums'])));
+ $PermittedForums = array_merge($PermittedForums, array_map('trim', explode(',', $Perms['PermittedForums'])));
}
if (!empty($PermittedForums) || !empty($RestrictedForums)) {
diff --git a/classes/util.php b/classes/util.php
index 659b4167..263ef91c 100644
--- a/classes/util.php
+++ b/classes/util.php
@@ -35,8 +35,8 @@ function display_str($Str) {
}
if ($Str != '' && !is_number($Str)) {
$Str = Format::make_utf8($Str);
- $Str = mb_convert_encoding($Str,"HTML-ENTITIES","UTF-8");
- $Str = preg_replace("/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,5};)/m","&",$Str);
+ $Str = mb_convert_encoding($Str, 'HTML-ENTITIES', 'UTF-8');
+ $Str = preg_replace("/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,5};)/m", '&', $Str);
$Replace = array(
"'",'"',"<",">",
diff --git a/classes/validate.class.php b/classes/validate.class.php
index 9790dbd2..1e907280 100644
--- a/classes/validate.class.php
+++ b/classes/validate.class.php
@@ -6,9 +6,9 @@
//-----------------------------------*/
class VALIDATE {
- var $Fields=array();
+ var $Fields = array();
- function SetFields($FieldName,$Required,$FieldType,$ErrorMessage,$Options=array()) {
+ function SetFields($FieldName, $Required, $FieldType, $ErrorMessage, $Options = array()) {
$this->Fields[$FieldName]['Type'] = strtolower($FieldType);
$this->Fields[$FieldName]['Required'] = $Required;
$this->Fields[$FieldName]['ErrorMessage'] = $ErrorMessage;
@@ -153,7 +153,7 @@ function ValidateForm($ValidateArray) {
}
} elseif ($Field['Type'] == 'compare') {
- if ($ValidateArray[$Field['CompareField']]!=$ValidateVar) {
+ if ($ValidateArray[$Field['CompareField']] != $ValidateVar) {
return $Field['ErrorMessage'];
}
diff --git a/robots.txt b/robots.txt
index e7018c50..d6645aba 100644
--- a/robots.txt
+++ b/robots.txt
@@ -2,9 +2,4 @@ User-agent: *
Allow: /index.php
Allow: /login.php
Allow: /register.php
-#