Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

[mb-commits] r8941 - in mb_server/trunk/htdocs: comp/release_editor edit/al: msg#00069

audio.musicbrainz.cvs

Subject: [mb-commits] r8941 - in mb_server/trunk/htdocs: comp/release_editor edit/albumreleases

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 &raquo;" />


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
ide.eclipse.wtp...    bug-tracking.ro...    xfree86.cvs/200...    lisp.wxcl.devel...    file-systems.ar...    kde.devel.kwrit...    jakarta.jetspee...    qnx.openqnx.dev...    drivers.openib/...    ports.xbox.deve...    gis.gdal.devel/...    netbsd.ports.ma...    ubuntu.marketin...    systemtap/2005-...    web.omniweb/200...    mail.qmail.ldap...    hardware.soekri...    os.netbsd.devel...    audio.madman.ge...    tv.freeguide-tv...    cluster.openmos...    education.ezpro...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive 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

Navigation