Empty commit

This commit is contained in:
Git 2014-02-27 08:00:30 +00:00
parent 782186a113
commit dc2328ef65
32 changed files with 120 additions and 112 deletions

View File

@ -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)

View File

@ -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() {

View File

@ -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!

View File

@ -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>$Title :: ". SITE_NAME. "</title>\n";
echo "\t\t<link>$Site/$Section</link>\n";
echo "\t\t<link>$Site$Section</link>\n";
echo "\t\t<description>$Description</description>\n";
echo "\t\t<language>en-us</language>\n";
echo "\t\t<lastBuildDate>". date('r'). "</lastBuildDate>\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<item>\n";
$Item .= "\t\t\t<title><![CDATA[$Title]]></title>\n";
$Item .= "\t\t\t<description><![CDATA[$Description]]></description>\n";
$Item .= "\t\t\t<pubDate>$Date</pubDate>\n";
$Item .= "\t\t\t<link>$Site/$Page</link>\n";
$Item .= "\t\t\t<guid>$Site/$Page</guid>\n";
$Item .= "\t\t\t<link>$Site$Page</link>\n";
$Item .= "\t\t\t<guid>$Site$Page</guid>\n";
if ($Comments != '') {
$Item .= "\t\t\t<comments>$Site/$Comments</comments>\n";
$Item .= "\t\t\t<comments>$Site$Comments</comments>\n";
}
if ($Category != '') {
$Item .= "\t\t\t<category><![CDATA[$Category]]></category>\n";

View File

@ -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

View File

@ -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);
}

View File

@ -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

View File

@ -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";
}

View File

@ -58,9 +58,9 @@
<input type="hidden" name="rm" value="2" />
<input type="hidden" name="cmd" value="_donations" />
<input type="hidden" name="business" value="<?=PAYPAL_ADDRESS?>" />
<input type="hidden" name="return" value="https://<?=SSL_SITE_URL?>/donate.php?action=complete" />
<input type="hidden" name="cancel_return" value="https://<?=SSL_SITE_URL?>/donate.php?action=cancel" />
<input type="hidden" name="notify_url" value="https://<?=SSL_SITE_URL?>/donate.php?action=ipn" />
<input type="hidden" name="return" value="<?=site_url()?>donate.php?action=complete" />
<input type="hidden" name="cancel_return" value="<?=site_url()?>donate.php?action=cancel" />
<input type="hidden" name="notify_url" value="<?=site_url()?>donate.php?action=ipn" />
<input type="hidden" name="item_name" value="Donation" />
<input type="hidden" name="amount" value="" />
<input type="hidden" name="custom" value="<?=$LoggedUser['ID']?>" />

View File

@ -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

View File

@ -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');

View File

@ -154,8 +154,6 @@
SET Active = 0
WHERE UserID = '$UserID'
AND Active = 1");
} else {
$Err = 'There is no user with that email address.';
}

View File

@ -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");
}

View File

@ -328,7 +328,7 @@
<tr>
<td class="label">Report comment:</td>
<td colspan="3">
<input type="text" name="comment" id="comment<?=$ReportID?>" size="45" value="<?=$ModComment?>" />
<input type="text" name="comment" id="comment<?=$ReportID?>" size="70" value="<?=$ModComment?>" />
<input type="button" value="Update now" onclick="UpdateComment(<?=$ReportID?>);" />
</td>
</tr>
@ -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).'"';
} ?> />

View File

@ -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";
}

View File

@ -517,7 +517,7 @@
<tr>
<td class="label">Report comment:</td>
<td colspan="3">
<input type="text" name="comment" id="comment<?=$ReportID?>" size="45" value="<?=$ModComment?>" />
<input type="text" name="comment" id="comment<?=$ReportID?>" size="70" value="<?=$ModComment?>" />
<input type="button" value="Update now" onclick="UpdateComment(<?=$ReportID?>);" />
</td>
</tr>
@ -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).'"';
} ?>

View File

@ -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 = '';

View File

@ -179,7 +179,7 @@
Reports of torrents with ID = 1
</li>
<li>
<a href="reportsv2.php?view=torrent&amp;id=1">https://<?=SSL_SITE_URL?>/reportsv2.php?view=torrent&amp;id=1</a>
<a href="reportsv2.php?view=torrent&amp;id=1"><?=site_url()?>reportsv2.php?view=torrent&amp;id=1</a>
</li>
</ul>
<strong>By group ID of torrent reported:</strong>
@ -188,7 +188,7 @@
Reports of torrents within the group with ID = 1
</li>
<li>
<a href="reportsv2.php?view=group&amp;id=1">https://<?=SSL_SITE_URL?>/reportsv2.php?view=group&amp;id=1</a>
<a href="reportsv2.php?view=group&amp;id=1"><?=site_url()?>reportsv2.php?view=group&amp;id=1</a>
</li>
</ul>
<strong>By report ID:</strong>
@ -197,7 +197,7 @@
The report with ID = 1
</li>
<li>
<a href="reportsv2.php?view=report&amp;id=1">https://<?=SSL_SITE_URL?>/reportsv2.php?view=report&amp;id=1</a>
<a href="reportsv2.php?view=report&amp;id=1"><?=site_url()?>reportsv2.php?view=report&amp;id=1</a>
</li>
</ul>
<strong>By reporter ID:</strong>
@ -206,7 +206,7 @@
Reports created by <?=$Owner?>
</li>
<li>
<a href="reportsv2.php?view=reporter&amp;id=<?=$OwnerID?>">https://<?=SSL_SITE_URL?>/reportsv2.php?view=reporter&amp;id=<?=$OwnerID?></a>
<a href="reportsv2.php?view=reporter&amp;id=<?=$OwnerID?>"><?=site_url()?>reportsv2.php?view=reporter&amp;id=<?=$OwnerID?></a>
</li>
</ul>
<strong>By uploader ID:</strong>
@ -215,7 +215,7 @@
Reports for torrents uploaded by <?=$Owner?>
</li>
<li>
<a href="reportsv2.php?view=uploader&amp;id=<?=$OwnerID?>">https://<?=SSL_SITE_URL?>/reportsv2.php?view=uploader&amp;id=<?=$OwnerID?></a>
<a href="reportsv2.php?view=uploader&amp;id=<?=$OwnerID?>"><?=site_url()?>reportsv2.php?view=uploader&amp;id=<?=$OwnerID?></a>
</li>
</ul>
<strong>By resolver ID:</strong>
@ -224,7 +224,7 @@
Reports for torrents resolved by <?=$Owner?>
</li>
<li>
<a href="reportsv2.php?view=resolver&amp;id=<?=$OwnerID?>">https://<?=SSL_SITE_URL?>/reportsv2.php?view=resolver&amp;id=<?=$OwnerID?></a>
<a href="reportsv2.php?view=resolver&amp;id=<?=$OwnerID?>"><?=site_url()?>reportsv2.php?view=resolver&amp;id=<?=$OwnerID?></a>
</li>
</ul>
<strong>For browsing anything more complicated than these, use the search feature.</strong>

View File

@ -351,7 +351,7 @@
<tr>
<td class="label">Torrent group</td>
<td>
https://<?=SSL_SITE_URL?>/torrents.php?id=<input type="text" name="groupid" value="<?=$GroupID?>" size="15" /><br />
<?=site_url()?>torrents.php?id=<input type="text" name="groupid" value="<?=$GroupID?>" size="15" /><br />
If this request matches a torrent group <span style="font-weight: bold;">already existing</span> on the site, please indicate that here.
</td>
</tr>
@ -359,7 +359,7 @@
<tr>
<td class="label">Torrent group</td>
<td>
<a href="torrents.php?id=<?=$GroupID?>">https://<?=SSL_SITE_URL?>/torrents.php?id=<?=$GroupID?></a><br />
<a href="torrents.php?id=<?=$GroupID?>"><?=site_url()?>torrents.php?id=<?=$GroupID?></a><br />
This request <?=($NewRequest ? 'will be' : 'is')?> associated with the above torrent group.
<? if (!$NewRequest) { ?>
If this is incorrect, please <a href="reports.php?action=report&amp;type=request&amp;id=<?=$RequestID?>">report this request</a> so that staff can fix it.

View File

@ -417,7 +417,7 @@
<input type="hidden" name="requestid" value="<?=$RequestID?>" />
<input type="text" size="50" name="link"<?=(!empty($Link) ? " value=\"$Link\"" : '')?> />
<br />
<strong>Should be the permalink (PL) to the torrent (e.g. https://<?=SSL_SITE_URL?>/torrents.php?torrentid=xxxx).</strong>
<strong>Should be the permalink (PL) to the torrent (e.g. <?=site_url()?>torrents.php?torrentid=xxxx).</strong>
</div>
<? if (check_perms('site_moderate_requests')) { ?>
<div class="field_div">

View File

@ -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']);

View File

@ -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&#8202;&mdash;&#8202;[url=https://'.SSL_SITE_URL."/requests.php?action=view&amp;id=$RequestID]$FullName".'[/url]&#8202;&mdash;&#8202;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&#8202;&mdash;&#8202;[url='.site_url()."requests.php?action=view&amp;id=$RequestID]$FullName".'[/url]&#8202;&mdash;&#8202;has been filled. You can view it here: [url]'.site_url()."torrents.php?torrentid=$TorrentID".'[/url]');
}
$RequestVotes = Requests::get_votes_array($RequestID);

View File

@ -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");

View File

@ -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&amp;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&amp;type=request&amp;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&amp;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&amp;type=request&amp;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&amp;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&amp;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");
?>

View File

@ -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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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.");
}
}

View File

@ -28,7 +28,7 @@
<table cellpadding="6" cellspacing="1" border="0" class="layout border" width="100%">
<tr>
<td rowspan="2" class="label"><strong>Add Recommendation:</strong></td>
<td>Link to a torrent group on site. For example, <strong>https://<?=SSL_SITE_URL?>/torrents.php?id=12345</strong></td>
<td>Link to a torrent group on site. For example, <strong><?=site_url()?>torrents.php?id=12345</strong></td>
</tr>
<tr>
<td>

View File

@ -417,9 +417,9 @@ function generate_torrent_table($Caption, $Tag, $Details, $Limit) {
<td>Name</td>
<td style="text-align: right;">Size</td>
<td style="text-align: right;">Data</td>
<td style="text-align: right;"><img src="static/styles/<?=$LoggedUser['StyleName']?>/images/snatched.png" alt="Snatches" title="Snatches" class="tooltip" /></td>
<td style="text-align: right;"><img src="static/styles/<?=$LoggedUser['StyleName']?>/images/seeders.png" alt="Seeders" title="Seeders" class="tooltip" /></td>
<td style="text-align: right;"><img src="static/styles/<?=$LoggedUser['StyleName']?>/images/leechers.png" alt="Leechers" title="Leechers" class="tooltip" /></td>
<td style="text-align: right;" class="sign snatches"><img src="static/styles/<?=$LoggedUser['StyleName']?>/images/snatched.png" alt="Snatches" title="Snatches" class="tooltip" /></td>
<td style="text-align: right;" class="sign seeders"><img src="static/styles/<?=$LoggedUser['StyleName']?>/images/seeders.png" alt="Seeders" title="Seeders" class="tooltip" /></td>
<td style="text-align: right;" class="sign leechers"><img src="static/styles/<?=$LoggedUser['StyleName']?>/images/leechers.png" alt="Leechers" title="Leechers" class="tooltip" /></td>
<td style="text-align: right;">Peers</td>
</tr>
<?

View File

@ -53,8 +53,8 @@
$Announce .= ' / Freeleech!';
}
$AnnounceSSL = $Announce . ' - https://' . SSL_SITE_URL . "/torrents.php?id=$GroupID / https://" . SSL_SITE_URL . "/torrents.php?action=download&id=$ExtraTorrentID";
$Announce .= ' - https://' . SSL_SITE_URL . "/torrents.php?id=$GroupID / https://" . SSL_SITE_URL . "/torrents.php?action=download&id=$ExtraTorrentID";
$AnnounceSSL = $Announce . ' - ' . site_url() . "torrents.php?id=$GroupID / " . site_url() . "torrents.php?action=download&id=$ExtraTorrentID";
$Announce .= ' - ' . site_url() . "torrents.php?id=$GroupID / " . site_url() . "torrents.php?action=download&id=$ExtraTorrentID";
$AnnounceSSL .= ' - ' . trim($Properties['TagList']);
$Announce .= ' - ' . trim($Properties['TagList']);

View File

@ -810,8 +810,8 @@
}
$Title = $Announce;
$AnnounceSSL = "$Announce - https://".SSL_SITE_URL."/torrents.php?id=$GroupID / https://".SSL_SITE_URL."/torrents.php?action=download&id=$TorrentID";
$Announce .= " - https://".SSL_SITE_URL."/torrents.php?id=$GroupID / https://".SSL_SITE_URL."/torrents.php?action=download&id=$TorrentID";
$AnnounceSSL = "$Announce - ".site_url()."torrents.php?id=$GroupID / ".site_url()."torrents.php?action=download&id=$TorrentID";
$Announce .= " - ".site_url()."torrents.php?id=$GroupID / ".site_url()."torrents.php?action=download&id=$TorrentID";
$AnnounceSSL .= ' - '.trim($Properties['TagList']);
$Announce .= ' - '.trim($Properties['TagList']);

View File

@ -761,7 +761,7 @@ function checked($Checked) {
</td>
</tr>
<tr id="acc_resetpk_tr">
<td class="label tooltip_interactive" title="For information about the function of your passkey, please &lt;a href=&quot;https://<?=SSL_SITE_URL?>/wiki.php?action=article&amp;amp;name=Passkey&quot;&gt;read this wiki article&lt;/a&gt;." data-title-plain="For information about the function of your passkey, please read the &quot;Passkey&quot; wiki article."><strong>Reset passkey</strong></td>
<td class="label tooltip_interactive" title="For information about the function of your passkey, please &lt;a href=&quot;<?=site_url()?>wiki.php?action=article&amp;amp;name=Passkey&quot;&gt;read this wiki article&lt;/a&gt;." data-title-plain="For information about the function of your passkey, please read the &quot;Passkey&quot; wiki article."><strong>Reset passkey</strong></td>
<td>
<div class="field_div">
<label><input type="checkbox" name="resetpasskey" id="resetpasskey" />

View File

@ -14,7 +14,7 @@
$_GET['username'] = trim($_GET['username']);
// form submitted
$Val->SetFields('username','1','username','Please enter a username.');
$Val->SetFields('username', '1', 'username', 'Please enter a username.');
$Err = $Val->ValidateForm($_GET);
if (!$Err) {
@ -34,7 +34,7 @@
Donor,
Warned
FROM users_main AS um
JOIN users_info AS ui ON ui.UserID=um.ID
JOIN users_info AS ui ON ui.UserID = um.ID
WHERE Username LIKE '%".db_string($_GET['username'], true)."%'
ORDER BY Username
LIMIT $Limit");
@ -45,7 +45,6 @@
$NumResults = 300;
}
}
}
View::show_header('User search');
@ -93,5 +92,4 @@
<?=$Pages?>
</div>
</div>
<? View::show_footer(); ?>

View File

@ -132,7 +132,7 @@
<td><?=time_diff($Time)?></td>
<td><?=display_str($IP)?></td>
<?
$UserURL = 'https://'.SSL_SITE_URL."/user.php?id=$UserID2";
$UserURL = site_url()."user.php?id=$UserID2";
$DB->query("
SELECT Enabled
FROM users_main