|
|
Choosing A Webhost: |
[mb-commits] r7650 - mb_server/trunk/htdocs/cdi: msg#00305audio.musicbrainz.cvs
Author: keschte Date: 2006-05-26 11:55:41 +0000 (Fri, 26 May 2006) New Revision: 7650 Modified: mb_server/trunk/htdocs/cdi/found.html Log: pre-rename commit Modified: mb_server/trunk/htdocs/cdi/found.html =================================================================== --- mb_server/trunk/htdocs/cdi/found.html 2006-05-26 11:53:22 UTC (rev 7649) +++ mb_server/trunk/htdocs/cdi/found.html 2006-05-26 11:55:41 UTC (rev 7650) @@ -1,74 +1,70 @@ -%# vi: set ts=2 sw=2 ft=mason : <%args> -$id -$toc -$album -$tracks + + $discid + $toc + $tracks + + $releaseid + </%args> <%perl> -my $mb = $m->comp("/comp/dblogin"); + # Instantiate MusicBrainz object, and load release + my $mb = $m->comp("/comp/dblogin"); + my $release = $m->comp("/comp/loadrelease", $mb, $releaseid); -my $al = Album->new($mb->{DBH}); -$al->SetId($album); -$al->LoadFromId - or return $m->comp( - "/comp/error", - "Album #$album not found in the database.", - 1, 1, - ); - -return $m->comp("/comp/error", - "Disc IDs can't be added to $al->{name} albums.", - 1, 1, - ) if $al->IsNonAlbumTracks; + # do not allow disc id to be added to NAT release. usually, + # this won't happen since they are not shown on the + # calling page + if ($release->IsNonAlbumTracks) + { + return $m->comp("/comp/error", + "Disc IDs cannot t be added to $release->{name} albums.", + 1, 1) ; + } -my $ar = Artist->new($mb->{DBH}); -$ar->SetId($al->GetArtist); -$ar->LoadFromId - or return $m->comp( - "/comp/error", - "Artist #".$al->GetArtist." not found in the database.", - 1, 1, + # load release artist + my $artist = $m->comp("/comp/loadartist", $mb, $release->GetArtist); + + # attach disc id to release. + my @ret = $m->comp( + "/comp/entermods", + DBH => $mb->{DBH}, + sub => sub { + my @mods = Moderation->InsertModeration( + DBH => $mb->{DBH}, + uid => $session{uid}, + privs => $session{privs}, + type => &ModDefs::MOD_ADD_DISCID, + # -- + album => $release, + toc => $toc, + ); + }, ); -my @ret = $m->comp( - "/comp/entermods", - DBH => $mb->{DBH}, - sub => sub { - my @mods = Moderation->InsertModeration( - DBH => $mb->{DBH}, - uid => $session{uid}, - privs => $session{privs}, - type => &ModDefs::MOD_ADD_DISCID, - # -- - album => $al, - toc => $toc, - ); - }, -); +</%perl> -$m->comp("/comp/sidebar", title => 'CD TOC Added'); + <& /comp/sidebar-notitle, pagetitle => "CD TOC Added" &> -</%perl> - -<p> - Thank you for your submission. -% if (@ret) { - A new association has been entered into the database. -% } -</p> -<p> - You will now be able to request the information for this CD. -</p> + <div style="border: 1px dotted #000; padding: 5px; margin-bottom: 15px"> + <strong>CD TOC Added</strong>: Thank you for your CD TOC submission. -<& /comp/artisttitle, artist => $ar, link => 1 &> -<& /comp/album, - album => $al, - artist => $ar, - showids => 1, - showtag => 1, - showreleases => 1, - &> +% if (@ret) +% { + This information has now been associated with this release, and + users will be able to lookup this release with their client + applications. +% } + + </div> + + <& /comp/artisttitle, artist => $artist, link => 1 &> + <& /comp/album, + album => $release, artist => $artist, + showids => 1, showtag => 1, showreleases => 1, &> + <& /comp/footer &> + +%# vi: set ts=4 sw=4 ft=mason : \ No newline at end of file
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [mb-commits] r7698 - picard/trunk/picard/ui/options, root |
|---|---|
| Next by Date: | [mb-commits] r7699 - in libmusicbrainz/branches/xmlws: . include/musicbrainz3 lib test, root |
| Previous by Thread: | [mb-commits] r7698 - picard/trunk/picard/ui/options, root |
| Next by Thread: | [mb-commits] r7699 - in libmusicbrainz/branches/xmlws: . include/musicbrainz3 lib test, 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 |