mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-02-21 20:59:02 +00:00
Empty commit
This commit is contained in:
parent
45e0062124
commit
df412204f2
@ -62,6 +62,12 @@ class TEXT {
|
||||
* @var int $InQuotes
|
||||
*/
|
||||
private $InQuotes = 0;
|
||||
|
||||
/**
|
||||
* Used to [hide] quote trains beyond the specified depth
|
||||
* @var int $QuoteHideDepth
|
||||
*/
|
||||
private $QuoteHideDepth = 5;
|
||||
|
||||
/**
|
||||
* Array of headlines for Table Of Contents (TOC)
|
||||
@ -684,17 +690,24 @@ private function to_html ($Array) {
|
||||
case 'quote':
|
||||
$this->NoImg++; // No images inside quote tags
|
||||
$this->InQuotes++;
|
||||
if($this->InQuotes == $this->QuoteHideDepth) { //Put quotes that are nested beyond the specified limit in [hide] tags.
|
||||
$Str.='<strong>Older quotes</strong>: <a href="javascript:void(0);" onclick="BBCode.spoiler(this);">Show</a>';
|
||||
$Str.='<blockquote class="hidden spoiler">';
|
||||
}
|
||||
if(!empty($Block['Attr'])) {
|
||||
$Exploded = explode("|", $this->to_html($Block['Attr']));
|
||||
if(isset($Exploded[1]) && is_numeric($Exploded[1])) {
|
||||
$PostID = trim($Exploded[1]);
|
||||
$Str.= '<a href="#" onclick="QuoteJump('.$PostID.'); return false;"><strong class="quoteheader">'.$Exploded[0].'</strong> wrote: </a>';
|
||||
$Str.= '<a href="#" onclick="QuoteJump('.$PostID.'); return false;"><strong class="quoteheader">'.$Exploded[0].'</strong> wrote: </a>';
|
||||
}
|
||||
else {
|
||||
$Str.= '<strong class="quoteheader">'.$Exploded[0].'</strong> wrote: ';
|
||||
}
|
||||
}
|
||||
$Str.='<blockquote>'.$this->to_html($Block['Val']).'</blockquote>';
|
||||
if($this->InQuotes == $this->QuoteHideDepth) { //Close quote the deeply nested quote [hide].
|
||||
$Str.='</blockquote><br />'; // Ensure new line after quote train hiding
|
||||
}
|
||||
$this->NoImg--;
|
||||
$this->InQuotes--;
|
||||
break;
|
||||
|
@ -111,7 +111,7 @@ public static function lookup_ip($IP) {
|
||||
if(count($Output) != 5) {
|
||||
return false;
|
||||
} else {
|
||||
return $Output[4];
|
||||
return trim($Output[4]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -153,7 +153,6 @@
|
||||
}
|
||||
*/
|
||||
|
||||
// Start printing
|
||||
View::show_header($ThreadInfo['Title'] . ' < '.$Forums[$ForumID]['Name'].' < '. 'Forums','comments,subscriptions,bbcode,jquery');
|
||||
?>
|
||||
<div class="thin">
|
||||
|
64
sections/reports/ajax_resolve_report.php
Normal file
64
sections/reports/ajax_resolve_report.php
Normal file
@ -0,0 +1,64 @@
|
||||
<?
|
||||
authorize();
|
||||
|
||||
if((!check_perms('admin_reports') && !check_perms('project_team') && !check_perms('site_moderate_forums')) || (empty($_POST['reportid']) && !is_number($_POST['reportid']))) {
|
||||
ajax_error();
|
||||
}
|
||||
|
||||
$ReportID = $_POST['reportid'];
|
||||
|
||||
$DB->query("SELECT Type FROM reports WHERE ID = ".$ReportID);
|
||||
list($Type) = $DB->next_record();
|
||||
if(!check_perms('admin_reports')) {
|
||||
if(check_perms('site_moderate_forums')) {
|
||||
if(!in_array($Type, array('collages_comment', 'post', 'requests_comment', 'thread', 'torrents_comment'))) {
|
||||
ajax_error();
|
||||
}
|
||||
} else if(check_perms('project_team')) {
|
||||
if($Type != "request_update") {
|
||||
ajax_error();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$DB->query("UPDATE reports
|
||||
SET Status='Resolved',
|
||||
ResolvedTime='".sqltime()."',
|
||||
ResolverID='".$LoggedUser['ID']."'
|
||||
WHERE ID='".db_string($ReportID)."'");
|
||||
|
||||
|
||||
$Channels = array();
|
||||
|
||||
if($Type == "request_update") {
|
||||
$Channels[] = "#requestedits";
|
||||
$Cache->decrement('num_update_reports');
|
||||
}
|
||||
|
||||
if(in_array($Type, array('collages_comment', 'post', 'requests_comment', 'thread', 'torrents_comment'))) {
|
||||
$Channels[] = "#forumreports";
|
||||
$Cache->decrement('num_forum_reports');
|
||||
}
|
||||
|
||||
|
||||
$DB->query("SELECT COUNT(ID) FROM reports WHERE Status = 'New'");
|
||||
list($Remaining) = $DB->next_record();
|
||||
|
||||
foreach($Channels as $Channel) {
|
||||
send_irc("PRIVMSG ".$Channel." :Report ".$ReportID." resolved by ".preg_replace("/^(.{2})/", "$1·", $LoggedUser['Username'])." on site (".(int)$Remaining." remaining).");
|
||||
}
|
||||
|
||||
$Cache->delete_value('num_other_reports');
|
||||
|
||||
ajax_success();
|
||||
|
||||
function ajax_error($Error = "error") {
|
||||
echo json_encode(array("status"=>$Error));
|
||||
die();
|
||||
}
|
||||
|
||||
function ajax_success() {
|
||||
echo json_encode(array("status"=>"success"));
|
||||
die();
|
||||
}
|
||||
?>
|
@ -33,6 +33,9 @@
|
||||
case 'unclaim':
|
||||
include(SERVER_ROOT.'/sections/reports/ajax_unclaim_report.php');
|
||||
break;
|
||||
case 'resolve':
|
||||
include(SERVER_ROOT.'/sections/reports/ajax_resolve_report.php');
|
||||
break;
|
||||
default:
|
||||
include(SERVER_ROOT.'/sections/reports/reports.php');
|
||||
break;
|
||||
|
@ -93,7 +93,7 @@
|
||||
$Type = $Types[$Short];
|
||||
$Reference = "reports.php?id=" . $ReportID . "#report" . $ReportID;
|
||||
?>
|
||||
<div id="report<?=$ReportID?>">
|
||||
<div id="report_<?=$ReportID?>">
|
||||
<table cellpadding="5" id="report_<?=$ReportID?>">
|
||||
<tr>
|
||||
<td><strong><a href="<?=$Reference?>">Report #<?=$ReportID?></a></strong></td>
|
||||
@ -230,9 +230,8 @@
|
||||
<? if ($Status != "Resolved") { ?>
|
||||
<tr>
|
||||
<td class="center" colspan="2">
|
||||
<form class="manage_form" name="report" action="reports.php" method="post">
|
||||
<form id="report_form_<?=$ReportID?>">
|
||||
<input type="hidden" name="reportid" value="<?=$ReportID?>" />
|
||||
<input type="hidden" name="action" value="takeresolve" />
|
||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||
<input type="submit" onclick="return resolve(<?=$ReportID?>, <?=($ClaimerID == $LoggedUser['ID'] || !$ClaimerID) ? "true" : "false"?>)" name="submit" value="Resolve" />
|
||||
</form>
|
||||
|
@ -231,7 +231,7 @@
|
||||
</li>
|
||||
<li id="r2.1.24"><a href="#h2.1"><strong>↑_</strong></a> <a href="#r2.1.24">2.1.24.</a> <strong>Lossy AAC torrents may only be uploaded when they represent exclusive content not currently available in any other format (e.g., an iTunes WEB exclusive release).</strong> </li>
|
||||
<li id="r2.1.25"><a href="#h2.1"><strong>↑_</strong></a> <a href="#r2.1.25">2.1.25.</a> <strong>No HDCD content may be uploaded to the site.</strong> There are inherent problems with ripping this format, and other forms of high-resolution audio are both more prevalent and preferred at this time (e.g., vinyl, SACD, Blu-ray, etc.). Any CD bearing the HDCD logo can still be ripped using the usual methods for ripping normal audio CDs. See <a href="wiki.php?action=article&id=875">this wiki</a> for more details on the media format.</li>
|
||||
<li id="r2.1.26"><a href="#h2.1"><strong>↑_</strong></a> <a href="#r2.1.26">2.1.26.</a> <strong> Downsampling of digital sources is allowed for certain media types.</strong> Downsampling of CD sources is strictly prohibited. Downsampling of WEB sources is allowed for audio files sampled at 96 kHz and above. If the WEB source is already sampled at a rate of either 44.1 kHz or 48 kHz you may not downsample the audio files any further. Downsampling of SACD, DVD, or Blu-ray sources is allowed in certain cases. See <a href="#r2.8.5">2.8.5</a>, <a href="#r2.7.3">2.7.3</a>, and <a href="#r2.9.5">2.9.5</a> for more information.</li>
|
||||
<li id="r2.1.26"><a href="#h2.1"><strong>↑_</strong></a> <a href="#r2.1.26">2.1.26.</a> <strong> Downsampling of digital sources is allowed for certain media types.</strong> Downsampling of CD sources is strictly prohibited. Downsampling of WEB sources is allowed for audio files sampled at 88.2 kHz and above. If the WEB source is already sampled at a rate of either 44.1 kHz or 48 kHz you may not downsample the audio files any further. Downsampling of SACD, DVD, or Blu-ray sources is allowed in certain cases. See <a href="#r2.8.5">2.8.5</a>, <a href="#r2.7.3">2.7.3</a>, and <a href="#r2.9.5">2.9.5</a> for more information.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h5 id="h2.2"><a href="#h2.2k"><strong>↑</strong></a> <a href="#h2.2">2.2.</a> Duplicates & Trumping</h5>
|
||||
|
@ -45,14 +45,26 @@ function unClaim(id) {
|
||||
}
|
||||
|
||||
function resolve(id, claimer) {
|
||||
var answer = true;
|
||||
if (!claimer) {
|
||||
if ($('#claimed_' + id).raw()) {
|
||||
var answer = confirm("This is a claimed report, are you sure you want to resolve it?");
|
||||
if (answer)
|
||||
return true;
|
||||
answer = true;
|
||||
else
|
||||
return false;
|
||||
answer = false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
if (answer) {
|
||||
ajax.post('reports.php?action=resolve', 'report_form_' + id, function (response) {
|
||||
var json = JSON.parse(response);
|
||||
if (json['status'] == 'success') {
|
||||
$('#report_' + id).remove();
|
||||
} else {
|
||||
alert(json['status']);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user