mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-18 20:21:37 +00:00
Empty commit
This commit is contained in:
parent
c9d6291563
commit
157fde11dd
@ -34,27 +34,26 @@
|
||||
$Cache->cache_value($Type.'_edits_'.$PostID, $Edits, 0);
|
||||
}
|
||||
|
||||
list($UserID, $Username, $Time) = $Edits[$Depth];
|
||||
if($Depth != 0) {
|
||||
list($UserID, $Username, $Time, $Body) = $Edits[$Depth - 1];
|
||||
list(,,,$Body) = $Edits[$Depth - 1];
|
||||
} else {
|
||||
//Not an edit, have to get from the original
|
||||
switch($Type) {
|
||||
case 'forums' :
|
||||
//Get from normal forum stuffs
|
||||
$DB->query("SELECT fp.AuthorID, um.Username, fp.AddedTime, fp.Body
|
||||
FROM forums_posts AS fp
|
||||
JOIN users_main AS um ON um.ID=fp.AuthorID
|
||||
WHERE fp.ID = ".$PostID);
|
||||
list($UserID, $Username, $Time, $Body) = $DB->next_record();
|
||||
$DB->query("SELECT Body
|
||||
FROM forums_posts
|
||||
WHERE ID = ".$PostID);
|
||||
list($Body) = $DB->next_record();
|
||||
break;
|
||||
case 'collages' :
|
||||
case 'requests' :
|
||||
case 'torrents' :
|
||||
$DB->query("SELECT c.AuthorID, um.Username, c.AddedTime, c.Body
|
||||
FROM ".$Type."_comments AS c
|
||||
JOIN users_main AS um ON um.ID=c.AuthorID
|
||||
WHERE c.ID = ".$PostID);
|
||||
list($UserID, $Username, $Time, $Body) = $DB->next_record();
|
||||
$DB->query("SELECT Body
|
||||
FROM ".$Type."_comments
|
||||
WHERE ID = ".$PostID);
|
||||
list($Body) = $DB->next_record();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -92,7 +92,7 @@
|
||||
|
||||
$DB->query("INSERT INTO comments_edits (Page, PostID, EditUser, EditTime, Body)
|
||||
VALUES ('forums', ".$PostID.", ".$UserID.", '".sqltime()."', '".db_string($OldBody)."')");
|
||||
|
||||
$Cache->delete_value("forums_edits_$PostID");
|
||||
// This gets sent to the browser, which echoes it in place of the old body
|
||||
echo $Text->full_format($_POST['body']);
|
||||
?>
|
||||
|
@ -17,11 +17,21 @@
|
||||
|
||||
// Check for lame SQL injection attempts
|
||||
if(!isset($_GET['threadid']) || !is_number($_GET['threadid'])) {
|
||||
if(!isset($_GET['topicid']) || !is_number($_GET['topicid'])) {
|
||||
error('404');
|
||||
} else {
|
||||
if(isset($_GET['topicid']) && is_number($_GET['topicid'])) {
|
||||
$ThreadID = $_GET['topicid'];
|
||||
}
|
||||
elseif(isset($_GET['postid']) && is_number($_GET['postid'])) {
|
||||
$DB->query("SELECT TopicID FROM forums_posts WHERE ID = $_GET[postid]");
|
||||
list($ThreadID) = $DB->next_record();
|
||||
if($ThreadID) {
|
||||
header("Location: forums.php?action=viewthread&threadid=$ThreadID&postid=$_GET[postid]#post$_GET[postid]");
|
||||
die();
|
||||
} else {
|
||||
error(404);
|
||||
}
|
||||
} else {
|
||||
error(404);
|
||||
}
|
||||
} else {
|
||||
$ThreadID = $_GET['threadid'];
|
||||
}
|
||||
|
@ -460,7 +460,7 @@
|
||||
} elseif($EnableUser == '1') {
|
||||
$Cache->increment('stats_user_count');
|
||||
$UpdateSet[]="i.RatioWatchDownload='0'";
|
||||
if ($Cur['Uploaded']/$Cur['Downloaded'] >= $Cur['RequiredRatio']) {
|
||||
if (($Cur['Downloaded'] == 0) || ($Cur['Uploaded']/$Cur['Downloaded'] >= $Cur['RequiredRatio'])) {
|
||||
$UpdateSet[]="i.RatioWatchEnds='0000-00-00 00:00:00'";
|
||||
$CanLeech = 1;
|
||||
$UpdateSet[]="m.can_leech='1'";
|
||||
|
Loading…
Reference in New Issue
Block a user