Empty commit

This commit is contained in:
Git 2014-02-19 08:00:32 +00:00
parent b4f4814eee
commit 64fdf92fa0
9 changed files with 34 additions and 27 deletions

View File

@ -2,7 +2,7 @@
class IRC_DB extends DB_MYSQL { class IRC_DB extends DB_MYSQL {
function halt($Msg) { function halt($Msg) {
global $Bot; global $Bot;
$Bot->send_to($Bot->get_channel(),'The database is currently unavailable; try again later.'); $Bot->send_to($Bot->get_channel(), 'The database is currently unavailable; try again later.');
} }
} }
@ -20,12 +20,12 @@ abstract protected function listener_events();
protected $Channels = array(); protected $Channels = array();
protected $Messages = array(); protected $Messages = array();
protected $LastChan = false; protected $LastChan = false;
protected $ListenSocket =false; protected $ListenSocket = false;
protected $Listened = false; protected $Listened = false;
protected $Connecting = false; protected $Connecting = false;
protected $Bound = false; //Did we successfully bind to the socket? protected $Bound = false; // Did we successfully bind to the socket?
protected $State = 1; //Drones live protected $State = 1; // Drone is live
public $Restart = 0; //Die by default public $Restart = 0; // Die by default
public function __construct() { public function __construct() {
if (isset($_SERVER['HOME']) && is_dir($_SERVER['HOME']) && getcwd() != $_SERVER['HOME']) { if (isset($_SERVER['HOME']) && is_dir($_SERVER['HOME']) && getcwd() != $_SERVER['HOME']) {

View File

@ -165,13 +165,13 @@ public static function disable_users($UserIDs, $AdminComment, $BanReason = 1) {
} }
G::$DB->query(" G::$DB->query("
UPDATE users_info AS i UPDATE users_info AS i
JOIN users_main AS m ON m.ID=i.UserID JOIN users_main AS m ON m.ID = i.UserID
SET m.Enabled='2', SET m.Enabled = '2',
m.can_leech='0', m.can_leech = '0',
i.AdminComment = CONCAT('".sqltime()." - ".($AdminComment ? $AdminComment : 'Disabled by system')."\n\n', i.AdminComment), i.AdminComment = CONCAT('".sqltime()." - ".($AdminComment ? $AdminComment : 'Disabled by system')."\n\n', i.AdminComment),
i.BanDate='".sqltime()."', i.BanDate = '".sqltime()."',
i.BanReason='$BanReason', i.BanReason = '$BanReason',
i.RatioWatchDownload=".($BanReason == 2 ? 'm.Downloaded' : "'0'")." i.RatioWatchDownload = ".($BanReason == 2 ? 'm.Downloaded' : "'0'")."
WHERE m.ID IN(".implode(',', $UserIDs).') '); WHERE m.ID IN(".implode(',', $UserIDs).') ');
G::$Cache->decrement('stats_user_count', G::$DB->affected_rows()); G::$Cache->decrement('stats_user_count', G::$DB->affected_rows());
foreach ($UserIDs as $UserID) { foreach ($UserIDs as $UserID) {
@ -264,7 +264,7 @@ public static function warn_user($UserID, $Duration, $Reason) {
SET SET
Warned = \''.db_string($WarnTime).'\', Warned = \''.db_string($WarnTime).'\',
WarnedTimes = WarnedTimes + 1, WarnedTimes = WarnedTimes + 1,
AdminComment = CONCAT(\''.db_string($AdminComment).'\',AdminComment) AdminComment = CONCAT(\''.db_string($AdminComment).'\', AdminComment)
WHERE UserID = \''.db_string($UserID).'\''); WHERE UserID = \''.db_string($UserID).'\'');
} }
G::$DB->set_query_id($QueryID); G::$DB->set_query_id($QueryID);
@ -279,7 +279,7 @@ public static function update_user_notes($UserID, $AdminComment) {
$QueryID = G::$DB->get_query_id(); $QueryID = G::$DB->get_query_id();
G::$DB->query(' G::$DB->query('
UPDATE users_info UPDATE users_info
SET AdminComment = CONCAT(\''.db_string($AdminComment).'\',AdminComment) SET AdminComment = CONCAT(\''.db_string($AdminComment).'\', AdminComment)
WHERE UserID = \''.db_string($UserID).'\''); WHERE UserID = \''.db_string($UserID).'\'');
G::$DB->set_query_id($QueryID); G::$DB->set_query_id($QueryID);
} }

View File

@ -1,5 +1,8 @@
CHANGE LOG CHANGE LOG
2014-02-19 by alderaan
Reduce width of the main table in the Tag Aliases manager
2014-02-11 by alderaan 2014-02-11 by alderaan
Re-enable torrent inactivity deletion for public Gazelle. This was accidentally put in a public release. Re-enable torrent inactivity deletion for public Gazelle. This was accidentally put in a public release.

View File

@ -907,12 +907,12 @@ CREATE TABLE `sphinx_requests_delta` (
`UserID` int(10) unsigned NOT NULL DEFAULT '0', `UserID` int(10) unsigned NOT NULL DEFAULT '0',
`TimeAdded` int(12) unsigned DEFAULT NULL, `TimeAdded` int(12) unsigned DEFAULT NULL,
`LastVote` int(12) unsigned DEFAULT NULL, `LastVote` int(12) unsigned DEFAULT NULL,
`CategoryID` int(3) NOT NULL, `CategoryID` tinyint(4) DEFAULT NULL,
`Title` varchar(255) DEFAULT NULL, `Title` varchar(255) DEFAULT NULL,
`Year` int(4) DEFAULT NULL, `Year` int(4) DEFAULT NULL,
`ArtistList` varchar(2048) DEFAULT NULL, `ArtistList` varchar(2048) DEFAULT NULL,
`ReleaseType` tinyint(2) DEFAULT NULL, `ReleaseType` tinyint(2) DEFAULT NULL,
`CatalogueNumber` varchar(50) NOT NULL, `CatalogueNumber` varchar(50) DEFAULT NULL,
`BitrateList` varchar(255) DEFAULT NULL, `BitrateList` varchar(255) DEFAULT NULL,
`FormatList` varchar(255) DEFAULT NULL, `FormatList` varchar(255) DEFAULT NULL,
`MediaList` varchar(255) DEFAULT NULL, `MediaList` varchar(255) DEFAULT NULL,

View File

@ -569,8 +569,8 @@
$TimeCompare = 1267643718; // Requests v2 was implemented 2010-03-03 20:15:18 $TimeCompare = 1267643718; // Requests v2 was implemented 2010-03-03 20:15:18
$Requests = Requests::get_requests(array_keys($SphRequests)); $Requests = Requests::get_requests(array_keys($SphRequests));
foreach ($SphRequests as $RequestID => $SphRequest) { foreach ($Requests as $RequestID => $Request) {
$Request = $Requests[$RequestID]; $SphRequest = $SphRequests[$RequestID];
$Bounty = $SphRequest['bounty'] * 1024; // Sphinx stores bounty in kB $Bounty = $SphRequest['bounty'] * 1024; // Sphinx stores bounty in kB
$VoteCount = $SphRequest['votes']; $VoteCount = $SphRequest['votes'];

View File

@ -55,6 +55,12 @@
WHERE RequestID = '$RequestID'"); WHERE RequestID = '$RequestID'");
$Cache->delete_value("request_artists_$RequestID"); $Cache->delete_value("request_artists_$RequestID");
G::$DB->query("
REPLACE INTO sphinx_requests_delta
(ID)
VALUES
($RequestID)");
if ($UserID != $LoggedUser['ID']) { 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=https://".SSL_SITE_URL.'/user.php?id='.$LoggedUser['ID'].']'.$LoggedUser['Username'].'[/url] for the reason: '.$_POST['reason']);
} }
@ -66,7 +72,6 @@
if ($GroupID) { if ($GroupID) {
$Cache->delete_value("requests_group_$GroupID"); $Cache->delete_value("requests_group_$GroupID");
} }
Requests::update_sphinx_requests($RequestID);
header('Location: requests.php'); header('Location: requests.php');
?> ?>

View File

@ -5,7 +5,7 @@
View::show_header('Tag Aliases'); View::show_header('Tag Aliases');
$orderby = (($_GET['order'] == 'badtags') ? 'BadTag' : 'AliasTag'); $orderby = ($_GET['order'] === 'badtags' ? 'BadTag' : 'AliasTag');
if (check_perms('users_mod')) { if (check_perms('users_mod')) {
if (isset($_POST['newalias'])) { if (isset($_POST['newalias'])) {
@ -43,7 +43,7 @@
<a href="tools.php?action=tag_aliases&amp;order=badtags" class="brackets">Sort by bad tags</a> <a href="tools.php?action=tag_aliases&amp;order=badtags" class="brackets">Sort by bad tags</a>
</div> </div>
</div> </div>
<table width="100%"> <table class="thin">
<tr class="colhead"> <tr class="colhead">
<td>Proper tag</td> <td>Proper tag</td>
<td>Renamed from</td> <td>Renamed from</td>
@ -69,10 +69,10 @@
</form> </form>
</tr> </tr>
<? <?
$DB->query(' $DB->query("
SELECT ID, BadTag, AliasTag SELECT ID, BadTag, AliasTag
FROM tag_aliases FROM tag_aliases
ORDER BY ' . $orderby); ORDER BY $orderby");
while (list($ID, $BadTag, $AliasTag) = $DB -> next_record()) { while (list($ID, $BadTag, $AliasTag) = $DB -> next_record()) {
?> ?>
<tr> <tr>

View File

@ -401,7 +401,7 @@
foreach ($AddedClasses as $PermID) { foreach ($AddedClasses as $PermID) {
$ClassChanges[] = $Classes[$PermID]['Name']; $ClassChanges[] = $Classes[$PermID]['Name'];
} }
$EditSummary[] = "Secondary classes added: ".implode(', ',$ClassChanges); $EditSummary[] = "Secondary classes added: ".implode(', ', $ClassChanges);
$Values = array(); $Values = array();
foreach ($AddedClasses as $PermID) { foreach ($AddedClasses as $PermID) {
$Values[] = "($UserID, $PermID)"; $Values[] = "($UserID, $PermID)";
@ -786,7 +786,6 @@
} }
if (!empty($Summary)) { if (!empty($Summary)) {
$UpdateSet[] = "AdminComment = '$Summary'"; $UpdateSet[] = "AdminComment = '$Summary'";
} else { } else {

View File

@ -323,8 +323,8 @@ input.hidden {
.thin { .thin {
width: 850px; width: 850px;
margin-left:auto; margin-left: auto;
margin-right:auto; margin-right: auto;
} }
.widethin { /* overriding the thin class on torrents.php */ .widethin { /* overriding the thin class on torrents.php */
@ -333,7 +333,7 @@ input.hidden {
} }
div.linkbox { div.linkbox {
text-align:center; text-align: center;
padding: 5px; padding: 5px;
} }