Empty commit

This commit is contained in:
Git 2012-03-04 08:00:21 +00:00
parent d2f656d583
commit d35695031a
12 changed files with 80 additions and 18 deletions

View File

@ -1336,7 +1336,7 @@ function update_hash($GroupID) {
GROUP BY t.GroupID)
WHERE ID='$GroupID'");
$DB->query("REPLACE INTO sphinx_delta (ID, GroupName, TagList, Year, CategoryID, Time, ReleaseType, CatalogueNumber, Size, Snatched, Seeders, Leechers, LogScore, Scene, HasLog, HasCue, FreeTorrent, Media, Format, Encoding, RemasterTitle, FileList)
$DB->query("REPLACE INTO sphinx_delta (ID, GroupName, TagList, Year, CategoryID, Time, ReleaseType, RecordLabel, CatalogueNumber, VanityHouse, Size, Snatched, Seeders, Leechers, LogScore, Scene, HasLog, HasCue, FreeTorrent, Media, Format, Encoding, RemasterYear, RemasterTitle, RemasterRecordLabel, RemasterCatalogueNumber, FileList)
SELECT
g.ID AS ID,
g.Name AS GroupName,
@ -1345,7 +1345,9 @@ function update_hash($GroupID) {
g.CategoryID,
UNIX_TIMESTAMP(g.Time) AS Time,
g.ReleaseType,
g.RecordLabel,
g.CatalogueNumber,
g.VanityHouse,
MAX(CEIL(t.Size/1024)) AS Size,
SUM(t.Snatched) AS Snatched,
SUM(t.Seeders) AS Seeders,
@ -1358,7 +1360,10 @@ function update_hash($GroupID) {
GROUP_CONCAT(DISTINCT t.Media SEPARATOR ' ') AS Media,
GROUP_CONCAT(DISTINCT t.Format SEPARATOR ' ') AS Format,
GROUP_CONCAT(DISTINCT t.Encoding SEPARATOR ' ') AS Encoding,
GROUP_CONCAT(DISTINCT t.RemasterYear SEPARATOR ' ') AS RemasterYear,
GROUP_CONCAT(DISTINCT t.RemasterTitle SEPARATOR ' ') AS RemasterTitle,
GROUP_CONCAT(DISTINCT t.RemasterRecordLabel SEPARATOR ' ') AS RemasterRecordLabel,
GROUP_CONCAT(DISTINCT t.RemasterCatalogueNumber SEPARATOR ' ') AS RemasterCatalogueNumber,
GROUP_CONCAT(REPLACE(REPLACE(FileList, '|||', '\n '), '_', ' ') SEPARATOR '\n ') AS FileList
FROM torrents AS t
JOIN torrents_group AS g ON g.ID=t.GroupID

View File

@ -625,7 +625,7 @@ CREATE TABLE `sphinx_delta` (
`Media` varchar(255) DEFAULT NULL,
`Format` varchar(255) DEFAULT NULL,
`Encoding` varchar(255) DEFAULT NULL,
`RemasterYear` int(4) DEFAULT NULL,
`RemasterYear` varchar(50) DEFAULT NULL,
`RemasterTitle` varchar(512) DEFAULT NULL,
`RemasterRecordLabel` varchar(50) DEFAULT NULL,
`RemasterCatalogueNumber` varchar(50) DEFAULT NULL,
@ -657,7 +657,7 @@ CREATE TABLE `sphinx_hash` (
`Media` varchar(255) DEFAULT NULL,
`Format` varchar(255) DEFAULT NULL,
`Encoding` varchar(255) DEFAULT NULL,
`RemasterYear` int(4) DEFAULT NULL,
`RemasterYear` varchar(50) DEFAULT NULL,
`RemasterTitle` varchar(512) DEFAULT NULL,
`RemasterRecordLabel` varchar(50) DEFAULT NULL,
`RemasterCatalogueNumber` varchar(50) DEFAULT NULL,

View File

@ -5,7 +5,7 @@
<div class="thin">
<h3 id="forums">Donation Complete</h3>
<div class="box pad" style="padding:10px 10px 10px 20px;">
<p>Thank you for your donation! If this is your first time donating you will now have recieved 2 invitations and a <img src="<?=STATIC_SERVER?>common/symbols/donor.png" alt="Donor" />.</p>
<p>Thank you for your donation! If this is your first time donating you will now have received 2 invitations and a <img src="<?=STATIC_SERVER?>common/symbols/donor.png" alt="Donor" />.</p>
</div>
</div>
<? show_footer();?>

View File

@ -80,7 +80,7 @@
<?
if(USER_LIMIT != 0 && $UserCount >= USER_LIMIT && !check_perms('site_can_invite_always') && !isset($DonorPerms['site_can_invite_always'])) {
?>
<li class="warning">Note: Because the user limit has been reached, you will be unable to use the invites recieved until a later date.</li>
<li class="warning">Note: Because the user limit has been reached, you will be unable to use the invites received until a later date.</li>
<? } ?>
<li>A warm fuzzy feeling.</li>

View File

@ -80,7 +80,7 @@
<?
if(USER_LIMIT != 0 && $UserCount >= USER_LIMIT && !check_perms('site_can_invite_always') && !isset($DonorPerms['site_can_invite_always'])) {
?>
<li class="warning">Note: Because the user limit has been reached, you will be unable to use the invites recieved until a later date.</li>
<li class="warning">Note: Because the user limit has been reached, you will be unable to use the invites received until a later date.</li>
<? } ?>
<li>Immunity to inactivity pruning.</li>
<li>Access to an ever growing list of exclusive features, including the ability to submit requests and personal collages.</li>

View File

@ -378,9 +378,12 @@
$TagsStr = '';
if ($TagList) {
// No vanity.house tag.
$Tags = explode(' ', str_replace('_', '.', str_replace('vanity_house', '', $TagList)));
$Tags = explode(' ', str_replace('_', '.', $TagList));
$TagLinks = array();
foreach ($Tags as $Tag) {
if ($Tag == 'vanity.house') {
continue;
}
$TagLinks[] = "<a href=\"torrents.php?action=basic&taglist=$Tag\">$Tag</a> ";
}
$TagStr = "<br />\n<div class=\"tags\">".implode(', ', $TagLinks).'</div>';

View File

@ -918,7 +918,7 @@ function next_hour() {
$TorrentAlerts[$UserID]['Count']++;
}
foreach($TorrentAlerts as $UserID => $MessageInfo){
send_pm($UserID, 0, db_string('Unseeded torrent notification'), db_string($MessageInfo['Count']." of your upload".($MessageInfo['Count']>1?'s':'')." 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=http://what.cd/wiki.php?action=article&id=663]here[/url].\n\nThe following torrent".($MessageInfo['Count']>1?'s':'')." will be removed for inactivity:".$MessageInfo['Msg']."\n\nIf you no longer wish to recieve these notifications, please disable them in your profile settings."));
send_pm($UserID, 0, db_string('Unseeded torrent notification'), db_string($MessageInfo['Count']." of your upload".($MessageInfo['Count']>1?'s':'')." 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=http://what.cd/wiki.php?action=article&id=663]here[/url].\n\nThe following torrent".($MessageInfo['Count']>1?'s':'')." will be removed for inactivity:".$MessageInfo['Msg']."\n\nIf you no longer wish to receive these notifications, please disable them in your profile settings."));
}
}
}

View File

@ -0,0 +1,37 @@
<?
//TODO: make this use the cache version of the thread, save the db query
/*********************************************************************\
//--------------Get Post--------------------------------------------//
This gets the raw BBCode of a post. It's used for editing and
quoting posts.
It gets called if $_GET['action'] == 'get_post'. It requires
$_GET['post'], which is the ID of the post.
\*********************************************************************/
// Quick SQL injection check
if(!$_GET['post'] || !is_number($_GET['post'])){
error(0);
}
// Variables for database input
$PostID = $_GET['post'];
// Message is selected providing the user quoting is the guy who opened the PM or has
// the right level
$DB->query("SELECT m.Message, c.Level, c.UserID
FROM staff_pm_messages as m
JOIN staff_pm_conversations AS c ON m.ConvID=c.ID
WHERE m.ID='$PostID'");
list($Message, $Level, $UserID) = $DB->next_record(MYSQLI_NUM);
if (($LoggedUser['ID'] == $UserID) || ($IsFLS && $LoggedUser['Class'] >= $Level)) {
// This gets sent to the browser, which echoes it wherever
echo trim($Message);
} else {
error(403);
}
?>

View File

@ -57,6 +57,9 @@
case 'preview':
require('ajax_preview_response.php');
break;
case 'get_post':
require('get_post.php');
break;
default:
if ($IsStaff || $IsFLS) {
require('staff_inbox.php');

View File

@ -25,7 +25,8 @@
$UserInfo = user_info($UserID);
$UserStr = format_username($UserID, $UserInfo['Username'], $UserInfo['Donor'], $UserInfo['Warned'], $UserInfo['Enabled'], $UserInfo['PermissionID']);
$OwnerID = $UserID;
$OwnerID = $UserID;
$OwnerName = $UserInfo['Username'];
?>
<div id="thin">
@ -60,18 +61,19 @@
<div id="inbox">
<?
// Get messages
$StaffPMs = $DB->query("SELECT UserID, SentDate, Message FROM staff_pm_messages WHERE ConvID=$ConvID");
$StaffPMs = $DB->query("SELECT UserID, SentDate, Message, ID FROM staff_pm_messages WHERE ConvID=$ConvID");
while(list($UserID, $SentDate, $Message) = $DB->next_record()) {
while(list($UserID, $SentDate, $Message, $MessageID) = $DB->next_record()) {
// Set user string
if ($UserID == $OwnerID) {
// User, use prepared string
$UserString = $UserStr;
$Username = $OwnerName;
} else {
// Staff/FLS
$UserInfo = user_info($UserID);
$UserString = format_username($UserID, $UserInfo['Username'], $UserInfo['Donor'], $UserInfo['Warned'], $UserInfo['Enabled'], $UserInfo['PermissionID']);
$Username = $UserInfo['Username'];
}
?>
<div class="box vertical_space">
@ -81,7 +83,9 @@
</strong>
<?=time_diff($SentDate, 2, true)?>
<? if ($Status != 'Resolved') { ?>
- <a href="#quickpost" onclick="Quote('<?=$MessageID?>','<?=$Username?>');">[Quote]</a>
<? } ?>
</div>
<div class="body"><?=$Text->full_format($Message)?></div>
</div>

View File

@ -407,7 +407,7 @@ function header_link($SortKey,$DefaultWay="desc") {
<tr>
<td class="label">Catalogue Number:</td>
<td>
<input type="text" size="40" name="cataloguenumber" class="inputtext smallest" value="<?form('"cataloguenumber"')?>" />
<input type="text" size="40" name="cataloguenumber" class="inputtext smallest" value="<?form('cataloguenumber')?>" />
</td>
<td class="label">Year:</td>
<td>

View File

@ -106,7 +106,17 @@ function PreviewMessage() {
}
}
function Quote(post, user) {
username = user;
postid = post;
ajax.get("?action=get_post&post=" + postid, function(response){
if ($('#quickpost').raw().value !== '') {
$('#quickpost').raw().value = $('#quickpost').raw().value + "\n\n";
}
$('#quickpost').raw().value = $('#quickpost').raw().value + "[quote="+username+"]" +
//response.replace(/(img|aud)(\]|=)/ig,'url$2').replace(/\[url\=(https?:\/\/[^\s\[\]<>"\'()]+?)\]\[url\](.+?)\[\/url\]\[\/url\]/gi, "[url]$1[/url]")
html_entity_decode(response)
+ "[/quote]";
resize('quickpost');
});
}