diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt index e3bd6347..646e0cb3 100644 --- a/docs/CHANGES.txt +++ b/docs/CHANGES.txt @@ -1,5 +1,11 @@ CHANGE LOG +2013-12-10 by alderaan +Clear cache key "request_artists_$RequestID" in two missed places + +2013-12-10 by alderaan +Refactor ignored log file name code (e.g. for "audiochecker.log" and friends) + 2013-12-01 by alderaan Fix some CSS issues in the forum search category list for Anorex, Layer Cake, Kuro, and Whatnificent diff --git a/sections/requests/take_delete.php b/sections/requests/take_delete.php index 308ebce5..cc94cc08 100644 --- a/sections/requests/take_delete.php +++ b/sections/requests/take_delete.php @@ -53,6 +53,7 @@ $DB->query(" DELETE FROM requests_artists WHERE RequestID = '$RequestID'"); +$Cache->delete_value("request_artists_$RequestID"); if ($UserID != $LoggedUser['ID']) { Misc::send_pm($UserID, 0, 'A request you created has been deleted', "The request \"$FullName\" was deleted by [url=https://".SSL_SITE_URL.'/user.php?id='.$LoggedUser['ID'].']'.$LoggedUser['Username'].'[/url] for the reason: '.$_POST['reason']); diff --git a/sections/requests/take_new_edit.php b/sections/requests/take_new_edit.php index 665e4c6e..7845daa4 100644 --- a/sections/requests/take_new_edit.php +++ b/sections/requests/take_new_edit.php @@ -480,15 +480,17 @@ $DB->query(" DELETE FROM requests_artists WHERE RequestID = $RequestID"); + $Cache->delete_value("request_artists_$RequestID"); } if ($CategoryName === 'Audiobooks' || $CategoryName === 'Comedy') { //These types require a year field. if ($NewRequest) { - $DB->query("INSERT INTO requests ( - UserID, TimeAdded, LastVote, CategoryID, Title, Year, Image, Description, Visible, OCLC) - VALUES - (".$LoggedUser['ID'].", '".sqltime()."', '".sqltime()."', $CategoryID, '".db_string($Title)."', $Year, '".db_string($Image)."', '".db_string($Description)."', '1', '".db_string($OCLC)."')"); + $DB->query(" + INSERT INTO requests ( + UserID, TimeAdded, LastVote, CategoryID, Title, Year, Image, Description, Visible, OCLC) + VALUES + (".$LoggedUser['ID'].", '".sqltime()."', '".sqltime()."', $CategoryID, '".db_string($Title)."', $Year, '".db_string($Image)."', '".db_string($Description)."', '1', '".db_string($OCLC)."')"); $RequestID = $DB->inserted_id(); diff --git a/sections/schedule/index.php b/sections/schedule/index.php index 69a0d278..eeefa902 100644 --- a/sections/schedule/index.php +++ b/sections/schedule/index.php @@ -568,6 +568,7 @@ function next_hour() { WHERE NumTorrents = '0'"); // Get each user's amount of snatches of existing torrents + $DB->query("TRUNCATE TABLE users_torrent_history_snatch"); $DB->query(" INSERT INTO users_torrent_history_snatch (UserID, NumSnatches) SELECT xs.uid, COUNT(DISTINCT xs.fid) diff --git a/sections/upload/upload_handle.php b/sections/upload/upload_handle.php index 39708673..d07db04d 100644 --- a/sections/upload/upload_handle.php +++ b/sections/upload/upload_handle.php @@ -390,11 +390,12 @@ $TmpFileList = array(); $TooLongPaths = array(); $DirName = (isset($Tor->Dec['info']['files']) ? Format::make_utf8($Tor->get_name()) : ''); +$IgnoredLogFileNames = array('audiochecker.log', 'sox.log'); check_name($DirName); // check the folder name against the blacklist foreach ($FileList as $File) { list($Size, $Name) = $File; // add +log to encoding - if ($T['Encoding'] == "'Lossless'" && preg_match('/(?