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] r7650 - mb_server/trunk/htdocs/cdi: msg#00305

audio.musicbrainz.cvs

Subject: [mb-commits] r7650 - mb_server/trunk/htdocs/cdi

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.&nbsp;
-% 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>
Google Custom Search

Recently Viewed:
qplus.devel/200...    network.jabber....    debian.qa-packa...    encryption.gpg....    python.dabo.dev...    uclinux.devel/2...    science.mathema...    recreation.pesc...    kernel.ck/2004-...    mozilla.devel.e...    tex.latex.prosp...    ietf.multi6/200...    bbc.cvs/2002-11...    xfree86.newbie/...    jakarta.taglibs...    altlinux.hardwa...    comedi/2002-05/...    horde.bugs/2004...    games.diplomacy...    finance.e-gold....    web.dom.test-su...    lang.ruby.rails...    os.netbsd.devel...    video.gstreamer...   
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