|
|
Choosing A Webhost: |
[mb-commits] r8941 - in mb_server/trunk/htdocs: comp/release_editor edit/al: msg#00069audio.musicbrainz.cvs
Author: robert Date: 2007-03-24 00:39:53 +0000 (Sat, 24 Mar 2007) New Revision: 8941 Modified: mb_server/trunk/htdocs/comp/release_editor/review mb_server/trunk/htdocs/edit/albumreleases/editreleases.html Log: Fixes #2500 -- Warn about bugs amazon dates Modified: mb_server/trunk/htdocs/comp/release_editor/review =================================================================== --- mb_server/trunk/htdocs/comp/release_editor/review 2007-03-23 19:05:48 UTC (rev 8940) +++ mb_server/trunk/htdocs/comp/release_editor/review 2007-03-24 00:39:53 UTC (rev 8941) @@ -99,6 +99,7 @@ my %revorighash; my %revremovehash; my (@adds, @edits, @removes); + my $bogus_date = 0; for my $j (sort map { /^rev_year-(\d+)$/ ? ($1) : () } keys %ARGS) { my $rev_year = $ARGS{"rev_year-$j"}; @@ -448,6 +449,7 @@ for my $rev (@adds) { + $bogus_date = 1 if ($rev->GetYear == 1990 && $rev->GetMonth == 10 && $rev->GetDay == 25); $ov = ""; $nv = $rev->GetSortDate; $nv .= " - "; @@ -490,6 +492,7 @@ $ov .= " - Barcode: " . $revorig->GetBarcode if $revorig->GetBarcode; $ov .= " - Format: " . $revorig->GetFormatName if $revorig->GetFormat; + $bogus_date = 1 if ($rev->GetYear == 1990 && $rev->GetMonth == 10 && $rev->GetDay == 25); $nv = $rev->GetYear; $nv .= "-" . $rev->GetMonth if ($rev->GetMonth); $nv .= "-" . $rev->GetDay if ($rev->GetDay); @@ -547,6 +550,16 @@ ); } + if ($bogus_date) + { + $m->out('<tr class="nochanges"><td colspan="3">'); + $m->comp('/comp/form/feedbackbox', "warning", "", + qq|Warning! "1990-10-25" is the bogus date that Amazon gives to + all releases for which they don't know the actual date. <b>Please + use this date only if you're certain this date is correct!</b>|); + $m->out('</td></tr>'); + } + # if no changes were made indicate this. if (not $releasechanges) { Modified: mb_server/trunk/htdocs/edit/albumreleases/editreleases.html =================================================================== --- mb_server/trunk/htdocs/edit/albumreleases/editreleases.html 2007-03-23 19:05:48 UTC (rev 8940) +++ mb_server/trunk/htdocs/edit/albumreleases/editreleases.html 2007-03-24 00:39:53 UTC (rev 8941) @@ -30,6 +30,7 @@ $releaseid $submitvalue => "" + $force => 0 </%args> <%perl> @@ -48,6 +49,7 @@ my $countries_menu = $m->comp("countries-menu.inc"); my $countries_menu_2 = [ [ "", "[select a country]" ], @$countries_menu ]; my $formats_menu = MusicBrainz::Server::Release::GetReleaseFormats(); + my $error; # Update releases my $releases = $edit->{"releases"}; @@ -88,6 +90,15 @@ $m->comp("/comp/footer"); return; } + # Check for the amazon bogus release date + if (!$force && $y == 1990 && $mon == 10 && $d == 25) + { + $error = qq|Warning! "$y-$mon-$d" is the bogus date that Amazon gives to + all releases for which they don't know the actual date. If you're + certain that this date is correct, tick the confirmation checkbox + below.|; + delete $ARGS{"continue"}; + } @$rel{qw( year month day )} = ($y, $mon, $d); } elsif ($mon and $mon >= 1 and $mon <= 12) @@ -186,6 +197,10 @@ <script type="text/javascript" src="/scripts/editreleasesconfig.js"></script> <script type="text/javascript" src="validate.js"></script> +% if ($error) { + <& /comp/form/feedbackbox, "warning", "", $error &> +% } + <form method="post" action="/edit/albumreleases/editreleases.html" id="EditReleasesForm" @@ -312,6 +327,12 @@ </table> </td> </tr> +% if ($error) { + <tr> + <td colspan="2"><input type="checkbox" name="force">I know what I am doing, use this + possibly bogus date!</td> + </tr> +% } <tr class="spaced"> <td class="submitbuttons" colspan="2"> <input type="submit" name="submitvalue" class="button" value="Continue »" />
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [mb-commits] r8940 - mb_server/trunk/cgi-bin/MusicBrainz/Server/Handlers/WS/1, root |
|---|---|
| Next by Date: | [mb-commits] r8942 - in mb_server/trunk: cgi-bin htdocs/search, root |
| Previous by Thread: | [mb-commits] r8940 - mb_server/trunk/cgi-bin/MusicBrainz/Server/Handlers/WS/1, root |
| Next by Thread: | [mb-commits] r8942 - in mb_server/trunk: cgi-bin htdocs/search, root |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |