From dc2328ef6591d503dad1455451e41aef454f5f9e Mon Sep 17 00:00:00 2001 From: Git Date: Thu, 27 Feb 2014 08:00:30 +0000 Subject: [PATCH] Empty commit --- classes/collages.class.php | 2 +- classes/debug.class.php | 2 +- classes/donations.class.php | 8 +- classes/feed.class.php | 12 +-- classes/misc.class.php | 88 +++++++++++---------- classes/subscriptions.class.php | 5 +- docs/CHANGES.txt | 6 ++ sections/ajax/send_recommendation.php | 2 +- sections/donate/donate_gpal.php | 6 +- sections/donate/ipn.php | 2 +- sections/error/index.php | 2 +- sections/login/index.php | 2 - sections/questions/take_answer_question.php | 2 +- sections/reportsv2/ajax_new_report.php | 4 +- sections/reportsv2/ajax_take_pm.php | 6 +- sections/reportsv2/static.php | 4 +- sections/reportsv2/takereport.php | 2 +- sections/reportsv2/views.php | 12 +-- sections/requests/new_edit.php | 4 +- sections/requests/request.php | 2 +- sections/requests/take_delete.php | 2 +- sections/requests/take_fill.php | 2 +- sections/requests/take_new_edit.php | 4 +- sections/requests/take_unfill.php | 9 ++- sections/schedule/index.php | 16 ++-- sections/tools/managers/recommend_list.php | 2 +- sections/top10/torrents.php | 6 +- sections/upload/insert_extra_torrents.php | 4 +- sections/upload/upload_handle.php | 4 +- sections/user/edit.php | 2 +- sections/user/search.php | 6 +- sections/userhistory/email_history.php | 2 +- 32 files changed, 120 insertions(+), 112 deletions(-) diff --git a/classes/collages.class.php b/classes/collages.class.php index 5080ecc3..fb9b1523 100644 --- a/classes/collages.class.php +++ b/classes/collages.class.php @@ -35,7 +35,7 @@ public static function create_personal_collage() { die(); } $NameStr = db_string(G::$LoggedUser['Username'] . "'s personal collage" . ($CollageCount > 0 ? ' no. ' . ($CollageCount + 1) : '')); - $Description = db_string('Personal collage for ' . G::$LoggedUser['Username'] . '. The first 5 albums will appear on his or her [url=https://' . SSL_SITE_URL . '/user.php?id= ' . G::$LoggedUser['ID'] . ']profile[/url].'); + $Description = db_string('Personal collage for ' . G::$LoggedUser['Username'] . '. The first 5 albums will appear on his or her [url=' . site_url() . 'user.php?id= ' . G::$LoggedUser['ID'] . ']profile[/url].'); G::$DB->query(" INSERT INTO collages (Name, Description, CategoryID, UserID) diff --git a/classes/debug.class.php b/classes/debug.class.php index 410623b9..9e60b886 100644 --- a/classes/debug.class.php +++ b/classes/debug.class.php @@ -98,7 +98,7 @@ public function analysis($Message, $Report = '', $Time = 43200) { ), $Time ); - send_irc('PRIVMSG '.LAB_CHAN." :{$Message} $Document https://".SSL_SITE_URL.'/tools.php?action=analysis&case='.$Identifier.' https://'.SSL_SITE_URL.$_SERVER['REQUEST_URI']); + send_irc('PRIVMSG '.LAB_CHAN." :{$Message} $Document ".site_url()."tools.php?action=analysis&case=$Identifier ".site_url().$_SERVER['REQUEST_URI']); } public function get_cpu_time() { diff --git a/classes/donations.class.php b/classes/donations.class.php index f3dbbfd3..cbe9885b 100644 --- a/classes/donations.class.php +++ b/classes/donations.class.php @@ -766,11 +766,11 @@ private static function get_pm_body($Source, $Currency, $DonationAmount, $Receiv '.SITE_NAME.' Staff -[align=center][If you have any questions or concerns, please [url=https://'.SSL_SITE_URL.'/staffpm.php]send a Staff PM[/url].]'; +[align=center][If you have any questions or concerns, please [url='.site_url().'staffpm.php]send a Staff PM[/url].]'; } private static function get_special_rank_one_pm() { - return 'Congratulations on reaching [url=https://'.SSL_SITE_URL.'/forums.php?action=viewthread&threadid=178640&postid=4839790#post4839790]Special Rank #1[/url]! You\'ve been awarded [b]one user pick[/b]! This user pick will be featured on the '.SITE_NAME.' front page during an upcoming event. After you submit your pick, there is no guarantee as to how long it will take before your pick is featured. Picks will be featured on a first-submitted, first-served basis. Please abide by the following guidelines when making your selection: + return 'Congratulations on reaching [url='.site_url().'forums.php?action=viewthread&threadid=178640&postid=4839790#post4839790]Special Rank #1[/url]! You\'ve been awarded [b]one user pick[/b]! This user pick will be featured on the '.SITE_NAME.' front page during an upcoming event. After you submit your pick, there is no guarantee as to how long it will take before your pick is featured. Picks will be featured on a first-submitted, first-served basis. Please abide by the following guidelines when making your selection: [*]Pick something that hasn\'t been chosen. You can tell if a pick has been used previously by looking at the collages it\'s in. [*]Complete the enclosed form carefully and completely. @@ -915,7 +915,7 @@ private static function get_special_rank_one_pm() { } private static function get_special_rank_two_pm() { - return 'Congratulations on reaching [url=https://'.SSL_SITE_URL.'/forums.php?action=viewthread&threadid=178640&postid=4839790#post4839790]Special Rank #2[/url]! You\'ve been awarded [b]double avatar functionality[/b]! To set a second avatar, please enter a URL leading to a valid image in the new field which has been unlocked in your [b]Personal Settings[/b]. Any avatar you choose must abide by normal avatar rules. When running your cursor over your avatar, it will flip to the alternate choice you\'ve established. Other users will also be able to view both of your avatars using this method. + return 'Congratulations on reaching [url='.site_url().'forums.php?action=viewthread&threadid=178640&postid=4839790#post4839790]Special Rank #2[/url]! You\'ve been awarded [b]double avatar functionality[/b]! To set a second avatar, please enter a URL leading to a valid image in the new field which has been unlocked in your [b]Personal Settings[/b]. Any avatar you choose must abide by normal avatar rules. When running your cursor over your avatar, it will flip to the alternate choice you\'ve established. Other users will also be able to view both of your avatars using this method. At this time, we\'d like to thank you for your continued support of the site. The fact that you\'ve reached this milestone is testament to your belief in '.SITE_NAME.' as a project. It\'s dedicated users like you that keep us alive. Have fun with the new toy. @@ -925,7 +925,7 @@ private static function get_special_rank_two_pm() { } private static function get_special_rank_three_pm() { - return 'Congratulations on reaching [url=https://'.SSL_SITE_URL.'/forums.php?action=viewthread&threadid=178640&postid=4839790#post4839790]Special Rank #3[/url]! You\'ve been awarded [b]Diamond Rank[/b]! Diamond Rank grants you the benefits associated with every Donor Rank up to and including Gold ([url=https://'.SSL_SITE_URL.'/forums.php?action=viewthread&threadid=178640&postid=4839789#post4839789]Donor Rank #5[/url]). But unlike Donor Rank #5 - because Diamond Rank is a Special Rank - it will never expire. + return 'Congratulations on reaching [url='.site_url().'forums.php?action=viewthread&threadid=178640&postid=4839790#post4839790]Special Rank #3[/url]! You\'ve been awarded [b]Diamond Rank[/b]! Diamond Rank grants you the benefits associated with every Donor Rank up to and including Gold ([url='.site_url().'forums.php?action=viewthread&threadid=178640&postid=4839789#post4839789]Donor Rank #5[/url]). But unlike Donor Rank #5 - because Diamond Rank is a Special Rank - it will never expire. At this time, we\'d like to thank you for your continued support of the site. The fact that you\'ve reached this milestone is testament to your belief in '.SITE_NAME.' as a project. It\'s dedicated users like you that keep us alive. Consider yourself one of our top supporters! diff --git a/classes/feed.class.php b/classes/feed.class.php index f27c72f9..a3b8de56 100644 --- a/classes/feed.class.php +++ b/classes/feed.class.php @@ -14,9 +14,9 @@ function close_feed() { } function channel($Title, $Description, $Section = '') { - $Site = $this->UseSSL ? 'https://'.SSL_SITE_URL : 'http://'.NONSSL_SITE_URL; + $Site = $this->UseSSL ? site_url() : site_url(false); echo "\t\t$Title :: ". SITE_NAME. "\n"; - echo "\t\t$Site/$Section\n"; + echo "\t\t$Site$Section\n"; echo "\t\t$Description\n"; echo "\t\ten-us\n"; echo "\t\t". date('r'). "\n"; @@ -30,15 +30,15 @@ function item($Title, $Description, $Page, $Creator, $Comments = '', $Category = } else { $Date = date('r', strtotime($Date)); } - $Site = ($this->UseSSL ? 'https://'.SSL_SITE_URL : 'http://'.NONSSL_SITE_URL); + $Site = $this->UseSSL ? site_url() : site_url(false); $Item = "\t\t\n"; $Item .= "\t\t\t<![CDATA[$Title]]>\n"; $Item .= "\t\t\t\n"; $Item .= "\t\t\t$Date\n"; - $Item .= "\t\t\t$Site/$Page\n"; - $Item .= "\t\t\t$Site/$Page\n"; + $Item .= "\t\t\t$Site$Page\n"; + $Item .= "\t\t\t$Site$Page\n"; if ($Comments != '') { - $Item .= "\t\t\t$Site/$Comments\n"; + $Item .= "\t\t\t$Site$Comments\n"; } if ($Category != '') { $Item .= "\t\t\t\n"; diff --git a/classes/misc.class.php b/classes/misc.class.php index b06e5d7d..f01938b4 100644 --- a/classes/misc.class.php +++ b/classes/misc.class.php @@ -11,12 +11,12 @@ class Misc { */ public static function send_email($To, $Subject, $Body, $From = 'noreply', $ContentType = 'text/plain') { $Headers = 'MIME-Version: 1.0'."\r\n"; - $Headers.= 'Content-type: '.$ContentType.'; charset=iso-8859-1'."\r\n"; - $Headers.= 'From: '.SITE_NAME.' <'.$From.'@'.NONSSL_SITE_URL.'>'."\r\n"; - $Headers.= 'Reply-To: '.$From.'@'.NONSSL_SITE_URL."\r\n"; - $Headers.= 'X-Mailer: Project Gazelle'."\r\n"; - $Headers.= 'Message-Id: <'.Users::make_secret().'@'.NONSSL_SITE_URL.">\r\n"; - $Headers.= 'X-Priority: 3'."\r\n"; + $Headers .= 'Content-type: '.$ContentType.'; charset=iso-8859-1'."\r\n"; + $Headers .= 'From: '.SITE_NAME.' <'.$From.'@'.NONSSL_SITE_URL.'>'."\r\n"; + $Headers .= 'Reply-To: '.$From.'@'.NONSSL_SITE_URL."\r\n"; + $Headers .= 'X-Mailer: Project Gazelle'."\r\n"; + $Headers .= 'Message-Id: <'.Users::make_secret().'@'.NONSSL_SITE_URL.">\r\n"; + $Headers .= 'X-Priority: 3'."\r\n"; mail($To, $Subject, $Body, $Headers, "-f $From@".NONSSL_SITE_URL); } @@ -28,7 +28,7 @@ public static function send_email($To, $Subject, $Body, $From = 'noreply', $Cont * @return the string with all banned characters removed. */ public static function file_string($EscapeStr) { - return str_replace(array('"','*','/',':','<','>','?','\\','|'), '', $EscapeStr); + return str_replace(array('"', '*', '/', ':', '<', '>', '?', '\\', '|'), '', $EscapeStr); } @@ -79,19 +79,19 @@ public static function send_pm($ToID, $FromID, $Subject, $Body, $ConvID = '') { G::$DB->query(" UPDATE pm_conversations_users SET - InInbox='1', - UnRead='1', - ReceivedDate='".sqltime()."' + InInbox = '1', + UnRead = '1', + ReceivedDate = '".sqltime()."' WHERE UserID IN (".implode(',', $ToID).") - AND ConvID='$ConvID'"); + AND ConvID = '$ConvID'"); G::$DB->query(" UPDATE pm_conversations_users SET - InSentbox='1', - SentDate='".sqltime()."' - WHERE UserID='$FromID' - AND ConvID='$ConvID'"); + InSentbox = '1', + SentDate = '".sqltime()."' + WHERE UserID = '$FromID' + AND ConvID = '$ConvID'"); } // Now that we have a $ConvID for sure, send the message. @@ -107,10 +107,10 @@ public static function send_pm($ToID, $FromID, $Subject, $Body, $ConvID = '') { SELECT COUNT(ConvID) FROM pm_conversations_users WHERE UnRead = '1' - AND UserID='$ID' + AND UserID = '$ID' AND InInbox = '1'"); list($UnRead) = G::$DB->next_record(); - G::$Cache->cache_value('inbox_new_'.$ID, $UnRead); + G::$Cache->cache_value("inbox_new_$ID", $UnRead); } G::$DB->query(" @@ -123,10 +123,10 @@ public static function send_pm($ToID, $FromID, $Subject, $Body, $ConvID = '') { SELECT COUNT(ConvID) FROM pm_conversations_users WHERE UnRead = '1' - AND UserID='$ID' + AND UserID = '$ID' AND InInbox = '1'"); list($UnRead) = G::$DB->next_record(); - G::$Cache->cache_value('inbox_new_'.$ID, $UnRead); + G::$Cache->cache_value("inbox_new_$ID", $UnRead); NotificationsManager::send_push($ID, "Message from $SenderName, Subject: $UnescapedSubject", $UnescapedBody, site_url() . 'inbox.php', NotificationsManager::INBOX); } @@ -235,8 +235,12 @@ public static function create_thread($ForumID, $AuthorID, $Title, $PostBody) { $Part1 = array(); $Part3 = $Forum; } - if (is_null($Part1)) { $Part1 = array(); } - if (is_null($Part3)) { $Part3 = array(); } + if (is_null($Part1)) { + $Part1 = array(); + } + if (is_null($Part3)) { + $Part3 = array(); + } $Forum = $Part1 + $Part2 + $Part3; G::$Cache->cache_value("forums_$ForumID", array($Forum, '', 0, $Stickies), 0); } @@ -244,15 +248,15 @@ public static function create_thread($ForumID, $AuthorID, $Title, $PostBody) { //Update the forum root G::$Cache->begin_transaction('forums_list'); $UpdateArray = array( - 'NumPosts'=>'+1', - 'NumTopics'=>'+1', - 'LastPostID'=>$PostID, - 'LastPostAuthorID'=>$AuthorID, - 'LastPostTopicID'=>$TopicID, - 'LastPostTime'=>sqltime(), - 'Title'=>$Title, - 'IsLocked'=>$ThreadInfo['IsLocked'], - 'IsSticky'=>$ThreadInfo['IsSticky'] + 'NumPosts' => '+1', + 'NumTopics' => '+1', + 'LastPostID' => $PostID, + 'LastPostAuthorID' => $AuthorID, + 'LastPostTopicID' => $TopicID, + 'LastPostTime' => sqltime(), + 'Title' => $Title, + 'IsLocked' => $ThreadInfo['IsLocked'], + 'IsSticky' => $ThreadInfo['IsSticky'] ); $UpdateArray['NumTopics'] = '+1'; @@ -263,19 +267,19 @@ public static function create_thread($ForumID, $AuthorID, $Title, $PostBody) { $CatalogueID = floor((POSTS_PER_PAGE * ceil($Posts / POSTS_PER_PAGE) - POSTS_PER_PAGE) / THREAD_CATALOGUE); G::$Cache->begin_transaction('thread_'.$TopicID.'_catalogue_'.$CatalogueID); $Post = array( - 'ID'=>$PostID, - 'AuthorID'=>G::$LoggedUser['ID'], - 'AddedTime'=>sqltime(), - 'Body'=>$PostBody, - 'EditedUserID'=>0, - 'EditedTime'=>'0000-00-00 00:00:00', - 'Username'=>'' + 'ID' => $PostID, + 'AuthorID' => G::$LoggedUser['ID'], + 'AddedTime' => sqltime(), + 'Body' => $PostBody, + 'EditedUserID' => 0, + 'EditedTime' => '0000-00-00 00:00:00', + 'Username' => '' ); G::$Cache->insert('', $Post); G::$Cache->commit_transaction(0); G::$Cache->begin_transaction('thread_'.$TopicID.'_info'); - G::$Cache->update_row(false, array('Posts'=>'+1', 'LastPostAuthorID'=>$AuthorID)); + G::$Cache->update_row(false, array('Posts' => '+1', 'LastPostAuthorID' => $AuthorID)); G::$Cache->commit_transaction(0); G::$DB->set_query_id($QueryID); @@ -296,11 +300,11 @@ public static function ends_with($Haystack, $Needle) { /** - * If the preix of $Haystack is $Needle + * If the prefix of $Haystack is $Needle * * @param string $Haystack String to search in * @param string $Needle String to search for - * @return boolean True if $Needle is a preix of $Haystack + * @return boolean True if $Needle is a prefix of $Haystack */ public static function starts_with($Haystack, $Needle) { return strpos($Haystack, $Needle) === 0; @@ -394,7 +398,7 @@ public static function get_tags($TagNames) { /** - * Gets the alias of the tag, if there is no alias silently returns the original tag. + * Gets the alias of the tag; if there is no alias, silently returns the original tag. * * @param string $BadTag the tag we want to alias * @return string The aliased tag. @@ -497,7 +501,7 @@ public static function search_joined_string($Haystack, $Needle, $Separator = '|' } /** - * Check for a : in the beginning of a torrent meta data string + * Check for a ":" in the beginning of a torrent meta data string * to see if it's stored in the old base64-encoded format * * @param string $Torrent the torrent data diff --git a/classes/subscriptions.class.php b/classes/subscriptions.class.php index d8532af6..1ab71a98 100644 --- a/classes/subscriptions.class.php +++ b/classes/subscriptions.class.php @@ -59,11 +59,10 @@ public static function quote_notify($Body, $PostID, $Page, $PageID) { VALUES ('$UserID', '$QuoterID', '$Page', '$PageID', '$PostID', '" . sqltime() . "')"); G::$Cache->delete_value("notify_quoted_$UserID"); - $URL = 'https://'.SSL_SITE_URL.'/'; if ($Page == 'forums') { - $URL .= "forums.php?action=viewthread&postid=$PostID"; + $URL = site_url() . "forums.php?action=viewthread&postid=$PostID"; } else { - $URL .= "comments.php?action=jump&postid=$PostID"; + $URL = site_url() . "comments.php?action=jump&postid=$PostID"; } NotificationsManager::send_push($UserID, 'New Quote!', 'Quoted by ' . G::$LoggedUser['Username'] . " $URL", $URL, NotificationsManager::QUOTES); } diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt index cf291e25..975e9f07 100644 --- a/docs/CHANGES.txt +++ b/docs/CHANGES.txt @@ -1,5 +1,11 @@ CHANGE LOG +2014-02-27 by alderaan +Increase the size of the Reports v2 "report comment" text box from 45 to 70 + +2014-02-27 by alderaan +Replace nearly every instance of {,NON}SSL_SITE_URL with the site_url() function + 2014-02-19 by alderaan Reduce width of the main table in the Tag Aliases manager diff --git a/sections/ajax/send_recommendation.php b/sections/ajax/send_recommendation.php index 5e394dd4..13d5642d 100644 --- a/sections/ajax/send_recommendation.php +++ b/sections/ajax/send_recommendation.php @@ -55,7 +55,7 @@ } list($Name) = $DB->next_record(); $Subject = $LoggedUser['Username'] . " recommended you $Article $Type!"; -$Body = $LoggedUser['Username'] . " recommended you the $Type [url=https://".SSL_SITE_URL."/$Link]$Name".'[/url].'; +$Body = $LoggedUser['Username'] . " recommended you the $Type [url=".site_url()."$Link]$Name".'[/url].'; if (!empty($Note)) { $Body = "$Body\n\n$Note"; } diff --git a/sections/donate/donate_gpal.php b/sections/donate/donate_gpal.php index 5e336971..097846d2 100644 --- a/sections/donate/donate_gpal.php +++ b/sections/donate/donate_gpal.php @@ -58,9 +58,9 @@ - - - + + + diff --git a/sections/donate/ipn.php b/sections/donate/ipn.php index 5be4193b..75f7aa0f 100644 --- a/sections/donate/ipn.php +++ b/sections/donate/ipn.php @@ -77,7 +77,7 @@ Misc::send_pm($_POST['custom'], 0, 'Thank you for your donation', 'Your donation from '.$_POST['payer_email'].' of '.$_POST['mc_gross'].' '.PAYPAL_CURRENCY.' has been successfully processed. Unfortunately however this donation was less than the specified minimum donation of '.PAYPAL_MINIMUM.' '.PAYPAL_CURRENCY.' and while we are grateful, no special privileges have been awarded to you.'); } else { //Failed pending donation - $Message = "User https://".SSL_SITE_URL."/user.php?id=".$_POST['custom']." had donation of $TotalDonated ".PAYPAL_CURRENCY." at $DonationTime UTC from ".$_POST['payer_email'].' returned.'; + $Message = "User ".site_url()."user.php?id=".$_POST['custom']." had donation of $TotalDonated ".PAYPAL_CURRENCY." at $DonationTime UTC from ".$_POST['payer_email'].' returned.'; $DB->query(' SELECT SUM(Amount), MIN(Time) FROM donations diff --git a/sections/error/index.php b/sections/error/index.php index 988f1a5b..b55447fa 100644 --- a/sections/error/index.php +++ b/sections/error/index.php @@ -2,7 +2,7 @@ function notify ($Channel, $Message) { global $LoggedUser; - send_irc("PRIVMSG ".$Channel." :".$Message." error by ".(!empty($LoggedUser['ID']) ? "https://".SSL_SITE_URL."/user.php?id=".$LoggedUser['ID'] ." (".$LoggedUser['Username'].")" : $_SERVER['REMOTE_ADDR']." (".Tools::geoip($_SERVER['REMOTE_ADDR']).")")." accessing https://".SSL_SITE_URL."".$_SERVER['REQUEST_URI'].(!empty($_SERVER['HTTP_REFERER'])? " from ".$_SERVER['HTTP_REFERER'] : '')); + send_irc("PRIVMSG ".$Channel." :".$Message." error by ".(!empty($LoggedUser['ID']) ? site_url()."user.php?id=".$LoggedUser['ID'] ." (".$LoggedUser['Username'].")" : $_SERVER['REMOTE_ADDR']." (".Tools::geoip($_SERVER['REMOTE_ADDR']).")")." accessing https://".SSL_SITE_URL."".$_SERVER['REQUEST_URI'].(!empty($_SERVER['HTTP_REFERER'])? " from ".$_SERVER['HTTP_REFERER'] : '')); } $Errors = array('403','404','413','504'); diff --git a/sections/login/index.php b/sections/login/index.php index 72fef109..78821168 100644 --- a/sections/login/index.php +++ b/sections/login/index.php @@ -154,8 +154,6 @@ SET Active = 0 WHERE UserID = '$UserID' AND Active = 1"); - - } else { $Err = 'There is no user with that email address.'; } diff --git a/sections/questions/take_answer_question.php b/sections/questions/take_answer_question.php index e42e05bd..7e4b5bde 100644 --- a/sections/questions/take_answer_question.php +++ b/sections/questions/take_answer_question.php @@ -32,7 +32,7 @@ FROM user_questions WHERE ID = '$ID'"); list($ToID) = $DB->next_record(); - Misc::send_pm($ToID, 0, "Your question has been answered", "One of your questions has been answered! View the response [url=https://". SSL_SITE_URL . "/questions.php?action=view_answers&userid=$UserID#question$ID]here[/url]."); + Misc::send_pm($ToID, 0, "Your question has been answered", "One of your questions has been answered! View the response [url=". site_url() . "questions.php?action=view_answers&userid=$UserID#question$ID]here[/url]."); } else { error("You have already answered this question"); } diff --git a/sections/reportsv2/ajax_new_report.php b/sections/reportsv2/ajax_new_report.php index 72de4302..07220427 100644 --- a/sections/reportsv2/ajax_new_report.php +++ b/sections/reportsv2/ajax_new_report.php @@ -328,7 +328,7 @@ Report comment: - + @@ -397,7 +397,7 @@ $Extras = explode(' ', $ExtraIDs); $Value = ''; foreach ($Extras as $ExtraID) { - $Value .= 'https://'.SSL_SITE_URL."/torrents.php?torrentid=$ExtraID "; + $Value .= site_url()."torrents.php?torrentid=$ExtraID "; } echo ' value="'.trim($Value).'"'; } ?> /> diff --git a/sections/reportsv2/ajax_take_pm.php b/sections/reportsv2/ajax_take_pm.php index 98f5dd3c..48320d42 100644 --- a/sections/reportsv2/ajax_take_pm.php +++ b/sections/reportsv2/ajax_take_pm.php @@ -45,13 +45,13 @@ if ($Recipient == 'Uploader') { $ToID = $_POST['uploaderid']; if ($Report) { - $Message = "You uploaded [url=https://".SSL_SITE_URL."/torrents.php?torrentid=$TorrentID]the above torrent[/url]. It has been reported for the reason: ".$ReportType['title']."\n\n$Message"; + $Message = "You uploaded [url=".site_url()."torrents.php?torrentid=$TorrentID]the above torrent[/url]. It has been reported for the reason: ".$ReportType['title']."\n\n$Message"; } else { - $Message = "I am PMing you as you are the uploader of [url=https://".SSL_SITE_URL."/torrents.php?torrentid=$TorrentID]the above torrent[/url].\n\n$Message"; + $Message = "I am PMing you as you are the uploader of [url=".site_url()."torrents.php?torrentid=$TorrentID]the above torrent[/url].\n\n$Message"; } } elseif ($Recipient == 'Reporter') { $ToID = $_POST['reporterid']; - $Message = "You reported [url=https://".SSL_SITE_URL."/torrents.php?torrentid=$TorrentID]the above torrent[/url] for the reason ".$ReportType['title'].":\n[quote]".$_POST['report_reason']."[/quote]\n$Message"; + $Message = "You reported [url=".site_url()."torrents.php?torrentid=$TorrentID]the above torrent[/url] for the reason ".$ReportType['title'].":\n[quote]".$_POST['report_reason']."[/quote]\n$Message"; } else { $Err = "Something went horribly wrong"; } diff --git a/sections/reportsv2/static.php b/sections/reportsv2/static.php index 3d5d4b7c..eb3b9471 100644 --- a/sections/reportsv2/static.php +++ b/sections/reportsv2/static.php @@ -517,7 +517,7 @@ Report comment: - + @@ -586,7 +586,7 @@ $Extras = explode(' ', $ExtraIDs); $Value = ''; foreach ($Extras as $ExtraID) { - $Value .= 'https://'.SSL_SITE_URL."/torrents.php?torrentid=$ExtraID "; + $Value .= site_url()."torrents.php?torrentid=$ExtraID "; } echo 'value="'.trim($Value).'"'; } ?> diff --git a/sections/reportsv2/takereport.php b/sections/reportsv2/takereport.php index 30f6731c..22b8e914 100644 --- a/sections/reportsv2/takereport.php +++ b/sections/reportsv2/takereport.php @@ -54,7 +54,7 @@ $Err = "The extra permalinks you gave included the link to the torrent you're reporting!"; } } else { - $Err = 'The permalink was incorrect. It should look like https://'.SSL_SITE_URL.'/torrents.php?torrentid=12345'; + $Err = 'The permalink was incorrect. It should look like '.site_url().'torrents.php?torrentid=12345'; } } else { $ExtraIDs = ''; diff --git a/sections/reportsv2/views.php b/sections/reportsv2/views.php index 66ee2661..06a8ab6b 100644 --- a/sections/reportsv2/views.php +++ b/sections/reportsv2/views.php @@ -179,7 +179,7 @@ Reports of torrents with ID = 1
  • - https:///reportsv2.php?view=torrent&id=1 + reportsv2.php?view=torrent&id=1
  • By group ID of torrent reported: @@ -188,7 +188,7 @@ Reports of torrents within the group with ID = 1
  • - https:///reportsv2.php?view=group&id=1 + reportsv2.php?view=group&id=1
  • By report ID: @@ -197,7 +197,7 @@ The report with ID = 1
  • - https:///reportsv2.php?view=report&id=1 + reportsv2.php?view=report&id=1
  • By reporter ID: @@ -206,7 +206,7 @@ Reports created by
  • - https:///reportsv2.php?view=reporter&id= + reportsv2.php?view=reporter&id=
  • By uploader ID: @@ -215,7 +215,7 @@ Reports for torrents uploaded by
  • - https:///reportsv2.php?view=uploader&id= + reportsv2.php?view=uploader&id=
  • By resolver ID: @@ -224,7 +224,7 @@ Reports for torrents resolved by
  • - https:///reportsv2.php?view=resolver&id= + reportsv2.php?view=resolver&id=
  • For browsing anything more complicated than these, use the search feature. diff --git a/sections/requests/new_edit.php b/sections/requests/new_edit.php index 49ae3607..816f9e99 100644 --- a/sections/requests/new_edit.php +++ b/sections/requests/new_edit.php @@ -351,7 +351,7 @@ Torrent group - https:///torrents.php?id=
    + torrents.php?id=
    If this request matches a torrent group already existing on the site, please indicate that here. @@ -359,7 +359,7 @@ Torrent group - https:///torrents.php?id=
    + torrents.php?id=
    This request associated with the above torrent group. If this is incorrect, please report this request so that staff can fix it. diff --git a/sections/requests/request.php b/sections/requests/request.php index 9bed8c32..311bff1c 100644 --- a/sections/requests/request.php +++ b/sections/requests/request.php @@ -417,7 +417,7 @@ />
    - Should be the permalink (PL) to the torrent (e.g. https:///torrents.php?torrentid=xxxx). + Should be the permalink (PL) to the torrent (e.g. torrents.php?torrentid=xxxx).
    diff --git a/sections/requests/take_delete.php b/sections/requests/take_delete.php index 7bb6cb40..55270395 100644 --- a/sections/requests/take_delete.php +++ b/sections/requests/take_delete.php @@ -62,7 +62,7 @@ ($RequestID)"); if ($UserID != $LoggedUser['ID']) { - Misc::send_pm($UserID, 0, 'A request you created has been deleted', "The request \"$FullName\" was deleted by [url=https://".SSL_SITE_URL.'/user.php?id='.$LoggedUser['ID'].']'.$LoggedUser['Username'].'[/url] for the reason: '.$_POST['reason']); + Misc::send_pm($UserID, 0, 'A request you created has been deleted', "The request \"$FullName\" was deleted by [url=".site_url().'user.php?id='.$LoggedUser['ID'].']'.$LoggedUser['Username'].'[/url] for the reason: '.$_POST['reason']); } Misc::write_log("Request $RequestID ($FullName) was deleted by user ".$LoggedUser['ID'].' ('.$LoggedUser['Username'].') for the reason: '.$_POST['reason']); diff --git a/sections/requests/take_fill.php b/sections/requests/take_fill.php index 2d7123dd..3a19a103 100644 --- a/sections/requests/take_fill.php +++ b/sections/requests/take_fill.php @@ -184,7 +184,7 @@ $UserIDs = $DB->to_array(); foreach ($UserIDs as $User) { list($VoterID) = $User; - Misc::send_pm($VoterID, 0, "The request \"$FullName\" has been filled", 'One of your requests — [url=https://'.SSL_SITE_URL."/requests.php?action=view&id=$RequestID]$FullName".'[/url] — has been filled. You can view it here: [url]https://'.SSL_SITE_URL."/torrents.php?torrentid=$TorrentID".'[/url]'); + Misc::send_pm($VoterID, 0, "The request \"$FullName\" has been filled", 'One of your requests — [url='.site_url()."requests.php?action=view&id=$RequestID]$FullName".'[/url] — has been filled. You can view it here: [url]'.site_url()."torrents.php?torrentid=$TorrentID".'[/url]'); } $RequestVotes = Requests::get_votes_array($RequestID); diff --git a/sections/requests/take_new_edit.php b/sections/requests/take_new_edit.php index 7845daa4..377dab7e 100644 --- a/sections/requests/take_new_edit.php +++ b/sections/requests/take_new_edit.php @@ -574,9 +574,9 @@ if ($CategoryName === 'Music') { - $Announce = "\"$Title\" - ".Artists::display_artists($ArtistForm, false, false).' https://'.SSL_SITE_URL."/requests.php?action=view&id=$RequestID - ".implode(' ', $Tags); + $Announce = "\"$Title\" - ".Artists::display_artists($ArtistForm, false, false).' '.site_url()."requests.php?action=view&id=$RequestID - ".implode(' ', $Tags); } else { - $Announce = "\"$Title\" - https://".SSL_SITE_URL."/requests.php?action=view&id=$RequestID - ".implode(' ', $Tags); + $Announce = "\"$Title\" - ".site_url()."requests.php?action=view&id=$RequestID - ".implode(' ', $Tags); } send_irc('PRIVMSG #'.SSL_SITE_URL."-requests :$Announce"); diff --git a/sections/requests/take_unfill.php b/sections/requests/take_unfill.php index cb8d3ffd..c3fda0c6 100644 --- a/sections/requests/take_unfill.php +++ b/sections/requests/take_unfill.php @@ -63,12 +63,12 @@ SET Uploaded = Uploaded - '.$RequestVotes['TotalBounty']." WHERE ID = $FillerID"); } -Misc::send_pm($FillerID, 0, 'A request you filled has been unfilled', "The request \"[url=https://".SSL_SITE_URL."/requests.php?action=view&id=$RequestID]".$FullName."[/url]\" was unfilled by [url=https://".SSL_SITE_URL.'/user.php?id='.$LoggedUser['ID'].']'.$LoggedUser['Username'].'[/url] for the reason: '.$_POST['reason']."\n\nIf you feel like this request was unjustly unfilled, please [url=https://".SSL_SITE_URL."/reports.php?action=report&type=request&id=$RequestID]report the request[/url] and explain why this request should not have been unfilled."); +Misc::send_pm($FillerID, 0, 'A request you filled has been unfilled', "The request \"[url=".site_url()."requests.php?action=view&id=$RequestID]".$FullName."[/url]\" was unfilled by [url=".site_url().'user.php?id='.$LoggedUser['ID'].']'.$LoggedUser['Username'].'[/url] for the reason: '.$_POST['reason']."\n\nIf you feel like this request was unjustly unfilled, please [url=".site_url()."reports.php?action=report&type=request&id=$RequestID]report the request[/url] and explain why this request should not have been unfilled."); $Cache->delete_value("user_stats_$FillerID"); if ($UserID !== $LoggedUser['ID']) { - Misc::send_pm($UserID, 0, 'A request you created has been unfilled', "The request \"[url=https://".SSL_SITE_URL."/requests.php?action=view&id=$RequestID]".$FullName."[/url]\" was unfilled by [url=https://".SSL_SITE_URL.'/user.php?id='.$LoggedUser['ID'].']'.$LoggedUser['Username']."[/url] for the reason: ".$_POST['reason']); + Misc::send_pm($UserID, 0, 'A request you created has been unfilled', "The request \"[url=".site_url()."requests.php?action=view&id=$RequestID]$FullName"."[/url]\" was unfilled by [url=".site_url().'user.php?id='.$LoggedUser['ID'].']'.$LoggedUser['Username']."[/url] for the reason: ".$_POST['reason']); } Misc::write_log("Request $RequestID ($FullName), with a ".Format::get_size($RequestVotes['TotalBounty']).' bounty, was unfilled by user '.$LoggedUser['ID'].' ('.$LoggedUser['Username'].') for the reason: '.$_POST['reason']); @@ -90,7 +90,10 @@ } $SphQL = new SphinxqlQuery(); -$SphQL->raw_query("UPDATE requests, requests_delta SET torrentid = 0, fillerid = 0 WHERE id = $RequestID", false); +$SphQL->raw_query(" + UPDATE requests, requests_delta + SET torrentid = 0, fillerid = 0 + WHERE id = $RequestID", false); header("Location: requests.php?action=view&id=$RequestID"); ?> diff --git a/sections/schedule/index.php b/sections/schedule/index.php index ebf0d3fb..3eaebc79 100644 --- a/sections/schedule/index.php +++ b/sections/schedule/index.php @@ -334,7 +334,7 @@ function next_hour() { UPDATE users_info SET AdminComment = CONCAT('".sqltime()." - Class changed to ".Users::make_class_string($L['To'])." by System\n\n', AdminComment) WHERE UserID = $UserID"); - Misc::send_pm($UserID, 0, 'You have been promoted to '.Users::make_class_string($L['To']), 'Congratulations on your promotion to '.Users::make_class_string($L['To'])."!\n\nTo read more about ".SITE_NAME."'s user classes, read [url=https://".SSL_SITE_URL."/wiki.php?action=article&name=userclasses]this wiki article[/url]."); + Misc::send_pm($UserID, 0, 'You have been promoted to '.Users::make_class_string($L['To']), 'Congratulations on your promotion to '.Users::make_class_string($L['To'])."!\n\nTo read more about ".SITE_NAME."'s user classes, read [url=".site_url()."wiki.php?action=article&name=userclasses]this wiki article[/url]."); } $DB->query(" UPDATE users_main @@ -378,7 +378,7 @@ function next_hour() { UPDATE users_info SET AdminComment = CONCAT('".sqltime()." - Class changed to ".Users::make_class_string($L['From'])." by System\n\n', AdminComment) WHERE UserID = $UserID"); - Misc::send_pm($UserID, 0, 'You have been demoted to '.Users::make_class_string($L['From']), "You now only qualify for the \"".Users::make_class_string($L['From'])."\" user class.\n\nTo read more about ".SITE_NAME."'s user classes, read [url=https://".SSL_SITE_URL."/wiki.php?action=article&name=userclasses]this wiki article[/url]."); + Misc::send_pm($UserID, 0, 'You have been demoted to '.Users::make_class_string($L['From']), "You now only qualify for the \"".Users::make_class_string($L['From'])."\" user class.\n\nTo read more about ".SITE_NAME."'s user classes, read [url=".site_url()."wiki.php?action=article&name=userclasses]this wiki article[/url]."); } $DB->query(" UPDATE users_main @@ -494,7 +494,7 @@ function next_hour() { if (count($Users) > 0) { $Subject = 'Leeching Disabled'; - $Message = 'You have downloaded more than 10 GiB while on Ratio Watch. Your leeching privileges have been disabled. Please reread the rules and refer to this guide on how to improve your ratio https://' . SSL_SITE_URL . '/wiki.php?action=article&id=110'; + $Message = 'You have downloaded more than 10 GiB while on Ratio Watch. Your leeching privileges have been disabled. Please reread the rules and refer to this guide on how to improve your ratio ' . site_url() . 'wiki.php?action=article&id=110'; foreach ($Users as $TorrentPass => $UserID) { Misc::send_pm($UserID, 0, $Subject, $Message); Tracker::update_tracker('update_user', array('passkey' => $TorrentPass, 'can_leech' => '0')); @@ -667,7 +667,7 @@ function next_hour() { $Cache->begin_transaction("user_info_heavy_$UserID"); $Cache->update_row(false, array('RatioWatchEnds' => '0000-00-00 00:00:00', 'RatioWatchDownload' => '0', 'CanLeech' => 1)); $Cache->commit_transaction(0); - Misc::send_pm($UserID, 0, 'You have been taken off Ratio Watch', "Congratulations! Feel free to begin downloading again.\n To ensure that you do not get put on ratio watch again, please read the rules located [url=https://".SSL_SITE_URL."/rules.php?p=ratio]here[/url].\n"); + Misc::send_pm($UserID, 0, 'You have been taken off Ratio Watch', "Congratulations! Feel free to begin downloading again.\n To ensure that you do not get put on ratio watch again, please read the rules located [url=".site_url()."rules.php?p=ratio]here[/url].\n"); echo "Ratio watch off: $UserID\n"; } $DB->set_query_id($UserQuery); @@ -699,7 +699,7 @@ function next_hour() { $Cache->begin_transaction("user_info_heavy_$UserID"); $Cache->update_row(false, array('RatioWatchEnds' => '0000-00-00 00:00:00', 'RatioWatchDownload' => '0', 'CanLeech' => 1)); $Cache->commit_transaction(0); - Misc::send_pm($UserID, 0, "You have been taken off Ratio Watch", "Congratulations! Feel free to begin downloading again.\n To ensure that you do not get put on ratio watch again, please read the rules located [url=https://".SSL_SITE_URL."/rules.php?p=ratio]here[/url].\n"); + Misc::send_pm($UserID, 0, "You have been taken off Ratio Watch", "Congratulations! Feel free to begin downloading again.\n To ensure that you do not get put on ratio watch again, please read the rules located [url=".site_url()."rules.php?p=ratio]here[/url].\n"); echo "Ratio watch off: $UserID\n"; } $DB->set_query_id($UserQuery); @@ -734,7 +734,7 @@ function next_hour() { $Cache->begin_transaction("user_info_heavy_$UserID"); $Cache->update_row(false, array('RatioWatchEnds' => time_plus(60 * 60 * 24 * 14), 'RatioWatchDownload' => 0)); $Cache->commit_transaction(0); - Misc::send_pm($UserID, 0, 'You have been put on Ratio Watch', "This happens when your ratio falls below the requirements we have outlined in the rules located [url=https://".SSL_SITE_URL."/rules.php?p=ratio]here[/url].\n For information about ratio watch, click the link above."); + Misc::send_pm($UserID, 0, 'You have been put on Ratio Watch', "This happens when your ratio falls below the requirements we have outlined in the rules located [url=".site_url()."rules.php?p=ratio]here[/url].\n For information about ratio watch, click the link above."); echo "Ratio watch on: $UserID\n"; }*/ @@ -1317,11 +1317,11 @@ function next_hour() { if ($Format && $Encoding) { $Name .= " [$Format / $Encoding]"; } - $TorrentAlerts[$UserID]['Msg'] .= "\n[url=https://".SSL_SITE_URL."/torrents.php?torrentid=$ID]".$Name."[/url]"; + $TorrentAlerts[$UserID]['Msg'] .= "\n[url=".site_url()."torrents.php?torrentid=$ID]".$Name."[/url]"; $TorrentAlerts[$UserID]['Count']++; } foreach ($TorrentAlerts as $UserID => $MessageInfo) { - Misc::send_pm($UserID, 0, 'Unseeded torrent notification', $MessageInfo['Count']." of your uploads will be deleted for inactivity soon. Unseeded torrents are deleted after 4 weeks. If you still have the files, you can seed your uploads by ensuring the torrents are in your client and that they aren't stopped. You can view the time that a torrent has been unseeded by clicking on the torrent description line and looking for the \"Last active\" time. For more information, please go [url=https://".SSL_SITE_URL."/wiki.php?action=article&id=663]here[/url].\n\nThe following torrent".($MessageInfo['Count'] > 1 ? 's' : '').' will be removed for inactivity:'.$MessageInfo['Msg']."\n\nIf you no longer wish to receive these notifications, please disable them in your profile settings."); + Misc::send_pm($UserID, 0, 'Unseeded torrent notification', $MessageInfo['Count']." of your uploads will be deleted for inactivity soon. Unseeded torrents are deleted after 4 weeks. If you still have the files, you can seed your uploads by ensuring the torrents are in your client and that they aren't stopped. You can view the time that a torrent has been unseeded by clicking on the torrent description line and looking for the \"Last active\" time. For more information, please go [url=".site_url()."wiki.php?action=article&id=663]here[/url].\n\nThe following torrent".($MessageInfo['Count'] > 1 ? 's' : '').' will be removed for inactivity:'.$MessageInfo['Msg']."\n\nIf you no longer wish to receive these notifications, please disable them in your profile settings."); } } diff --git a/sections/tools/managers/recommend_list.php b/sections/tools/managers/recommend_list.php index ce1723d8..e7056ac3 100644 --- a/sections/tools/managers/recommend_list.php +++ b/sections/tools/managers/recommend_list.php @@ -28,7 +28,7 @@ - + - - - + + + - + query(" SELECT Enabled FROM users_main
    Add Recommendation:Link to a torrent group on site. For example, https:///torrents.php?id=12345Link to a torrent group on site. For example, torrents.php?id=12345
    diff --git a/sections/top10/torrents.php b/sections/top10/torrents.php index 2ac628c2..90babbb2 100644 --- a/sections/top10/torrents.php +++ b/sections/top10/torrents.php @@ -417,9 +417,9 @@ function generate_torrent_table($Caption, $Tag, $Details, $Limit) { Name Size DataSnatchesSeedersLeechersSnatchesSeedersLeechers Peers
    Reset passkeyReset passkey
    - diff --git a/sections/userhistory/email_history.php b/sections/userhistory/email_history.php index 25f6fcdc..52d2d1e1 100644 --- a/sections/userhistory/email_history.php +++ b/sections/userhistory/email_history.php @@ -132,7 +132,7 @@