mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-02-12 08:19:03 +00:00
Empty commit
This commit is contained in:
parent
9b52af5dc1
commit
0eb0c64e23
@ -476,6 +476,7 @@ public static function freeleech_torrents($TorrentIDs, $FreeNeutral = 1, $FreeLe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience function to allow for passing groups to Torrents::freeleech_torrents()
|
* Convenience function to allow for passing groups to Torrents::freeleech_torrents()
|
||||||
*
|
*
|
||||||
@ -497,13 +498,13 @@ public static function freeleech_groups($GroupIDs, $FreeNeutral = 1, $FreeLeechT
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the logged in user has an active freeleech token
|
* Check if the logged in user has an active freeleech token
|
||||||
*
|
*
|
||||||
* @param int $TorrentID
|
* @param int $TorrentID
|
||||||
* @return true if an active token exists
|
* @return true if an active token exists
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public static function has_token($TorrentID) {
|
public static function has_token($TorrentID) {
|
||||||
global $DB, $Cache, $LoggedUser;
|
global $DB, $Cache, $LoggedUser;
|
||||||
if (empty($LoggedUser) || empty($LoggedUser['ID'])) {
|
if (empty($LoggedUser) || empty($LoggedUser['ID'])) {
|
||||||
@ -523,5 +524,23 @@ public static function has_token($TorrentID) {
|
|||||||
return isset($TokenTorrents[$TorrentID]);
|
return isset($TokenTorrents[$TorrentID]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if the logged in user can use a freeleech token on this torrent
|
||||||
|
*
|
||||||
|
* @param int $Torrent
|
||||||
|
* @return true if user is allowed to use a token
|
||||||
|
*/
|
||||||
|
public static function can_use_token($Torrent) {
|
||||||
|
global $LoggedUser;
|
||||||
|
if (empty($LoggedUser) || empty($LoggedUser['ID'])) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return ($LoggedUser['FLTokens'] > 0
|
||||||
|
&& $Torrent['Size'] < 1073741824
|
||||||
|
&& !$Torrent['PersonalFL']
|
||||||
|
&& empty($Torrent['FreeTorrent'])
|
||||||
|
&& $LoggedUser['CanLeech'] == '1');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -32,11 +32,11 @@
|
|||||||
$Subject = "You have received a verbal warning";
|
$Subject = "You have received a verbal warning";
|
||||||
$PrivateMessage = "You have received a verbal warning for [url=$URL]this post.[/url]\n\n" . $PrivateMessage;
|
$PrivateMessage = "You have received a verbal warning for [url=$URL]this post.[/url]\n\n" . $PrivateMessage;
|
||||||
$AdminComment = date("Y-m-d") . ' - Verbally warned by ' . $LoggedUser['Username'] . " for $URL \nReason: $Reason\n\n";
|
$AdminComment = date("Y-m-d") . ' - Verbally warned by ' . $LoggedUser['Username'] . " for $URL \nReason: $Reason\n\n";
|
||||||
|
Tools::update_user_notes($UserID, $AdminComment);
|
||||||
}
|
}
|
||||||
|
|
||||||
$DB->query("INSERT INTO users_warnings_forums (UserID, Comment) VALUES('$UserID', '" . db_string($AdminComment) . "')
|
$DB->query("INSERT INTO users_warnings_forums (UserID, Comment) VALUES('$UserID', '" . db_string($AdminComment) . "')
|
||||||
ON DUPLICATE KEY UPDATE Comment = CONCAT('" . db_string($AdminComment) . "', Comment)");
|
ON DUPLICATE KEY UPDATE Comment = CONCAT('" . db_string($AdminComment) . "', Comment)");
|
||||||
Tools::update_user_notes($UserID, $AdminComment);
|
|
||||||
Misc::send_pm($UserID, $LoggedUser['ID'], $Subject, $PrivateMessage);
|
Misc::send_pm($UserID, $LoggedUser['ID'], $Subject, $PrivateMessage);
|
||||||
|
|
||||||
//edit the post
|
//edit the post
|
||||||
|
Loading…
Reference in New Issue
Block a user