Empty commit

This commit is contained in:
Git 2013-11-12 08:00:58 +00:00
parent 99c3e1e954
commit bef5cd9ec8
10 changed files with 257 additions and 154 deletions

View File

@ -863,7 +863,7 @@ CREATE TABLE `sphinx_hash` (
PRIMARY KEY (`ID`)
) ENGINE=MyISAM CHARSET utf8;
CREATE TABLE `sphinx_index_last_id` (
CREATE TABLE `sphinx_index_last_pos` (
`Type` varchar(16) NOT NULL DEFAULT '',
`ID` int(11) DEFAULT NULL,
PRIMARY KEY (`Type`)

View File

@ -7,9 +7,9 @@
aw.Image,
ca.UserID
FROM collages_artists AS ca
JOIN artists_group AS ag ON ag.ArtistID=ca.ArtistID
JOIN artists_group AS ag ON ag.ArtistID = ca.ArtistID
LEFT JOIN wiki_artists AS aw ON aw.RevisionID = ag.RevisionID
WHERE ca.CollageID='$CollageID'
WHERE ca.CollageID = '$CollageID'
ORDER BY ca.Sort");
$Artists = $DB->to_array('ArtistID', MYSQLI_ASSOC);
@ -82,7 +82,7 @@
$CollagePages[] = $CollagePage;
}
View::show_header($Name,'browse,collage,bbcode,voting,recommend');
View::show_header($Name, 'browse,collage,bbcode,voting,recommend');
?>
<div class="thin">
@ -96,18 +96,24 @@
<br /><br />
<? if (check_perms('site_collages_subscribe')) { ?>
<a href="#" id="subscribelink<?=$CollageID?>" class="brackets" onclick="CollageSubscribe(<?=$CollageID?>); return false;"><?=(in_array($CollageID, $CollageSubscriptions) ? 'Unsubscribe' : 'Subscribe')?></a>
<? }
if (check_perms('site_collages_delete') || (check_perms('site_edit_wiki') && !$Locked)) { ?>
<?
}
if (check_perms('site_collages_delete') || (check_perms('site_edit_wiki') && !$Locked)) {
?>
<a href="collages.php?action=edit&amp;collageid=<?=$CollageID?>" class="brackets">Edit description</a>
<? } else { ?>
<span class="brackets">Locked</span>
<? }
if (Bookmarks::has_bookmarked('collage', $CollageID)) { ?>
<?
}
if (Bookmarks::has_bookmarked('collage', $CollageID)) {
?>
<a href="#" id="bookmarklink_collage_<?=$CollageID?>" class="brackets" onclick="Unbookmark('collage', <?=$CollageID?>, 'Bookmark'); return false;">Remove bookmark</a>
<? } else { ?>
<a href="#" id="bookmarklink_collage_<?=$CollageID?>" class="brackets" onclick="Bookmark('collage', <?=$CollageID?>, 'Remove bookmark'); return false;">Bookmark</a>
<? }
if (check_perms('site_collages_manage') && !$Locked) { ?>
<?
}
if (check_perms('site_collages_manage') && !$Locked) {
?>
<a href="collages.php?action=manage_artists&amp;collageid=<?=$CollageID?>" class="brackets">Manage artists</a>
<? } ?>
<a href="reports.php?action=report&amp;type=collage&amp;id=<?=$CollageID?>" class="brackets">Report collage</a>
@ -248,7 +254,8 @@
</div>
<div class="main_column">
<?
if ($CollageCovers != 0) { ?>
if ($CollageCovers != 0) {
?>
<div id="coverart" class="box">
<div class="head" id="coverhead"><strong>Cover Art</strong></div>
<ul class="collage_images" id="collage_page0">
@ -276,7 +283,8 @@
//]]></script>
<?
}
} ?>
}
?>
<table class="artist_table grouping cats" id="discog_table">
<tr class="colhead_dark">
<td><strong>Artists</strong></td>

View File

@ -45,7 +45,11 @@ function compare($X, $Y) {
$NumGroupsByUser++;
}
if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5]) || !empty($ExtendedArtists[6])) {
if (!empty($ExtendedArtists[1])
|| !empty($ExtendedArtists[4])
|| !empty($ExtendedArtists[5])
|| !empty($ExtendedArtists[6])
) {
$CountArtists = array_merge((array)$ExtendedArtists[1], (array)$ExtendedArtists[4], (array)$ExtendedArtists[5], (array)$ExtendedArtists[6]);
} else {
$CountArtists = $GroupArtists;
@ -68,12 +72,16 @@ function compare($X, $Y) {
$DisplayName = "$Number - ";
if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5])|| !empty($ExtendedArtists[6])) {
unset($ExtendedArtists[2]);
unset($ExtendedArtists[3]);
$DisplayName .= Artists::display_artists($ExtendedArtists);
if (!empty($ExtendedArtists[1])
|| !empty($ExtendedArtists[4])
|| !empty($ExtendedArtists[5])
|| !empty($ExtendedArtists[6])
) {
unset($ExtendedArtists[2]);
unset($ExtendedArtists[3]);
$DisplayName .= Artists::display_artists($ExtendedArtists);
} elseif (count($GroupArtists) > 0) {
$DisplayName .= Artists::display_artists(array('1' => $GroupArtists));
$DisplayName .= Artists::display_artists(array('1' => $GroupArtists));
}
$DisplayName .= "<a href=\"torrents.php?id=$GroupID\" class=\"tooltip\" title=\"View torrent group\" dir=\"ltr\">$GroupName</a>";
@ -129,7 +137,7 @@ function compare($X, $Y) {
if ($Torrent['Remastered'] && !$Torrent['RemasterYear']) {
$FirstUnknown = !isset($FirstUnknown);
}
$SnatchedTorrentClass = ($Torrent['IsSnatched'] ? ' snatched_torrent' : '');
$SnatchedTorrentClass = $Torrent['IsSnatched'] ? ' snatched_torrent' : '';
if ($Torrent['RemasterTitle'] != $LastRemasterTitle
|| $Torrent['RemasterYear'] != $LastRemasterYear
@ -220,7 +228,11 @@ function compare($X, $Y) {
ob_start();
$DisplayName = '';
if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5])|| !empty($ExtendedArtists[6])) {
if (!empty($ExtendedArtists[1])
|| !empty($ExtendedArtists[4])
|| !empty($ExtendedArtists[5])
|| !empty($ExtendedArtists[6])
) {
unset($ExtendedArtists[2]);
unset($ExtendedArtists[3]);
$DisplayName .= Artists::display_artists($ExtendedArtists, false);
@ -253,7 +265,13 @@ function compare($X, $Y) {
}
}
if (!check_perms('site_collages_delete') && ($Locked || ($MaxGroups > 0 && $NumGroups >= $MaxGroups) || ($MaxGroupsPerUser > 0 && $NumGroupsByUser >= $MaxGroupsPerUser))) {
if (!check_perms('site_collages_delete')
&& (
$Locked
|| ($MaxGroups > 0 && $NumGroups >= $MaxGroups)
|| ($MaxGroupsPerUser > 0 && $NumGroupsByUser >= $MaxGroupsPerUser)
)
) {
$PreventAdditions = true;
}
@ -290,22 +308,25 @@ function compare($X, $Y) {
<br /><br />
<? if (check_perms('site_collages_subscribe')) { ?>
<a href="#" id="subscribelink<?=$CollageID?>" class="brackets" onclick="CollageSubscribe(<?=$CollageID?>); return false;"><?=(in_array($CollageID, $CollageSubscriptions) ? 'Unsubscribe' : 'Subscribe')?></a>
<? }
if (check_perms('site_collages_delete') || (check_perms('site_edit_wiki') && !$Locked)) { ?>
<?
}
if (check_perms('site_collages_delete') || (check_perms('site_edit_wiki') && !$Locked)) {
?>
<a href="collages.php?action=edit&amp;collageid=<?=$CollageID?>" class="brackets">Edit description</a>
<? } else { ?>
<span class="brackets">Locked</span>
<? }
<?
}
if (Bookmarks::has_bookmarked('collage', $CollageID)) {
?>
<a href="#" id="bookmarklink_collage_<?=$CollageID?>" class="brackets" onclick="Unbookmark('collage', <?=$CollageID?>, 'Bookmark'); return false;">Remove bookmark</a>
<? } else { ?>
<a href="#" id="bookmarklink_collage_<?=$CollageID?>" class="brackets" onclick="Bookmark('collage', <?=$CollageID?>, 'Remove bookmark'); return false;">Bookmark</a>
<? }
?>
<? } ?>
<!-- <a href="#" id="recommend" class="brackets">Recommend</a> -->
<?
if (check_perms('site_collages_manage') && !$Locked) { ?>
if (check_perms('site_collages_manage') && !$Locked) {
?>
<a href="collages.php?action=manage&amp;collageid=<?=$CollageID?>" class="brackets">Manage torrents</a>
<? } ?>
<a href="reports.php?action=report&amp;type=collage&amp;id=<?=$CollageID?>" class="brackets">Report collage</a>
@ -361,7 +382,8 @@ function compare($X, $Y) {
if ($GroupID != $LastGroupID) {
$LastGroupID = $GroupID;
if ($OpenGroup) { ?>
if ($OpenGroup) {
?>
</optgroup>
<? } ?>
<optgroup label="<?=$ZIPGroups[$GroupID]?>">
@ -375,7 +397,7 @@ function compare($X, $Y) {
?>
</optgroup>
</select>
<button type="button" onclick="add_selection()">+</button>
<button type="button" onclick="add_selection();">+</button>
<select name="preference" style="width: 210px;">
<option value="0"<? if ($ZIPPrefs == 0) { echo ' selected="selected"'; } ?>>Prefer Original</option>
<option value="1"<? if ($ZIPPrefs == 1) { echo ' selected="selected"'; } ?>>Prefer Best Seeded</option>
@ -572,7 +594,8 @@ function compare($X, $Y) {
//]]></script>
<?
}
} ?>
}
?>
<table class="torrent_table grouping cats" id="discog_table">
<tr class="colhead_dark">
<td><!-- expand/collapse --></td>

View File

@ -76,7 +76,7 @@
<h4 id="Intro"><a href="#Introk"><strong>&uarr;</strong></a> Introduction</h4>
<div class="box pad" style="padding: 10px 10px 10px 20px;">
<p>The uploading rules below are overwhelmingly long and detailed for a reason. The length is necessary to explain the rules clearly and thoroughly. A summary of each rule is in <span style="font-weight: bold;">bold text</span> before the actual rule for easier reading. You may also find the corresponding rule sections in the <a href="#Index">Index</a>. The corresponding <a href="#">&uarr;</a> (move one level up) and <a href="#Index">rule section links</a> (move down into the document) help provide quick navigation.</p>
<p>Before you upload anything, if you are still unsure of what a rule means, PLEASE ask your questions at any of the following points of site user support: <a href="staff.php">First-Line Support</a>, <a href="forums.php?action=viewforum&amp;forumid=8">The Help Forum</a>, or <a href="wiki.php?action=article&amp;name=IRC"><?=BOT_HELP_CHAN?> on IRC</a>. Privately message a <a href="staff.php">moderator</a> on the site if other support has directed you to a moderator or if support has been unhelpful in your particular case. If you find any dead links in the upload rules, let a <a href="staff.php">developer</a> know so it can be promptly fixed.</p>
<p>Before you upload anything, if you are still unsure of what a rule means, PLEASE ask your questions at any of the following points of site user support: <a href="staff.php">First-Line Support</a>, <a href="forums.php?action=viewforum&amp;forumid=8">the Help Forum</a>, or <a href="wiki.php?action=article&amp;name=IRC"><?=BOT_HELP_CHAN?> on IRC</a>. Send a <a href="staffpm.php">Staff PM</a> addressed to staff if other support has directed you to a moderator or if support has been unhelpful in your particular case. If you find any dead or broken links in the upload rules, send a <a href="staffpm.php">Staff PM</a> addressed to staff, and include in your message the upload rule number (e.g. <a href="#r2.4.3">2.4.3</a>) and preferably the correct link to replace the broken one.</p>
</div>
</div>
<h4 id="h1"><a href="#h1k"><strong>&uarr;</strong></a> <a href="#h1">1.</a> Uploading Rules</h4>
@ -84,12 +84,23 @@
<h5 id="h1.1"><a href="#h1.1k"><strong>&uarr;</strong></a> <a href="#h1.1">1.1.</a> General</h5>
<div class="box pad" style="padding: 10px 10px 10px 20px;">
<ul>
<li id="r1.1.1"><a href="#h1.1"><strong>&uarr;_</strong></a> <a href="#r1.1.1">1.1.1.</a> <strong>Only music, applications, comic books, ebooks, comedy (audio), audiobooks, and music-related eLearning videos are allowed on the site.</strong> </li>
<li id="r1.1.2"><a href="#h1.1"><strong>&uarr;_</strong></a> <a href="#r1.1.2">1.1.2.</a> <strong>Duplicate torrents in any category are not allowed.</strong> There are some exceptions to this rule, which are outlined in their relevant sections below.</li>
<li id="r1.1.3"><a href="#h1.1"><strong>&uarr;_</strong></a> <a href="#r1.1.3">1.1.3.</a> <strong>No freely available content in non-music sections.</strong> If you could just download something from the web, so can everyone else. Each main section explains in greater detail what "freely available" means in the context of that section. See <a href="#r2.1.9">2.1.9</a> in regards to freely available music. See <a href="#r4.1.3">4.1.3</a> in regards to freely available applications.</li>
<li id="r1.1.4"><a href="#h1.1"><strong>&uarr;_</strong></a> <a href="#r1.1.4">1.1.4.</a> <strong>Seed complete copies of your uploads.</strong> Do not upload a torrent unless you intend to seed until there are at least 1.0 distributed copies. Seeding past this minimum is strongly encouraged.</li>
<li id="r1.1.5"><a href="#h1.1"><strong>&uarr;_</strong></a> <a href="#r1.1.5">1.1.5.</a> <strong>No advertisements.</strong> Do not advertise other sites or groups in torrent descriptions, torrent directories, torrent file names, or torrent contents. We have no advertising and neither should you. Exceptions: Additional information about an artist, album, or band is acceptable, and is not considered advertising. Also, .nfo files in scene releases are not considered advertising.</li>
<li id="r1.1.6"><a href="#h1.1"><strong>&uarr;_</strong></a> <a href="#r1.1.6">1.1.6.</a> <strong>Archived files in uploads are not allowed.</strong> Exceptions: The sections that allow archived files (e.g., zip, rar, iso, etc.) are the following:
<li id="r1.1.1"><a href="#h1.1"><strong>&uarr;_</strong></a> <a href="#r1.1.1">1.1.1.</a>
<strong>Only music, applications, comic books, ebooks, comedy (audio), audiobooks, and music-related eLearning videos are allowed on the site.</strong>
</li>
<li id="r1.1.2"><a href="#h1.1"><strong>&uarr;_</strong></a> <a href="#r1.1.2">1.1.2.</a>
<strong>Duplicate torrents in any category are not allowed.</strong> There are some exceptions to this rule, which are outlined in their relevant sections below.
</li>
<li id="r1.1.3"><a href="#h1.1"><strong>&uarr;_</strong></a> <a href="#r1.1.3">1.1.3.</a>
<strong>No freely available content in non-music sections.</strong> If you could just download something from the web, so can everyone else. Each main section explains in greater detail what "freely available" means in the context of that section. See <a href="#r2.1.9">2.1.9</a> in regards to freely available music. See <a href="#r4.1.3">4.1.3</a> in regards to freely available applications.
</li>
<li id="r1.1.4"><a href="#h1.1"><strong>&uarr;_</strong></a> <a href="#r1.1.4">1.1.4.</a>
<strong>Seed complete copies of your uploads.</strong> Do not upload a torrent unless you intend to seed until there are at least 1.0 distributed copies. Seeding past this minimum is strongly encouraged.
</li>
<li id="r1.1.5"><a href="#h1.1"><strong>&uarr;_</strong></a> <a href="#r1.1.5">1.1.5.</a>
<strong>No advertisements.</strong> Do not advertise other sites or groups in torrent descriptions, torrent directories, torrent file names, or torrent contents. We have no advertising and neither should you. Exceptions: Additional information about an artist, album, or band is acceptable, and is not considered advertising. Also, .nfo files in scene releases are not considered advertising.
</li>
<li id="r1.1.6"><a href="#h1.1"><strong>&uarr;_</strong></a> <a href="#r1.1.6">1.1.6.</a>
<strong>Archived files in uploads are not allowed.</strong> Exceptions: The sections that allow archived files (e.g., zip, rar, iso, etc.) are the following:
<ul>
<li>Comic Books (.cbr and .cbz).</li>
<li>Scene released torrents in non-music categories.</li>
@ -101,26 +112,56 @@
<h5 id="h1.2"><a href="#h1.2k"><strong>&uarr;</strong></a> <a href="#h1.2">1.2.</a> Specifically Banned</h5>
<div class="box pad" style="padding: 10px 10px 10px 20px;">
<ul>
<li id="r1.2.1"><a href="#h1.2"><strong>&uarr;_</strong></a> <a href="#r1.2.1">1.2.1.</a> <strong>Anything not specifically allowed below.</strong> If you have any doubts, ask before uploading.</li>
<li id="r1.2.2"><a href="#h1.2"><strong>&uarr;_</strong></a> <a href="#r1.2.2">1.2.2.</a> <strong>Any car parts and car data programs.</strong> This ban includes programs like AllData and vendor-specific diagnostic programs such as Carsoft.</li>
<li id="r1.2.3"><a href="#h1.2"><strong>&uarr;_</strong></a> <a href="#r1.2.3">1.2.3.</a> <strong>Videos of any kind (other than eLearning Videos).</strong> No movies, no TV shows, no concerts, and no data/video tracks from enhanced CDs.</li>
<li id="r1.2.4"><a href="#h1.2"><strong>&uarr;_</strong></a> <a href="#r1.2.4">1.2.4.</a> <strong>Pornography or nudity of any kind unless it is part of the official packaging for a commercial audio release.</strong> This ban includes pictures, erotic comic books or hentai, sex manuals, erotic magazines, etc.</li>
<li id="r1.2.5"><a href="#h1.2"><strong>&uarr;_</strong></a> <a href="#r1.2.5">1.2.5.</a> <strong>Games of any kind.</strong> No games of any kind for PC, Mac, Linux, mobile devices, or any other platform are allowed.</li>
<li id="r1.2.6"><a href="#h1.2"><strong>&uarr;_</strong></a> <a href="#r1.2.6">1.2.6.</a> <strong>Collections of pictures or wallpapers are not applications.</strong> You may not upload them to any category. Commercially available template and clip art packs are acceptable for the application category (see <a href="#r4.1.9">4.1.9</a>).</li>
<li id="r1.2.7"><a href="#h1.2"><strong>&uarr;_</strong></a> <a href="#r1.2.7">1.2.7.</a> <strong>User compilations in any category.</strong> All releases, packs, or collections must be reasonably official as specified in each category.</li>
<li id="r1.2.8"><a href="#h1.2"><strong>&uarr;_</strong></a> <a href="#r1.2.8">1.2.8.</a> <strong>DRM-restricted files.</strong> Files must not be encrypted or be in a restricted format that impedes sharing. You are also highly encouraged to remove personal information from any non-DRM protected files (such as iTunes Plus releases).</li>
<li id="r1.2.1"><a href="#h1.2"><strong>&uarr;_</strong></a> <a href="#r1.2.1">1.2.1.</a>
<strong>Anything not specifically allowed below.</strong> If you have any doubts, ask before uploading.
</li>
<li id="r1.2.2"><a href="#h1.2"><strong>&uarr;_</strong></a> <a href="#r1.2.2">1.2.2.</a>
<strong>Any car parts and car data programs.</strong> This ban includes programs like AllData and vendor-specific diagnostic programs such as Carsoft.
</li>
<li id="r1.2.3"><a href="#h1.2"><strong>&uarr;_</strong></a> <a href="#r1.2.3">1.2.3.</a>
<strong>Videos of any kind (other than eLearning Videos).</strong> No movies, no TV shows, no concerts, and no data/video tracks from enhanced CDs.
</li>
<li id="r1.2.4"><a href="#h1.2"><strong>&uarr;_</strong></a> <a href="#r1.2.4">1.2.4.</a>
<strong>Pornography or nudity of any kind unless it is part of the official packaging for a commercial audio release.</strong> This ban includes pictures, erotic comic books or hentai, sex manuals, erotic magazines, etc.
</li>
<li id="r1.2.5"><a href="#h1.2"><strong>&uarr;_</strong></a> <a href="#r1.2.5">1.2.5.</a>
<strong>Games of any kind.</strong> No games of any kind for PC, Mac, Linux, mobile devices, or any other platform are allowed.
</li>
<li id="r1.2.6"><a href="#h1.2"><strong>&uarr;_</strong></a> <a href="#r1.2.6">1.2.6.</a>
<strong>Collections of pictures or wallpapers are not applications.</strong> You may not upload them to any category. Commercially available template and clip art packs are acceptable for the application category (see <a href="#r4.1.9">4.1.9</a>).
</li>
<li id="r1.2.7"><a href="#h1.2"><strong>&uarr;_</strong></a> <a href="#r1.2.7">1.2.7.</a>
<strong>User compilations in any category.</strong> All releases, packs, or collections must be reasonably official as specified in each category.
</li>
<li id="r1.2.8"><a href="#h1.2"><strong>&uarr;_</strong></a> <a href="#r1.2.8">1.2.8.</a>
<strong>DRM-restricted files.</strong> Files must not be encrypted or be in a restricted format that impedes sharing. You are also highly encouraged to remove personal information from any non-DRM protected files (such as iTunes Plus releases).
</li>
</ul>
</div>
<h5 id="h1.3"><a href="#h1.3k"><strong>&uarr;</strong></a> <a href="#h1.3">1.3.</a> Scene Uploads</h5>
<div class="box pad" style="padding: 10px 10px 10px 20px;">
<ul>
<li id="r1.3.1"><a href="#h1.3"><strong>&uarr;_</strong></a> <a href="#r1.3.1">1.3.1.</a> <strong>Do not add irrelevant credits to your torrent.</strong> Your name is credited to the upload, and there's no need to add it anywhere else.</li>
<li id="r1.3.2"><a href="#h1.3"><strong>&uarr;_</strong></a> <a href="#r1.3.2">1.3.2.</a> <strong>You may give credit to the release group (optional).</strong> If you really want to give credit to the release group, mention the full release name, including group name, in the Release description section only. Do not add this information to the Album description section.</li>
<li id="r1.3.3"><a href="#h1.3"><strong>&uarr;_</strong></a> <a href="#r1.3.3">1.3.3.</a> <strong>No NFO art pasted in the album description.</strong> Unedited NFOs are allowed within the specific torrent Release description - not in the Album page description. If you must include some information from the NFO in the Album description or Release description, include only the tracklist, album notes, and other essential information. Specific encoding settings belong in the Release description.</li>
<li id="r1.3.4"><a href="#h1.3"><strong>&uarr;_</strong></a> <a href="#r1.3.4">1.3.4.</a> <strong>Use the actual album title on the <a href="upload.php">upload page</a>; do not use the scene-given title.</strong> Naming your album_titles_like_this or your.albums.like.this is not allowed. Use the actual release title and artist. Do not use the title from the torrent folder or NFO for the scene release.</li>
<li id="r1.3.5"><a href="#h1.3"><strong>&uarr;_</strong></a> <a href="#r1.3.5">1.3.5.</a> <strong>Scene releases must be complete (as released) to use the Scene label.</strong> If you've changed the tags, unpacked the archive, removed any files, split the tracks, or altered the track naming, then it is no longer a scene release. It should not be labeled as such. If any of these changes has taken place, file names should not include any reference to the release group (see <a href="#r1.1.5">1.1.5</a>, <a href="#r2.3.2">2.3.2</a>, and <a href="#r2.3.11">2.3.11</a>).</li>
<li id="r1.3.6"><a href="#h1.3"><strong>&uarr;_</strong></a> <a href="#r1.3.6">1.3.6.</a> <strong>No protected archives.</strong> Archived releases must not be password protected.</li>
<li id="r1.3.7"><a href="#h1.3"><strong>&uarr;_</strong></a> <a href="#r1.3.7">1.3.7.</a> <strong>Scene releases in each torrent category must conform to the rules specified for their respective sections.</strong> For example, music scene releases must adhere to the music quality and formatting rules no matter how the original files were released. If the scene archives were password protected, you cannot upload them to this site unmodified. Exceptions: You may upload scene releases that originally do not fit in the rules if you can make the necessary changes within the rules. However, these modified uploads must not be labeled as scene.</li>
<li id="r1.3.1"><a href="#h1.3"><strong>&uarr;_</strong></a> <a href="#r1.3.1">1.3.1.</a>
<strong>Do not add irrelevant credits to your torrent.</strong> Your name is credited to the upload; there's no need to add it anywhere else.
</li>
<li id="r1.3.2"><a href="#h1.3"><strong>&uarr;_</strong></a> <a href="#r1.3.2">1.3.2.</a>
<strong>You may give credit to the release group (optional).</strong> If you really want to give credit to the release group, mention the full release name, including group name, in the Release description section only. Do not add this information to the Album description section.
</li>
<li id="r1.3.3"><a href="#h1.3"><strong>&uarr;_</strong></a> <a href="#r1.3.3">1.3.3.</a>
<strong>No NFO art pasted in the album description.</strong> Unedited NFOs are allowed within the specific torrent Release description - not in the Album page description. If you must include some information from the NFO in the Album description or Release description, include only the tracklist, album notes, and other essential information. Specific encoding settings belong in the Release description.
</li>
<li id="r1.3.4"><a href="#h1.3"><strong>&uarr;_</strong></a> <a href="#r1.3.4">1.3.4.</a>
<strong>Use the actual album title on the <a href="upload.php">upload page</a>; do not use the scene-given title.</strong> Naming your album_titles_like_this or your.albums.like.this is not allowed. Use the actual release title and artist. Do not use the title from the torrent folder or NFO for the scene release.
</li>
<li id="r1.3.5"><a href="#h1.3"><strong>&uarr;_</strong></a> <a href="#r1.3.5">1.3.5.</a>
<strong>Scene releases must be complete (as released) to use the Scene label.</strong> If you've changed the tags, unpacked the archive, removed any files, split the tracks, or altered the track naming, then it is no longer a scene release. It should not be labeled as such. If any of these changes has taken place, file names should not include any reference to the release group (see <a href="#r1.1.5">1.1.5</a>, <a href="#r2.3.2">2.3.2</a>, and <a href="#r2.3.11">2.3.11</a>).
</li>
<li id="r1.3.6"><a href="#h1.3"><strong>&uarr;_</strong></a> <a href="#r1.3.6">1.3.6.</a>
<strong>No protected archives.</strong> Archived releases must not be password protected.
</li>
<li id="r1.3.7"><a href="#h1.3"><strong>&uarr;_</strong></a> <a href="#r1.3.7">1.3.7.</a>
<strong>Scene releases in each torrent category must conform to the rules specified for their respective sections.</strong> For example, music scene releases must adhere to the music quality and formatting rules no matter how the original files were released. If the scene archives were password protected, you cannot upload them to this site unmodified. Exceptions: You may upload scene releases that originally do not fit in the rules if you can make the necessary changes within the rules. However, these modified uploads must not be labeled as scene.
</li>
</ul>
</div>
<h4 id="h2"><a href="#h2k"><strong>&uarr;</strong></a> <a href="#h2">2.</a> Music</h4>
@ -298,7 +339,7 @@
<li id="r2.3.5"><a href="#h2.3"><strong>&uarr;_</strong></a> <a href="#r2.3.5">2.3.5.</a> <strong>Torrents should never have [REQ] or [REQUEST] in the title or artist name.</strong> If you fill a request using the <a href="requests.php">Requests system</a>, everyone who voted for it will be automatically notified.</li>
<li id="r2.3.6"><a href="#h2.3"><strong>&uarr;_</strong></a> <a href="#r2.3.6">2.3.6.</a> <strong>Torrent album titles must accurately reflect the actual album titles.</strong> Use proper capitalization when naming your albums. Typing the album titles in all lowercase letters or all capital letters is unacceptable and makes the torrent trumpable. For detailed information on naming practices see <a href="wiki.php?action=article&amp;id=369">this wiki</a> and <a href="wiki.php?action=article&amp;id=317">this wiki</a>. Any descriptions like [Advance] or [CDM] (if you must use them) should be entered in the Edition Information box on the <a href="upload.php">upload page</a>, not in the title. Exceptions: If the album uses special capitalization, then you may follow that convention.</li>
<li id="r2.3.7"><a href="#h2.3"><strong>&uarr;_</strong></a> <a href="#r2.3.7">2.3.7.</a> <strong>The Artist field in the torrent name should contain only the artist name.</strong> Do not add additional information about the artist in the artist field unless the album credits the artist in that manner. For example, "Artist X (of Band Y)" or "Band X (feat. Artist Y)". It is recommended that you search existing torrents for the artist name so that you can be sure that you name the artist the exact same way. A torrent with a proper artist name will be grouped with the existing torrents for that artist on a common artist page, and thus will be easy to find. Capitalization problems will also make a torrent trumpable. Labeling the artist incorrectly prevents your torrent from being grouped with the other torrents for the same artist. See <a href="wiki.php?action=article&amp;id=369">this wiki</a> for more information.</li>
<li id="r2.3.8"><a href="#h2.3"><strong>&uarr;_</strong></a> <a href="#r2.3.8">2.3.8.</a> <strong>The year of the original recording should be used for the <a href="upload.php">upload page</a> "Year" field.</strong> Use the recording year for "Year of the original release" (if you can establish it), and use the option to add the release year for the album or edition you are uploading in the Edition Information on the <a href="upload.php">upload page</a>. For example, all editions of The Beatles (White Album) would have 1968 in the main Year box. However, each of the various mono pressings, remasters, re-releases, expanded editions, reconstructions, etc. would have its respective release year in the Edition Information box.</li>
<li id="r2.3.8"><a href="#h2.3"><strong>&uarr;_</strong></a> <a href="#r2.3.8">2.3.8.</a> <strong>The year of the original recording should be used for the "Year" field on the <a href="upload.php">upload page</a>.</strong> Use the recording year for "Year of the original release" (if you can establish it), and use the option to add the release year for the album or edition you are uploading in the Edition Information on the <a href="upload.php">upload page</a>. For example, all editions of The Beatles (White Album) would have 1968 in the main Year box. However, each of the various mono pressings, remasters, re-releases, expanded editions, reconstructions, etc. would have its respective release year in the Edition Information box.</li>
<li id="r2.3.9"><a href="#h2.3"><strong>&uarr;_</strong></a> <a href="#r2.3.9">2.3.9.</a> <strong>All lossless analog rips should include clear information about source lineage.</strong> All lossless SACD digital layer analog rips and vinyl rips must include clear information about recording equipment used (see <a href="#h2.8">2.8</a>). If you used a USB turntable for a vinyl rip, clearly indicate this in your lineage information. Also include all intermediate steps up to lossless encoding, such as the program used for mastering, sound card used, etc. Lossless analog rips missing rip information can be trumped by better documented lossless analog rips of equal or better quality. In order to trump a lossless analog rip without a lineage, this lineage must be included as a .txt or .log file within the new torrent.</li>
<li id="r2.3.10"><a href="#h2.3"><strong>&uarr;_</strong></a> <a href="#r2.3.10">2.3.10.</a> <strong>All lossless soundboard recordings must include clear information about source lineage.</strong> This information should be displayed in the torrent description. Optionally, the uploader may include the information in a .txt or .log file within the torrent. Lossless soundboard recordings missing lineage information will be deleted if reported (see <a href="#r2.6.7">2.6.7</a>).</li>
<li id="r2.3.11"><a href="#h2.3"><strong>&uarr;_</strong></a> <a href="#r2.3.11">2.3.11.</a> <strong>File names must accurately reflect the song titles.</strong> You may not have file names like <samp>01track.mp3</samp>, <samp>02track.mp3</samp>, etc. Torrents containing files that are named with incorrect song titles can be trumped by properly labeled torrents. Also, torrents that are sourced from the scene but do not have the Scene label must comply with site naming rules (no release group names in the file names, no advertisements in the file names, etc.). Note that these must be substantial improvements such as the removal of garbage characters. Small changes such as diacritical marks are insufficient grounds for trumping. English translations of song titles in file names are encouraged but not necessary for foreign language song titles. If all the letters in the track titles are capitalized, the torrent is trumpable. Exceptions: Rare albums featuring no track listing or untitled tracks may have file names like <samp>01track.mp3</samp>, <samp>02track.mp3</samp>, and so forth. Please note this track list in the "Album description". If foreign language characters create playback problems for some systems and cannot be coherently translated, file names such as "<samp>01track</samp>" are acceptable for those few cases.</li>
@ -306,7 +347,7 @@
<li id="r2.3.13"><a href="#h2.3"><strong>&uarr;_</strong></a> <a href="#r2.3.13">2.3.13.</a> <strong>Track numbers are required in file names (e.g., "<samp>01 - TrackName.mp3</samp>").</strong> If a torrent without track numbers in the file names is uploaded, then a torrent with the track numbers in the file names can take its place. When formatted properly, file names will sort in order by track number or playing order. Also see <a href="#r2.3.14">2.3.14</a>. Exception: Track numbers are not required for single-track torrents.</li>
<li id="r2.3.14"><a href="#h2.3"><strong>&uarr;_</strong></a> <a href="#r2.3.14">2.3.14.</a> <strong>When formatted properly, file names will alphabetically sort into the original playing order of the release.</strong>
<ul>
<li id="r2.3.14.1"><a href="#r2.3.14"><strong>&uarr;_</strong></a> <a href="#r2.3.14.1">2.3.14.1.</a><strong>For albums with more than one artist, if the name of the artist is in the filename, it must come after the track number in order for the tracks to sort into the correct order.</strong> For example, &quot;<samp>01 - U2 - Where the Streets Have No Name.flac</samp>&quot; is a properly formatted file name for a multiple-artist album. &quot;<samp>U2 - 01 - Where the Streets Have No Name.mp3</samp>&quot; is not correct in the context of a compilation album because the resultant file list will sort in alphabetical order by artist rather than by numerical track number. <strong>Note:</strong> there is no requirement for artist names to be in the track filenames, other than <a href="#r2.3.16.2">2.3.16.2.</a> Torrents that have improperly-formatted or incomplete file names will be trumpable.</li>
<li id="r2.3.14.1"><a href="#r2.3.14"><strong>&uarr;_</strong></a> <a href="#r2.3.14.1">2.3.14.1.</a><strong>For albums with more than one artist, if the name of the artist is in the file name, it must come after the track number in order for the tracks to sort into the correct order.</strong> For example, &quot;<samp>01 - U2 - Where the Streets Have No Name.flac</samp>&quot; is a properly formatted file name for a multiple-artist album. &quot;<samp>U2 - 01 - Where the Streets Have No Name.mp3</samp>&quot; is not correct in the context of a compilation album because the resultant file list will sort in alphabetical order by artist rather than by numerical track number. <strong>Note:</strong> there is no requirement for artist names to be in the track file names, other than <a href="#r2.3.16.2">2.3.16.2.</a> Torrents that have improperly-formatted or incomplete file names will be trumpable.</li>
<li id="r2.3.14.2"><a href="#r2.3.14"><strong>&uarr;_</strong></a> <a href="#r2.3.14.2">2.3.14.2.</a><strong>If a torrent has subfolders for multiple discs of a release, these subfolders must sort by disc order.</strong> If each disc has a title (<a href="torrents.php?id=62329">torrents.php?id=62329</a>, for example) and the discs are not numbered, this rule does not apply, and each subdirectory should have the disc name included.</li>
</ul>
</li>

View File

@ -80,20 +80,20 @@ function generate_staff_query($StaffLevel) {
}
$SQL = "
SELECT
m.ID,
p.Level,
$PName
m.Username,
m.Paranoia,
m.LastAccess,
i.SupportFor
FROM users_main AS m
JOIN users_info AS i ON m.ID = i.UserID
JOIN permissions AS p ON p.ID = m.PermissionID
WHERE p.DisplayStaff = '1'
AND $PLevel
ORDER BY p.Level";
SELECT
m.ID,
p.Level,
$PName
m.Username,
m.Paranoia,
m.LastAccess,
i.SupportFor
FROM users_main AS m
JOIN users_info AS i ON m.ID = i.UserID
JOIN permissions AS p ON p.ID = m.PermissionID
WHERE p.DisplayStaff = '1'
AND $PLevel
ORDER BY p.Level";
if (check_perms('users_mod')) {
$SQL .= ', m.LastAccess ASC';
} else {

View File

@ -22,7 +22,7 @@
</div>
<? View::parse('generic/reply/staffpm.php', array('Hidden' => true)); ?>
<br />
<h3>First-line Support</h3>
<h3 id="fls">First-Line Support</h3>
<p><strong>These users are not official staff members.</strong> They are users who have volunteered their time to help people in need. Please treat them with respect, and read <a href="wiki.php?action=article&amp;id=260">this</a> before contacting them.</p>
<table class="staff" width="100%">
<tr class="colhead">
@ -43,7 +43,7 @@
<br />
<div class="box pad" style="padding: 0px 10px 10px 10px;">
<br />
<h3>Forum Moderators</h3>
<h3 id="forum_mods">Forum Moderators</h3>
<p>Forum Moderators are users who have been promoted to help moderate the forums. They can only help with forum-oriented questions.</p>
<table class="staff" width="100%">
<tr class="colhead">
@ -78,7 +78,28 @@
}
$CurClass = $Class;
$CloseTable = true;
echo "\t\t<h3>".$ClassName."s</h3>\n";
$HTMLID = '';
switch ($ClassName) {
case 'Moderator':
$HTMLID = 'mods';
break;
case 'Developer':
$HTMLID = 'devs';
break;
case 'Lead Developer':
$HTMLID = 'lead_devs';
break;
case 'Administrator':
$HTMLID = 'admins';
break;
case 'Sysop':
$HTMLID = 'sysops';
break;
default:
$HTMLID = '';
}
echo "\t\t<h3 id=\"$HTMLID\">".$ClassName."s</h3>\n";
?>
<table class="staff" width="100%">
<tr class="colhead">

View File

@ -858,7 +858,7 @@ function header_link($SortKey, $DefaultWay = 'desc') {
$x = 0;
foreach ($GenreTags as $Tag) {
?>
<td width="12.5%"><a href="#" onclick="add_tag('<?=$Tag?>');return false;"><?=$Tag?></a></td>
<td width="12.5%"><a href="#" onclick="add_tag('<?=$Tag?>'); return false;"><?=$Tag?></a></td>
<?
$x++;
if ($x % 7 == 0) {
@ -877,7 +877,7 @@ function header_link($SortKey, $DefaultWay = 'desc') {
<table class="layout cat_list" width="100%">
<tr>
<td class="label">
<a class="brackets" href="#" onclick="$('#taglist').gtoggle(); if (this.innerHTML == 'View tags') { this.innerHTML = 'Hide tags'; } else { this.innerHTML = 'View tags'; }; return false;"><?=((empty($LoggedUser['ShowTags'])) ? 'View tags' : 'Hide tags')?></a>
<a class="brackets" href="#" onclick="$('#taglist').gtoggle(); if (this.innerHTML == 'View tags') { this.innerHTML = 'Hide tags'; } else { this.innerHTML = 'View tags'; }; return false;"><?=(empty($LoggedUser['ShowTags']) ? 'View tags' : 'Hide tags')?></a>
</td>
</tr>
</table>
@ -1014,7 +1014,11 @@ function header_link($SortKey, $DefaultWay = 'desc') {
$TorrentTags = new Tags($GroupInfo['TagList']);
if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5]) || !empty($ExtendedArtists[6])) {
if (!empty($ExtendedArtists[1])
|| !empty($ExtendedArtists[4])
|| !empty($ExtendedArtists[5])
|| !empty($ExtendedArtists[6])
) {
unset($ExtendedArtists[2]);
unset($ExtendedArtists[3]);
$DisplayName = Artists::display_artists($ExtendedArtists);
@ -1067,7 +1071,7 @@ function header_link($SortKey, $DefaultWay = 'desc') {
<td class="nobr"><?=time_diff($GroupTime, 1)?></td>
<td class="number_column nobr"><?=Format::get_size($MaxSize)?> (Max)</td>
<td class="number_column"><?=number_format($TotalSnatched)?></td>
<td class="number_column<?=(($TotalSeeders == 0) ? ' r00' : '')?>"><?=number_format($TotalSeeders)?></td>
<td class="number_column<?=($TotalSeeders == 0 ? ' r00' : '')?>"><?=number_format($TotalSeeders)?></td>
<td class="number_column"><?=number_format($TotalLeechers)?></td>
</tr>
<?
@ -1106,12 +1110,13 @@ function header_link($SortKey, $DefaultWay = 'desc') {
|| $Data['RemasterRecordLabel'] != $LastRemasterRecordLabel
|| $Data['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber)
|| $FirstUnknown
|| $Data['Media'] != $LastMedia) {
|| $Data['Media'] != $LastMedia
) {
$EditionID++;
?>
<tr class="group_torrent groupid_<?=$GroupID?> edition<?=$SnatchedGroupClass . (!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] == 1 ? ' hidden' : '')?>">
<td colspan="9" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=$GroupID?>, <?=$EditionID?>, this, event)" class="tooltip" title="Collapse this edition. Hold &quot;Ctrl&quot; while clicking to collapse all editions in this torrent group.">&minus;</a> <?=Torrents::edition_string($Data, $GroupInfo)?></strong></td>
<td colspan="9" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=$GroupID?>, <?=$EditionID?>, this, event);" class="tooltip" title="Collapse this edition. Hold &quot;Ctrl&quot; while clicking to collapse all editions in this torrent group.">&minus;</a> <?=Torrents::edition_string($Data, $GroupInfo)?></strong></td>
</tr>
<?
}

View File

@ -9,7 +9,7 @@
$DB->query("
SELECT last_action, LastReseedRequest, UserID, Time
FROM torrents
WHERE ID='$TorrentID'");
WHERE ID = '$TorrentID'");
list($LastActive, $LastReseedRequest, $UploaderID, $UploadedTime) = $DB->next_record();
if (!check_perms('users_mod')) {
@ -23,8 +23,8 @@
$DB->query("
UPDATE torrents
SET LastReseedRequest=NOW()
WHERE ID='$TorrentID'");
SET LastReseedRequest = NOW()
WHERE ID = '$TorrentID'");
$Group = Torrents::get_groups(array($GroupID));
extract(Torrents::array_group($Group[$GroupID]));
@ -36,7 +36,7 @@
$DB->query("
SELECT uid, MAX(tstamp) AS tstamp
FROM xbt_snatched
WHERE fid='$TorrentID'
WHERE fid = '$TorrentID'
GROUP BY uid
ORDER BY tstamp DESC
LIMIT 10");
@ -48,7 +48,7 @@
$DB->query("
SELECT UserID
FROM top_snatchers
WHERE UserID='$UserID'");
WHERE UserID = '$UserID'");
if ($DB->has_results()) {
continue;
}
@ -58,13 +58,13 @@
$TimeStamp = $User['tstamp'];
$Request = "Hi $Username,
The user [url=https://".SSL_SITE_URL."/user.php?id=$LoggedUser[ID]]$LoggedUser[Username][/url] has requested a re-seed for the torrent [url=https://".SSL_SITE_URL."/torrents.php?id=$GroupID&torrentid=$TorrentID]{$Name}[/url], which you snatched on ".date('M d Y', $TimeStamp).". The torrent is now un-seeded, and we need your help to resurrect it!
The user [url=".site_url()."user.php?id=$LoggedUser[ID]]$LoggedUser[Username][/url] has requested a re-seed for the torrent [url=".site_url()."torrents.php?id=$GroupID&torrentid=$TorrentID]{$Name}[/url], which you snatched on ".date('M d Y', $TimeStamp).". The torrent is now un-seeded, and we need your help to resurrect it!
The exact process for re-seeding a torrent is slightly different for each client, but the concept is the same. The idea is to download the .torrent file and open it in your client, and point your client to the location where the data files are, then initiate a hash check.
The exact process for re-seeding a torrent is slightly different for each client, but the concept is the same. The idea is to download the torrent file and open it in your client, and point your client to the location where the data files are, then initiate a hash check.
Thanks!";
Misc::send_pm($UserID, 0, 'Re-seed request for torrent ' . $Name, $Request);
Misc::send_pm($UserID, 0, "Re-seed request for torrent $Name", $Request);
}
$NumUsers = count($Users);
} else {
@ -73,15 +73,14 @@
$Request = "Hi $Username,
The user [url=https://".SSL_SITE_URL."/user.php?id=$LoggedUser[ID]]$LoggedUser[Username][/url] has requested a re-seed for the torrent [url=https://".SSL_SITE_URL."/torrents.php?id=$GroupID&torrentid=$TorrentID]{$Name}[/url], which you uploaded on ".date('M d Y', strtotime($UploadedTime)).". The torrent is now un-seeded, and we need your help to resurrect it!
The user [url=".site_url()."user.php?id=$LoggedUser[ID]]$LoggedUser[Username][/url] has requested a re-seed for the torrent [url=".site_url()."torrents.php?id=$GroupID&torrentid=$TorrentID]{$Name}[/url], which you uploaded on ".date('M d Y', strtotime($UploadedTime)).". The torrent is now un-seeded, and we need your help to resurrect it!
The exact process for re-seeding a torrent is slightly different for each client, but the concept is the same. The idea is to download the .torrent file and open it in your client, and point your client to the location where the data files are, then initiate a hash check.
The exact process for re-seeding a torrent is slightly different for each client, but the concept is the same. The idea is to download the torrent file and open it in your client, and point your client to the location where the data files are, then initiate a hash check.
Thanks!";
Misc::send_pm($UploaderID, 0, 'Re-seed request for torrent ' . $Name, $Request);
Misc::send_pm($UploaderID, 0, "Re-seed request for torrent $Name", $Request);
$NumUsers = 1;
}
View::show_header();
?>
@ -89,7 +88,10 @@
<div class="header">
<h2>Successfully sent re-seed request</h2>
</div>
<p>Successfully sent re-seed request for torrent <a href="torrents.php?id=<?=$GroupID?>&amp;torrentid=<?=$TorrentID?>"><?=display_str($Name)?></a> to <?=$NumUsers?> user(s).</p>
<div class="box pad thin">
<p>Successfully sent re-seed request for torrent <a href="torrents.php?id=<?=$GroupID?>&amp;torrentid=<?=$TorrentID?>"><?=display_str($Name)?></a> to <?=$NumUsers?> user<?=$NumUsers === 1 ? '' : 's';?>.</p>
</div>
</div>
<?View::show_footer();?>
<?
View::show_footer();
?>

View File

@ -23,26 +23,26 @@
$Username = db_string($_POST['Username']);
$Title = db_string($_POST['Title']);
$AdminComment = db_string($_POST['AdminComment']);
$Donor = (isset($_POST['Donor'])) ? 1 : 0;
$Artist = (isset($_POST['Artist'])) ? 1 : 0;
$Donor = isset($_POST['Donor']) ? 1 : 0;
$Artist = isset($_POST['Artist']) ? 1 : 0;
$SecondaryClasses = isset($_POST['secondary_classes']) ? $_POST['secondary_classes'] : array();
foreach ($SecondaryClasses as $i => $Val) {
if (!is_number($Val)) {
unset($SecondaryClasses[$i]);
}
}
$Visible = (isset($_POST['Visible'])) ? 1 : 0;
$Visible = isset($_POST['Visible']) ? 1 : 0;
$Invites = (int)$_POST['Invites'];
$SupportFor = db_string($_POST['SupportFor']);
$Pass = $_POST['ChangePassword'];
$Warned = (isset($_POST['Warned'])) ? 1 : 0;
$Warned = isset($_POST['Warned']) ? 1 : 0;
$Logs095 = (int)$_POST['095logs'];
if (isset($_POST['Uploaded']) && isset($_POST['Downloaded'])) {
$Uploaded = ($_POST['Uploaded'] == '' ? 0 : $_POST['Uploaded']);
$Uploaded = ($_POST['Uploaded'] === '' ? 0 : $_POST['Uploaded']);
if ($Arithmetic = strpbrk($Uploaded, '+-')) {
$Uploaded += max(-$Uploaded, Format::get_bytes($Arithmetic));
}
$Downloaded = ($_POST['Downloaded'] == '' ? 0 : $_POST['Downloaded']);
$Downloaded = ($_POST['Downloaded'] === '' ? 0 : $_POST['Downloaded']);
if ($Arithmetic = strpbrk($Downloaded, '+-')) {
$Downloaded += max(-$Downloaded, Format::get_bytes($Arithmetic));
}
@ -60,25 +60,25 @@
$ReduceWarning = (int)$_POST['ReduceWarning'];
$WarnReason = $_POST['WarnReason'];
$UserReason = $_POST['UserReason'];
$DisableAvatar = (isset($_POST['DisableAvatar'])) ? 1 : 0;
$DisableInvites = (isset($_POST['DisableInvites'])) ? 1 : 0;
$DisablePosting = (isset($_POST['DisablePosting'])) ? 1 : 0;
$DisableForums = (isset($_POST['DisableForums'])) ? 1 : 0;
$DisableTagging = (isset($_POST['DisableTagging'])) ? 1 : 0;
$DisableUpload = (isset($_POST['DisableUpload'])) ? 1 : 0;
$DisableWiki = (isset($_POST['DisableWiki'])) ? 1 : 0;
$DisablePM = (isset($_POST['DisablePM'])) ? 1 : 0;
$DisableIRC = (isset($_POST['DisableIRC'])) ? 1 : 0;
$DisableRequests = (isset($_POST['DisableRequests'])) ? 1 : 0;
$DisableLeech = (isset($_POST['DisableLeech'])) ? 0 : 1;
$DisableAvatar = isset($_POST['DisableAvatar']) ? 1 : 0;
$DisableInvites = isset($_POST['DisableInvites']) ? 1 : 0;
$DisablePosting = isset($_POST['DisablePosting']) ? 1 : 0;
$DisableForums = isset($_POST['DisableForums']) ? 1 : 0;
$DisableTagging = isset($_POST['DisableTagging']) ? 1 : 0;
$DisableUpload = isset($_POST['DisableUpload']) ? 1 : 0;
$DisableWiki = isset($_POST['DisableWiki']) ? 1 : 0;
$DisablePM = isset($_POST['DisablePM']) ? 1 : 0;
$DisableIRC = isset($_POST['DisableIRC']) ? 1 : 0;
$DisableRequests = isset($_POST['DisableRequests']) ? 1 : 0;
$DisableLeech = isset($_POST['DisableLeech']) ? 0 : 1;
$RestrictedForums = db_string(trim($_POST['RestrictedForums']));
$PermittedForums = db_string(trim($_POST['PermittedForums']));
$EnableUser = (int)$_POST['UserStatus'];
$ResetRatioWatch = (isset($_POST['ResetRatioWatch'])) ? 1 : 0;
$ResetPasskey = (isset($_POST['ResetPasskey'])) ? 1 : 0;
$ResetAuthkey = (isset($_POST['ResetAuthkey'])) ? 1 : 0;
$SendHackedMail = (isset($_POST['SendHackedMail'])) ? 1 : 0;
$ResetRatioWatch = isset($_POST['ResetRatioWatch']) ? 1 : 0;
$ResetPasskey = isset($_POST['ResetPasskey']) ? 1 : 0;
$ResetAuthkey = isset($_POST['ResetAuthkey']) ? 1 : 0;
$SendHackedMail = isset($_POST['SendHackedMail']) ? 1 : 0;
if ($SendHackedMail && !empty($_POST['HackedEmail'])) {
$HackedEmail = $_POST['HackedEmail'];
} else {
@ -161,7 +161,7 @@
// If we're deleting the user, we can ignore all the other crap
if ($_POST['UserStatus'] == 'delete' && check_perms('users_delete_users')) {
if ($_POST['UserStatus'] === 'delete' && check_perms('users_delete_users')) {
Misc::write_log("User account $UserID (".$Cur['Username'].") was deleted by ".$LoggedUser['Username']);
$DB->query("
DELETE FROM users_main
@ -169,11 +169,11 @@
$DB->query("
DELETE FROM users_info
WHERE UserID = $UserID");
$Cache->delete_value('user_info_'.$UserID);
$Cache->delete_value("user_info_$UserID");
Tracker::update_tracker('remove_user', array('passkey' => $Cur['torrent_pass']));
header("Location: log.php?search=User+".$UserID);
header("Location: log.php?search=User+$UserID");
die();
}
@ -185,7 +185,7 @@
if ($_POST['ResetRatioWatch'] && check_perms('users_edit_reset_keys')) {
$DB->query("
UPDATE users_info
SET RatioWatchEnds = '0000-00-00 00:00:00', RatioWatchDownload='0', RatioWatchTimes='0'
SET RatioWatchEnds = '0000-00-00 00:00:00', RatioWatchDownload = '0', RatioWatchTimes = '0'
WHERE UserID = '$UserID'");
$EditSummary[] = 'RatioWatch history reset';
}
@ -277,7 +277,7 @@
}
if ($Logs095 !== 0) {
$TargetScore = (($Logs095 === 100) ? 99 : 100);
$TargetScore = $Logs095 === 100 ? 99 : 100;
$Logs = $DB->query("
SELECT DISTINCT TorrentID
FROM torrents_logs_new
@ -305,7 +305,7 @@
WHERE TorrentID = $TorrentID");
$DB->set_query_id($Logs);
}
$EditSummary[] = 'EAC v0.95 logs rescored to '.$Logs095;
$EditSummary[] = "EAC v0.95 logs rescored to $Logs095";
}
// Start building SQL query and edit summary
@ -341,12 +341,12 @@
WHERE Username = '$Username'");
if ($DB->next_record() > 0) {
list($UsedUsernameID) = $DB->next_record();
error('Username already in use by <a href="user.php?id='.$UsedUsernameID."\">$Username</a>");
header('Location: user.php?id='.$UserID);
error("Username already in use by <a href=\"user.php?id=$UsedUsernameID\">$Username</a>");
header("Location: user.php?id=$UserID");
die();
} elseif ($Username == '0' || $Username == '1') {
error('You cannot set a username of "0" or "1".');
header('Location: user.php?id='.$UserID);
header("Location: user.php?id=$UserID");
die();
} else {
$UpdateSet[] = "Username = '$Username'";
@ -359,7 +359,7 @@
// Using the unescaped value for the test to avoid confusion
if (strlen($_POST['Title']) > 1024) {
error("Custom titles have a maximum length of 1,024 characters.");
header("Location: user.php?id=".$UserID);
header("Location: user.php?id=$UserID");
die();
} else {
$UpdateSet[] = "Title = '$Title'";
@ -446,12 +446,13 @@
}
if ($Warned == 1 && $Cur['Warned'] == '0000-00-00 00:00:00' && check_perms('users_warn')) {
$Weeks = 'week' . (($WarnLength == 1) ? '' : 's');
Misc::send_pm($UserID, 0, 'You have received a warning', "You have been [url=https://".SSL_SITE_URL."/wiki.php?action=article&amp;id=218]warned for $WarnLength {$Weeks}[/url] by [user]".$LoggedUser['Username']."[/user]. The reason given was: $WarnReason");
$Weeks = 'week' . $WarnLength === 1 ? '' : 's';
Misc::send_pm($UserID, 0, 'You have received a warning', "You have been [url=".site_url()."wiki.php?action=article&amp;id=218]warned for $WarnLength {$Weeks}[/url] by [user]".$LoggedUser['Username']."[/user]. The reason given was:
[quote]{$WarnReason}[/quote]");
$UpdateSet[] = "Warned = '".sqltime()."' + INTERVAL $WarnLength WEEK";
$Msg = "warned for $WarnLength $Weeks";
if ($WarnReason) {
$Msg .= " for $WarnReason";
$Msg .= " for \"$WarnReason\"";
}
$EditSummary[] = db_string($Msg);
$LightUpdates['Warned'] = time_plus(3600 * 24 * 7 * $WarnLength);
@ -462,8 +463,9 @@
$LightUpdates['Warned'] = '0000-00-00 00:00:00';
} elseif ($Warned == 1 && $ExtendWarning != '---' && check_perms('users_warn')) {
$Weeks = 'week' . (($ExtendWarning == 1) ? '' : 's');
Misc::send_pm($UserID, 0, 'Your warning has been extended', "Your warning has been extended by $ExtendWarning $Weeks by [user]".$LoggedUser['Username']."[/user]. The reason given was: $WarnReason");
$Weeks = 'week' . $ExtendWarning === 1 ? '' : 's';
Misc::send_pm($UserID, 0, 'Your warning has been extended', "Your warning has been extended by $ExtendWarning $Weeks by [user]".$LoggedUser['Username']."[/user]. The reason given was:
[quote]{$WarnReason}[/quote]");
$UpdateSet[] = "Warned = Warned + INTERVAL $ExtendWarning WEEK";
$DB->query("
@ -473,14 +475,15 @@
list($WarnedUntil) = $DB->next_record();
$Msg = "warning extended by $ExtendWarning $Weeks to $WarnedUntil";
if ($WarnReason) {
$Msg .= " for $WarnReason";
$Msg .= " for \"$WarnReason\"";
}
$EditSummary[] = db_string($Msg);
$LightUpdates['Warned'] = $WarnedUntil;
} elseif ($Warned == 1 && $ExtendWarning == '---' && $ReduceWarning != '---' && check_perms('users_warn')) {
$Weeks = 'week' . (($ReduceWarning == 1) ? '' : 's');
Misc::send_pm($UserID, 0, 'Your warning has been reduced', "Your warning has been reduced by $ReduceWarning $Weeks by [user]".$LoggedUser['Username']."[/user]. The reason given was: $WarnReason");
$Weeks = 'week' . $ReduceWarning === 1 ? '' : 's';
Misc::send_pm($UserID, 0, 'Your warning has been reduced', "Your warning has been reduced by $ReduceWarning $Weeks by [user]".$LoggedUser['Username']."[/user]. The reason given was:
[quote]{$WarnReason}[/quote]");
$UpdateSet[] = "Warned = Warned - INTERVAL $ReduceWarning WEEK";
$DB->query("
SELECT Warned - INTERVAL $ReduceWarning WEEK
@ -489,7 +492,7 @@
list($WarnedUntil) = $DB->next_record();
$Msg = "warning reduced by $ReduceWarning $Weeks to $WarnedUntil";
if ($WarnReason) {
$Msg .= " for $WarnReason";
$Msg .= " for \"$WarnReason\"";
}
$EditSummary[] = db_string($Msg);
$LightUpdates['Warned'] = $WarnedUntil;
@ -497,7 +500,7 @@
if ($SupportFor != db_string($Cur['SupportFor']) && (check_perms('admin_manage_fls') || (check_perms('users_mod') && $UserID == $LoggedUser['ID']))) {
$UpdateSet[] = "SupportFor = '$SupportFor'";
$EditSummary[] = "First-Line Support status changed to $SupportFor";
$EditSummary[] = "First-Line Support status changed to \"$SupportFor\"";
}
if ($RestrictedForums != db_string($Cur['RestrictedForums']) && check_perms('users_mod')) {
@ -525,7 +528,7 @@
$EditSummary[] = "avatar status changed";
$HeavyUpdates['DisableAvatar'] = $DisableAvatar;
if (!empty($UserReason)) {
Misc::send_pm($UserID, 0, 'Your avatar privileges have been disabled', "Your avatar privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".SSL_SITE_URL."/wiki.php?action=article&amp;name=IRC+-+How+to+join]here[/url].");
Misc::send_pm($UserID, 0, 'Your avatar privileges have been disabled', "Your avatar privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this, please join ".BOT_DISABLED_CHAN.' on our IRC network. Instructions can be found [url='.site_url().'wiki.php?action=article&amp;name=IRC+-+How+to+join]here[/url].');
}
}
@ -535,7 +538,7 @@
$HeavyUpdates['DisableLeech'] = $DisableLeech;
$HeavyUpdates['CanLeech'] = $DisableLeech;
if (!empty($UserReason)) {
Misc::send_pm($UserID, 0, 'Your leeching privileges have been disabled', "Your leeching privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN.' on our IRC network. Instructions can be found [url=https://'.SSL_SITE_URL.'/wiki.php?action=article&amp;name=IRC+-+How+to+join]here[/url].');
Misc::send_pm($UserID, 0, 'Your leeching privileges have been disabled', "Your leeching privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this, please join ".BOT_DISABLED_CHAN.' on our IRC network. Instructions can be found [url='.site_url().'wiki.php?action=article&amp;name=IRC+-+How+to+join]here[/url].');
}
Tracker::update_tracker('update_user', array('passkey' => $Cur['torrent_pass'], 'can_leech' => $DisableLeech));
}
@ -545,7 +548,7 @@
if ($DisableInvites == 1) {
//$UpdateSet[] = "Invites = '0'";
if (!empty($UserReason)) {
Misc::send_pm($UserID, 0, 'Your invite privileges have been disabled', "Your invite privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN.' on our IRC network. Instructions can be found [url=https://".SSL_SITE_URL."/wiki.php?action=article&amp;name=IRC+-+How+to+join]here[/url].');
Misc::send_pm($UserID, 0, 'Your invite privileges have been disabled', "Your invite privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this, please join ".BOT_DISABLED_CHAN.' on our IRC network. Instructions can be found [url='.site_url().'wiki.php?action=article&amp;name=IRC+-+How+to+join]here[/url].');
}
}
$EditSummary[] = 'invites status changed';
@ -557,7 +560,7 @@
$EditSummary[] = 'posting status changed';
$HeavyUpdates['DisablePosting'] = $DisablePosting;
if (!empty($UserReason)) {
Misc::send_pm($UserID, 0, 'Your forum posting privileges have been disabled', "Your forum posting privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN.' on our IRC network. Instructions can be found [url=https://".SSL_SITE_URL."/wiki.php?action=article&amp;name=IRC+-+How+to+join]here[/url].');
Misc::send_pm($UserID, 0, 'Your forum posting privileges have been disabled', "Your forum posting privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this, please join ".BOT_DISABLED_CHAN.' on our IRC network. Instructions can be found [url='.site_url().'wiki.php?action=article&amp;name=IRC+-+How+to+join]here[/url].');
}
}
@ -566,7 +569,7 @@
$EditSummary[] = 'forums status changed';
$HeavyUpdates['DisableForums'] = $DisableForums;
if (!empty($UserReason)) {
Misc::send_pm($UserID, 0, 'Your forum privileges have been disabled', "Your forum privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN.' on our IRC network. Instructions can be found [url=https://".SSL_SITE_URL."/wiki.php?action=article&amp;name=IRC+-+How+to+join]here[/url].');
Misc::send_pm($UserID, 0, 'Your forum privileges have been disabled', "Your forum privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this, please join ".BOT_DISABLED_CHAN.' on our IRC network. Instructions can be found [url='.site_url().'wiki.php?action=article&amp;name=IRC+-+How+to+join]here[/url].');
}
}
@ -575,7 +578,7 @@
$EditSummary[] = 'tagging status changed';
$HeavyUpdates['DisableTagging'] = $DisableTagging;
if (!empty($UserReason)) {
Misc::send_pm($UserID, 0, 'Your tagging privileges have been disabled', "Your tagging privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN.' on our IRC network. Instructions can be found [url=https://".SSL_SITE_URL."/wiki.php?action=article&amp;name=IRC+-+How+to+join]here[/url].');
Misc::send_pm($UserID, 0, 'Your tagging privileges have been disabled', "Your tagging privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this, please join ".BOT_DISABLED_CHAN.' on our IRC network. Instructions can be found [url='.site_url().'wiki.php?action=article&amp;name=IRC+-+How+to+join]here[/url].');
}
}
@ -584,7 +587,7 @@
$EditSummary[] = 'upload status changed';
$HeavyUpdates['DisableUpload'] = $DisableUpload;
if ($DisableUpload == 1) {
Misc::send_pm($UserID, 0, 'Your upload privileges have been disabled', "Your upload privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN.' on our IRC network. Instructions can be found [url=https://'.SSL_SITE_URL.'/wiki.php?action=article&amp;name=IRC+-+How+to+join]here[/url].');
Misc::send_pm($UserID, 0, 'Your upload privileges have been disabled', "Your upload privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this, please join ".BOT_DISABLED_CHAN.' on our IRC network. Instructions can be found [url='.site_url().'wiki.php?action=article&amp;name=IRC+-+How+to+join]here[/url].');
}
}
@ -594,7 +597,7 @@
$HeavyUpdates['DisableWiki'] = $DisableWiki;
$HeavyUpdates['site_edit_wiki'] = 0;
if (!empty($UserReason)) {
Misc::send_pm($UserID, 0, 'Your site editing privileges have been disabled', "Your site editing privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN.' on our IRC network. Instructions can be found [url=https://".SSL_SITE_URL."/wiki.php?action=article&amp;name=IRC+-+How+to+join]here[/url].');
Misc::send_pm($UserID, 0, 'Your site editing privileges have been disabled', "Your site editing privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this, please join ".BOT_DISABLED_CHAN.' on our IRC network. Instructions can be found [url='.site_url().'wiki.php?action=article&amp;name=IRC+-+How+to+join]here[/url].');
}
}
@ -604,7 +607,7 @@
$EditSummary[] = 'PM status changed';
$HeavyUpdates['DisablePM'] = $DisablePM;
if (!empty($UserReason)) {
Misc::send_pm($UserID, 0, 'Your PM privileges have been disabled', "Your PM privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN.' on our IRC network. Instructions can be found [url=https://'.SSL_SITE_URL.'/wiki.php?action=article&amp;name=IRC+-+How+to+join]here[/url].');
Misc::send_pm($UserID, 0, 'Your PM privileges have been disabled', "Your PM privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this, please join ".BOT_DISABLED_CHAN.' on our IRC network. Instructions can be found [url='.site_url().'wiki.php?action=article&amp;name=IRC+-+How+to+join]here[/url].');
}
}
@ -613,7 +616,7 @@
$EditSummary[] = 'IRC status changed';
$HeavyUpdates['DisableIRC'] = $DisableIRC;
if (!empty($UserReason)) {
Misc::send_pm($UserID, 0, 'Your IRC privileges have been disabled', "Your IRC privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN.' on our IRC network. Instructions can be found [url=https://'.SSL_SITE_URL.'/wiki.php?action=article&amp;name=IRC+-+How+to+join]here[/url]. This loss of privileges does not affect the ability to join and talk to staff in '.BOT_DISABLED_CHAN.'.');
Misc::send_pm($UserID, 0, 'Your IRC privileges have been disabled', "Your IRC privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this, please join ".BOT_DISABLED_CHAN.' on our IRC network. Instructions can be found [url='.site_url().'wiki.php?action=article&amp;name=IRC+-+How+to+join]here[/url]. This loss of privileges does not affect the ability to join and talk to staff in '.BOT_DISABLED_CHAN.'.');
}
}
@ -622,7 +625,7 @@
$EditSummary[] = 'request status changed';
$HeavyUpdates['DisableRequests'] = $DisableRequests;
if (!empty($UserReason)) {
Misc::send_pm($UserID, 0, 'Your request privileges have been disabled', "Your request privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN.' on our IRC network. Instructions can be found [url=https://'.SSL_SITE_URL.'/wiki.php?action=article&amp;name=IRC+-+How+to+join]here[/url].');
Misc::send_pm($UserID, 0, 'Your request privileges have been disabled', "Your request privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this, please join ".BOT_DISABLED_CHAN.' on our IRC network. Instructions can be found [url='.site_url().'wiki.php?action=article&amp;name=IRC+-+How+to+join]here[/url].');
}
}
@ -680,11 +683,11 @@
if ($SendHackedMail && check_perms('users_disable_any')) {
$EditSummary[] = "hacked account email sent to $HackedEmail";
Misc::send_email($HackedEmail, 'Your '.SITE_NAME.' account', 'Your '.SITE_NAME.' account appears to have been compromised. As a security measure we have disabled your account. To resolve this please visit us on IRC.
Misc::send_email($HackedEmail, 'Your '.SITE_NAME.' account', 'Your '.SITE_NAME.' account appears to have been compromised. As a security measure, we have disabled your account. To resolve this, please visit us on IRC.
This is the information to connect to our server:
IRC Server: '.BOT_SERVER.'
Port: '.BOT_PORT.' ('.BOT_PORT_SSL.' SSL)
Port: '.BOT_PORT.' ('.BOT_PORT_SSL.' for SSL)
Once you are connected to our server you will need to join our disabled users channel.
Type: /join '.BOT_DISABLED_CHAN.'
@ -705,11 +708,11 @@
SET
um.Uploaded = 0,
um.Downloaded = 0,
ui.AdminComment = CONCAT('".sqltime().' - Stats (Uploaded: '.Format::get_size($MergeUploaded).', Downloaded: '.Format::get_size($MergeDownloaded).', Ratio: '.Format::get_ratio($MergeUploaded, $MergeDownloaded).') merged into https://'.SSL_SITE_URL."/user.php?id=$UserID (".$Cur['Username'].') by '.$LoggedUser['Username']."\n\n', ui.AdminComment)
ui.AdminComment = CONCAT('".sqltime().' - Stats (Uploaded: '.Format::get_size($MergeUploaded).', Downloaded: '.Format::get_size($MergeDownloaded).', Ratio: '.Format::get_ratio($MergeUploaded, $MergeDownloaded).') merged into '.site_url()."user.php?id=$UserID (".$Cur['Username'].') by '.$LoggedUser['Username']."\n\n', ui.AdminComment)
WHERE ID = $MergeID");
$UpdateSet[] = "Uploaded = Uploaded + '$MergeUploaded'";
$UpdateSet[] = "Downloaded = Downloaded + '$MergeDownloaded'";
$EditSummary[] = 'stats merged from https://'.SSL_SITE_URL."/user.php?id=$MergeID ($MergeStatsFrom) (previous stats: Uploaded: ".Format::get_size($Cur['Uploaded']).', Downloaded: '.Format::get_size($Cur['Downloaded']).', Ratio: '.Format::get_ratio($Cur['Uploaded'], $Cur['Downloaded']).')';
$EditSummary[] = 'stats merged from '.site_url()."user.php?id=$MergeID ($MergeStatsFrom) (previous stats: Uploaded: ".Format::get_size($Cur['Uploaded']).', Downloaded: '.Format::get_size($Cur['Downloaded']).', Ratio: '.Format::get_ratio($Cur['Uploaded'], $Cur['Downloaded']).')';
$Cache->delete_value("users_stats_$UserID");
$Cache->delete_value("users_stats_$MergeID");
}

View File

@ -33,7 +33,7 @@ source torrents : torrents_base {
sql_query_pre = set group_concat_max_len = 101400
sql_query_pre = set @starttime = now()
sql_query_pre = replace into sphinx_index_last_id values ('torrents', unix_timestamp(@starttime))
sql_query_pre = replace into sphinx_index_last_pos values ('torrents', unix_timestamp(@starttime))
sql_query_pre = truncate sphinx_tg
sql_query_pre = insert into sphinx_tg \
@ -89,7 +89,7 @@ source torrents : torrents_base {
select t.id, aname from sphinx_a join sphinx_t t using(gid) order by t.id asc;
sql_query_post_index = delete from sphinx_delta where time <= \
(select id from sphinx_index_last_id where type='torrents')
(select id from sphinx_index_last_pos where type='torrents')
}
index torrents {
@ -325,7 +325,7 @@ source requests : connect {
sql_query_pre = TRUNCATE TABLE sphinx_requests
sql_query_pre = SET group_concat_max_len = 10140
sql_query_pre = SET @StartTime = NOW()
sql_query_pre = REPLACE INTO sphinx_index_last_id VALUES ('requests', UNIX_TIMESTAMP(@StartTime))
sql_query_pre = REPLACE INTO sphinx_index_last_pos VALUES ('requests', UNIX_TIMESTAMP(@StartTime))
sql_query_pre = INSERT INTO sphinx_requests ( \
ID, UserID, TimeAdded, LastVote, CategoryID, Title, \
@ -363,7 +363,7 @@ source requests : connect {
FROM sphinx_requests
sql_query_post_index = DELETE FROM sphinx_requests_delta WHERE TimeAdded <= \
(SELECT id FROM sphinx_index_last_id WHERE type='requests')
(SELECT id FROM sphinx_index_last_pos WHERE type='requests')
sql_attr_multi = uint TagID from query; \
SELECT RequestID AS ID, TagID FROM requests_tags
@ -415,10 +415,10 @@ source log : connect {
sql_attr_uint = Time
sql_query = SELECT ID, UNIX_TIMESTAMP(Time) AS Time, Message FROM log
sql_query_info = SELECT * FROM log WHERE ID = $id
sql_query_post_index = REPLACE INTO sphinx_index_last_id VALUES ('log', $maxid)
sql_query_post_index = REPLACE INTO sphinx_index_last_pos VALUES ('log', $maxid)
}
source log_delta : log {
sql_query_pre = SELECT ID FROM sphinx_index_last_id WHERE Type = 'log' INTO @LastID
sql_query_pre = SELECT ID FROM sphinx_index_last_pos WHERE Type = 'log' INTO @LastID
sql_query = SELECT ID, UNIX_TIMESTAMP(Time) AS Time, Message FROM log WHERE ID > @LastID
sql_query_post_index = SET @nothing = 0
}