mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-18 12:11:36 +00:00
Empty commit
This commit is contained in:
parent
8bbc4b1511
commit
529f8a9d01
@ -201,7 +201,7 @@ private function valid_url ($Str, $Extension = '', $Inline = false) {
|
||||
return preg_match($Regex, $Str, $Matches);
|
||||
}
|
||||
|
||||
public function local_url ($Str) {
|
||||
public function local_url($Str) {
|
||||
$URLInfo = parse_url($Str);
|
||||
if (!$URLInfo) {
|
||||
return false;
|
||||
@ -210,14 +210,17 @@ public function local_url ($Str) {
|
||||
// If for some reason your site does not require subdomains or contains a directory in the SITE_URL, revert to the line below.
|
||||
//if ($Host == NONSSL_SITE_URL || $Host == SSL_SITE_URL || $Host == 'www.'.NONSSL_SITE_URL) {
|
||||
if (empty($URLInfo['port']) && preg_match('/(\S+\.)*'.NONSSL_SITE_URL.'/', $Host)) {
|
||||
$URL = '/'.ltrim($URLInfo['path'], '/'); // Things break if the path starts with '//'
|
||||
$URL = '';
|
||||
if (!empty($URLInfo['path'])) {
|
||||
$URL .= ltrim($URLInfo['path'], '/'); // Things break if the path starts with '//'
|
||||
}
|
||||
if (!empty($URLInfo['query'])) {
|
||||
$URL .= '?'.$URLInfo['query'];
|
||||
$URL .= "?$URLInfo[query]";
|
||||
}
|
||||
if (!empty($URLInfo['fragment'])) {
|
||||
$URL .= '#'.$URLInfo['fragment'];
|
||||
$URL .= "#$URLInfo[fragment]";
|
||||
}
|
||||
return $URL;
|
||||
return $URL ? "/$URL" : false;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
@ -1,5 +1,8 @@
|
||||
CHANGE LOG
|
||||
|
||||
2013-11-06 by Y
|
||||
Add multi-key functionality to the cache clearing/viewing tool
|
||||
|
||||
2013-11-02 by alderaan
|
||||
Significantly improve the usability and appearance of the debug class' list of cache keys
|
||||
|
||||
|
@ -48,7 +48,7 @@
|
||||
'upload' => '0',
|
||||
'warn' => '4',
|
||||
'delete' => '1',
|
||||
'pm' => '[rule]h1.2[/rule]. You have uploaded material that is currently forbidden. Items on the Do Not Upload (DNU) list (at the top of the [url='.site_url().'/upload.php]upload page[/url]) and in the [url='.site_url().'/rules.php?p=upload#h1.2]Specifically Banned[/url] portion of the uploading rules cannot be uploaded to the site. Do not upload them unless your torrent meets a condition specified in the comments of the DNU list.
|
||||
'pm' => '[rule]h1.2[/rule]. You have uploaded material that is currently forbidden. Items on the Do Not Upload (DNU) list (at the top of the [url='.site_url().'upload.php]upload page[/url]) and in the [url='.site_url().'rules.php?p=upload#h1.2]Specifically Banned[/url] portion of the uploading rules cannot be uploaded to the site. Do not upload them unless your torrent meets a condition specified in the comments of the DNU list.
|
||||
Your torrent was reported because it contained material from the DNU list or from the Specifically Banned section of the rules.'
|
||||
)
|
||||
),
|
||||
@ -364,7 +364,7 @@
|
||||
'warn' => '0',
|
||||
'delete' => '0',
|
||||
'pm' => "[rule]2.3.16[/rule]. Properly tag your music files.
|
||||
The Uploading Rules require that all uploads be properly tagged. Your torrent has been marked as having bad tags. It is now listed on [url=".site_url()."/better.php]better.php[/url] and is eligible for trumping. You are of course free to fix this torrent yourself. Add or fix the required tags and upload the replacement torrent to the site. Then, report (RP) the older torrent using the category \"Tag Trump\" and indicate in the report comments that you have fixed the tags. Be sure to provide a link (PL) to the new replacement torrent."
|
||||
The Uploading Rules require that all uploads be properly tagged. Your torrent has been marked as having bad tags. It is now listed on [url=".site_url()."better.php]better.php[/url] and is eligible for trumping. You are of course free to fix this torrent yourself. Add or fix the required tags and upload the replacement torrent to the site. Then, report (RP) the older torrent using the category \"Tag Trump\" and indicate in the report comments that you have fixed the tags. Be sure to provide a link (PL) to the new replacement torrent."
|
||||
)
|
||||
),
|
||||
'folders_bad' => array(
|
||||
@ -381,7 +381,7 @@
|
||||
'warn' => '0',
|
||||
'delete' => '0',
|
||||
'pm' => "[rule]2.3.2[/rule]. Name your directories with meaningful titles, such as \"Artist - Album (Year) - Format\".
|
||||
The Uploading Rules require that all uploads contain torrent directories with meaningful names. Your torrent has been marked as having a poorly named torrent directory. It is now listed on [url=".site_url()."/better.php]better.php[/url] and is eligible for trumping. You are of course free to fix this torrent yourself. Add or fix the folder/directory name(s) and upload the replacement torrent to the site. Then, report (RP) the older torrent using the category \"Folder Trump\" and indicate in the report comments that you have fixed the directory name(s). Be sure to provide a link (PL) to the new replacement torrent."
|
||||
The Uploading Rules require that all uploads contain torrent directories with meaningful names. Your torrent has been marked as having a poorly named torrent directory. It is now listed on [url=".site_url()."better.php]better.php[/url] and is eligible for trumping. You are of course free to fix this torrent yourself. Add or fix the folder/directory name(s) and upload the replacement torrent to the site. Then, report (RP) the older torrent using the category \"Folder Trump\" and indicate in the report comments that you have fixed the directory name(s). Be sure to provide a link (PL) to the new replacement torrent."
|
||||
)
|
||||
),
|
||||
'wrong_format' => array(
|
||||
@ -582,7 +582,7 @@
|
||||
'pm' => '[rule]2.3.11[/rule]. File names must accurately reflect the song titles. You may not have file names like 01track.mp3, 02track.mp3, 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.). If all the letters in the track titles are capitalized, the torrent is trumpable.
|
||||
|
||||
[rule]2.3.13[/rule]. Track numbers are required in file names (e.g., "01 - TrackName.mp3"). 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 [rule]2.3.14[/rule].
|
||||
The Uploading Rules require that all uploads contain audio tracks with accurate file names. Your torrent has been marked as having incorrect or incomplete file names. It is now listed on [url='.site_url().'/better.php]better.php[/url] and is eligible for trumping. You are of course free to fix this torrent yourself. Add or fix the file names and upload the replacement torrent to the site. Then, report (RP) the older torrent using the category "Bad File Names Trump" and indicate in the report comments that you have fixed the file names. Be sure to provide a permalink (PL) to the new replacement torrent.'
|
||||
The Uploading Rules require that all uploads contain audio tracks with accurate file names. Your torrent has been marked as having incorrect or incomplete file names. It is now listed on [url='.site_url().'better.php]better.php[/url] and is eligible for trumping. You are of course free to fix this torrent yourself. Add or fix the file names and upload the replacement torrent to the site. Then, report (RP) the older torrent using the category "Bad File Names Trump" and indicate in the report comments that you have fixed the file names. Be sure to provide a permalink (PL) to the new replacement torrent.'
|
||||
)
|
||||
),
|
||||
'cassette' => array(
|
||||
@ -600,7 +600,7 @@
|
||||
'warn' => '1',
|
||||
'delete' => '1',
|
||||
'pm' => '[rule]2.10.1[/rule]. Cassettes are allowed under strict conditions.
|
||||
[rule]2.10.1.1[/rule]. Releases available only on cassette may be uploaded under special strict conditions (see [url='.site_url().'/wiki.php?action=article&id=593]this wiki[/url] for information on cassette ripping).
|
||||
[rule]2.10.1.1[/rule]. Releases available only on cassette may be uploaded under special strict conditions (see [url='.site_url().'wiki.php?action=article&id=593]this wiki[/url] for information on cassette ripping).
|
||||
|
||||
[rule]2.10.1.2[/rule]. Rips must be made from official cassette sources. Bootlegs are often from unofficial sources and may be deleted if they do not meet high quality audio standards (see rule [rule]2.10.8[/rule]).
|
||||
When uploading new cassette-sourced torrents, be sure to include in the release description evidence of its uniqueness in the form of discography information from a reputable source as well as pictures of the cassette you ripped.'
|
||||
@ -638,7 +638,7 @@
|
||||
'upload' => '0',
|
||||
'warn' => '0',
|
||||
'delete' => '0',
|
||||
'pm' => '[rule]2.2.10.3[/rule]. A FLAC upload with an EAC or XLD rip log that scores 100% on the log checker replaces one with a lower score... . Note: A FLAC upload with a log that scores 95% for not defeating the audio cache may be rescored to 100% following the procedure outlined in [url='.site_url().'/wiki.php?action=article&id=219]this wiki[/url].
|
||||
'pm' => '[rule]2.2.10.3[/rule]. A FLAC upload with an EAC or XLD rip log that scores 100% on the log checker replaces one with a lower score... . Note: A FLAC upload with a log that scores 95% for not defeating the audio cache may be rescored to 100% following the procedure outlined in [url='.site_url().'wiki.php?action=article&id=219]this wiki[/url].
|
||||
[rule]2.2.10.5[/rule]. XLD and EAC logs in languages other than English require a manual log checker score adjustment by staff.
|
||||
[rule]2.2.10.6.2[/rule]. If you created a CD range rip that has matching CRCs for test and copy, and where every track has an AccurateRip score of 2 or more, then you may submit your torrent for manual score adjustment.
|
||||
[rule]2.2.10.9.2[/rule]. If you find that an appended log has not been scored properly, please report the torrent and use the log rescore option.
|
||||
|
@ -950,8 +950,6 @@ function next_hour() {
|
||||
t.ID,
|
||||
t.GroupID,
|
||||
tg.Name,
|
||||
ag.Name,
|
||||
t.last_action,
|
||||
t.Format,
|
||||
t.Encoding,
|
||||
t.UserID,
|
||||
@ -959,26 +957,26 @@ function next_hour() {
|
||||
HEX(t.info_hash) AS InfoHash
|
||||
FROM torrents AS t
|
||||
JOIN torrents_group AS tg ON tg.ID = t.GroupID
|
||||
LEFT JOIN artists_group AS ag ON ag.ArtistID = tg.ArtistID
|
||||
WHERE t.last_action < '".time_minus(3600 * 24 * 28)."'
|
||||
AND t.last_action != 0
|
||||
OR t.Time < '".time_minus(3600 * 24 * 2)."'
|
||||
AND t.last_action = 0");
|
||||
$TorrentIDs = $DB->to_array();
|
||||
echo 'Found '.count($TorrentIDs)." inactive torrents to be deleted.\n";
|
||||
WHERE
|
||||
(t.last_action < '".time_minus(3600 * 24 * 28)."' AND t.last_action != 0)
|
||||
OR
|
||||
(t.Time < '".time_minus(3600 * 24 * 2)."' AND t.last_action = 0)");
|
||||
$Torrents = $DB->to_array();
|
||||
echo 'Found '.count($Torrents)." inactive torrents to be deleted.\n";
|
||||
|
||||
$LogEntries = array();
|
||||
$LogEntries = $DeleteNotes = array();
|
||||
|
||||
// Exceptions for inactivity deletion
|
||||
$InactivityExceptionsMade = array(//UserID => expiry time of exception
|
||||
|
||||
);
|
||||
foreach ($TorrentIDs as $TorrentID) {
|
||||
list($ID, $GroupID, $Name, $ArtistName, $LastAction, $Format, $Encoding, $UserID, $Media, $InfoHash) = $TorrentID;
|
||||
foreach ($Torrents as $Torrent) {
|
||||
list($ID, $GroupID, $Name, $Format, $Encoding, $UserID, $Media, $InfoHash) = $Torrent;
|
||||
if (array_key_exists($UserID, $InactivityExceptionsMade) && (time() < $InactivityExceptionsMade[$UserID])) {
|
||||
// don't delete the torrent!
|
||||
continue;
|
||||
}
|
||||
$ArtistName = Artists::display_artists(Artists::get_artist($GroupID), false, false, false);
|
||||
if ($ArtistName) {
|
||||
$Name = "$ArtistName - $Name";
|
||||
}
|
||||
@ -1270,7 +1268,6 @@ function next_hour() {
|
||||
FROM torrents AS t
|
||||
JOIN torrents_group AS tg ON tg.ID = t.GroupID
|
||||
JOIN users_info AS u ON u.UserID = t.UserID
|
||||
LEFT JOIN artists_group AS ag ON ag.ArtistID = tg.ArtistID
|
||||
WHERE t.last_action < NOW() - INTERVAL 20 DAY
|
||||
AND t.last_action != 0
|
||||
AND u.UnseededAlerts = '1'
|
||||
|
@ -6,17 +6,25 @@
|
||||
View::show_header('Clear a cache key');
|
||||
|
||||
//Make sure the form was sent
|
||||
if (!empty($_GET['key']) && $_GET['type'] == 'clear') {
|
||||
if (preg_match('/(.*?)(\d+)\.\.(\d+)$/', $_GET['key'], $Matches) && is_number($Matches[2]) && is_number($Matches[3])) {
|
||||
for ($i = $Matches[2]; $i <= $Matches[3]; $i++) {
|
||||
$Cache->delete_value($Matches[1].$i);
|
||||
}
|
||||
echo '<div class="save_message">Keys '.display_str($_GET['key']).' cleared!</div>';
|
||||
if (!empty($_GET['key'])) {
|
||||
if ($_GET['submit'] == 'Multi') {
|
||||
$Keys = array_map('trim', preg_split('/\s+/', $_GET['key']));
|
||||
} else {
|
||||
$Cache->delete_value($_GET['key']);
|
||||
echo '<div class="save_message">Key '.display_str($_GET['key']).' cleared!</div>';
|
||||
$Keys = [trim($_GET['key'])];
|
||||
}
|
||||
}
|
||||
if (isset($Keys) && $_GET['type'] == 'clear') {
|
||||
foreach ($Keys as $Key) {
|
||||
if (preg_match('/(.*?)(\d+)\.\.(\d+)$/', $Key, $Matches) && is_number($Matches[2]) && is_number($Matches[3])) {
|
||||
for ($i = $Matches[2]; $i <= $Matches[3]; $i++) {
|
||||
$Cache->delete_value($Matches[1].$i);
|
||||
}
|
||||
} else {
|
||||
$Cache->delete_value($Key);
|
||||
}
|
||||
}
|
||||
echo '<div class="save_message">Key(s) ' . implode(', ', array_map('display_str', $Keys)) . ' cleared!</div>';
|
||||
}
|
||||
?>
|
||||
<div class="header">
|
||||
<h2>Clear a cache key</h2>
|
||||
@ -24,24 +32,43 @@
|
||||
<form class="manage_form" name="cache" method="get" action="">
|
||||
<input type="hidden" name="action" value="clear_cache" />
|
||||
<table class="layout" cellpadding="2" cellspacing="1" border="0" align="center">
|
||||
<tr valign="top">
|
||||
<td align="right">Key</td>
|
||||
<td align="left">
|
||||
<input type="text" name="key" id="key" class="inputtext" value="<?=$_GET['key']?>" />
|
||||
<tr>
|
||||
<td>Key</td>
|
||||
<td>
|
||||
<select name="type">
|
||||
<option value="view">View</option>
|
||||
<option value="clear">Clear</option>
|
||||
</select>
|
||||
<input type="submit" value="key" class="submit" />
|
||||
<input type="text" name="key" id="key" class="inputtext" value="<?=(isset($_GET['key']) && $_GET['submit'] != 'Multi' ? display_str($_GET['key']) : '')?>" />
|
||||
<input type="submit" name="submit" value="Single" class="submit" />
|
||||
</td>
|
||||
</tr>
|
||||
<? if (!empty($_GET['key']) && $_GET['type'] == 'view') { ?>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<pre><? var_dump($Cache->get_value($_GET['key'])); ?></pre>
|
||||
<td>Multi-key</td>
|
||||
<td>
|
||||
<select name="type">
|
||||
<option value="view">View</option>
|
||||
<option value="clear">Clear</option>
|
||||
</select>
|
||||
<textarea type="text" name="key" id="key" class="inputtext"><?=(isset($_GET['key']) && $_GET['submit'] == 'Multi' ? display_str($_GET['key']) : '')?></textarea>
|
||||
<input type="submit" name="submit" value="Multi" class="submit" />
|
||||
</td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
<?
|
||||
if (isset($Keys) && $_GET['type'] == 'view') {
|
||||
foreach ($Keys as $Key) {
|
||||
?>
|
||||
<tr>
|
||||
<td><?=display_str($Key)?></td>
|
||||
<td>
|
||||
<pre><? var_dump($Cache->get_value($Key)); ?></pre>
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
}
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</form>
|
||||
<? View::show_footer(); ?>
|
||||
<?
|
||||
View::show_footer();
|
||||
|
@ -179,7 +179,6 @@ a:hover {
|
||||
display: inline;
|
||||
float: left;
|
||||
margin-right: 0;
|
||||
width: 752px;
|
||||
}
|
||||
* html #menu {
|
||||
overflow-x: hidden;
|
||||
@ -268,7 +267,7 @@ a:hover {
|
||||
top: 0;
|
||||
}
|
||||
#menu {
|
||||
left: 196px;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
top: 84px;
|
||||
text-align: right;
|
||||
|
Loading…
Reference in New Issue
Block a user