[mb-commits] r9746 - in mb_server/branches/terminology: admin/cleanup cgi-bin/MusicBrainz/Server cgi-bin/MusicBrainz/Server/Moderation htdocs/comp/release htdocs/edit/annotation htdocs/edit/annotation/album

root at musicbrainz.org root at musicbrainz.org
Sun Mar 9 21:23:29 UTC 2008


Author: luks
Date: 2008-03-09 21:23:28 +0000 (Sun, 09 Mar 2008)
New Revision: 9746

Modified:
   mb_server/branches/terminology/admin/cleanup/RemoveAnnotations
   mb_server/branches/terminology/cgi-bin/MusicBrainz/Server/Annotation.pm
   mb_server/branches/terminology/cgi-bin/MusicBrainz/Server/Link.pm
   mb_server/branches/terminology/cgi-bin/MusicBrainz/Server/Moderation/MOD_ADD_ALBUM_ANNOTATION.pm
   mb_server/branches/terminology/cgi-bin/MusicBrainz/Server/Moderation/MOD_MERGE_ALBUM.pm
   mb_server/branches/terminology/cgi-bin/MusicBrainz/Server/Release.pm
   mb_server/branches/terminology/cgi-bin/MusicBrainz/Server/ReleaseCDTOC.pm
   mb_server/branches/terminology/cgi-bin/MusicBrainz/Server/Tag.pm
   mb_server/branches/terminology/htdocs/comp/release/release_begin
   mb_server/branches/terminology/htdocs/edit/annotation/album/edit.html
   mb_server/branches/terminology/htdocs/edit/annotation/album/history.html
   mb_server/branches/terminology/htdocs/edit/annotation/backreference
   mb_server/branches/terminology/htdocs/edit/annotation/edit-link
   mb_server/branches/terminology/htdocs/edit/annotation/latest
   mb_server/branches/terminology/htdocs/edit/annotation/show
Log:
Replace Album with Release in method names from Tag.pm and Annotation.pm

Modified: mb_server/branches/terminology/admin/cleanup/RemoveAnnotations
===================================================================
--- mb_server/branches/terminology/admin/cleanup/RemoveAnnotations	2008-03-09 20:57:07 UTC (rev 9745)
+++ mb_server/branches/terminology/admin/cleanup/RemoveAnnotations	2008-03-09 21:23:28 UTC (rev 9746)
@@ -85,7 +85,7 @@
 	. " WHERE	( a.type = ? AND a.rowid NOT IN (SELECT id FROM artist) ) "
 	. "		OR ( a.type = ? AND a.rowid NOT IN (SELECT id FROM album) ) ",
 	ARTIST_ANNOTATION,
-	ALBUM_ANNOTATION,
+	RELEASE_ANNOTATION,
 );
 
 unless ( defined $ids )

Modified: mb_server/branches/terminology/cgi-bin/MusicBrainz/Server/Annotation.pm
===================================================================
--- mb_server/branches/terminology/cgi-bin/MusicBrainz/Server/Annotation.pm	2008-03-09 20:57:07 UTC (rev 9745)
+++ mb_server/branches/terminology/cgi-bin/MusicBrainz/Server/Annotation.pm	2008-03-09 21:23:28 UTC (rev 9746)
@@ -34,12 +34,12 @@
 {
 	our @EXPORT_OK = qw(
 		ARTIST_ANNOTATION
-		ALBUM_ANNOTATION
+		RELEASE_ANNOTATION
 		LABEL_ANNOTATION
 		TRACK_ANNOTATION
 	);
 	our %EXPORT_TAGS = (
-		type => [qw( ARTIST_ANNOTATION ALBUM_ANNOTATION LABEL_ANNOTATION TRACK_ANNOTATION )],
+		type => [qw( ARTIST_ANNOTATION RELEASE_ANNOTATION LABEL_ANNOTATION TRACK_ANNOTATION )],
 	);
 }
 
@@ -52,7 +52,7 @@
 use MusicBrainz::Server::Validation qw( encode_entities );
 
 use constant ARTIST_ANNOTATION	=>	1;
-use constant ALBUM_ANNOTATION	=>	2;
+use constant RELEASE_ANNOTATION	=>	2;
 use constant LABEL_ANNOTATION	=>	3;
 use constant TRACK_ANNOTATION	=>	4;
 
@@ -94,7 +94,7 @@
 	return $_[0]->{rowid};
 }
 
-sub GetAlbum
+sub GetRelease
 {
 	return $_[0]->{rowid};
 }
@@ -132,7 +132,7 @@
 sub GetTypeWord
 {
 	return "artist" if $_[0]{type} == ARTIST_ANNOTATION;
-	return "album" if $_[0]{type} == ALBUM_ANNOTATION;
+	return "album" if $_[0]{type} == RELEASE_ANNOTATION;
 	return "label" if $_[0]{type} == LABEL_ANNOTATION;
 	return "track" if $_[0]{type} == TRACK_ANNOTATION;
 	die;
@@ -205,9 +205,9 @@
 	$_[0]->{changelog} = $_[1];
 }
 
-sub SetAlbum
+sub SetRelease
 {
-	$_[0]->{type} = ALBUM_ANNOTATION;
+	$_[0]->{type} = RELEASE_ANNOTATION;
 	$_[0]->{rowid} = $_[1];
 }
 
@@ -326,8 +326,8 @@
 	return 1;
 }
 
-# Get the latest Annotation for the artist or album.
-# To make this work, SetArtist() or SetAlbum() have to be called
+# Get the latest Annotation for the artist or release.
+# To make this work, SetArtist() or SetRelease() have to be called
 
 sub GetLatestAnnotation
 {
@@ -375,7 +375,7 @@
 	return 1;
 }
 
-# Insert an annotation. Moderator and album have to be set.
+# Insert an annotation. Moderator and release have to be set.
 # If the text attribute is unset, an empty annotation is inserted.
 
 sub Insert
@@ -409,9 +409,9 @@
 # Returns a reference to an array of Annotation IDs for the specified
 # object.
 
-sub GetAnnotationIDsForAlbum
+sub GetAnnotationIDsForRelease
 {
-	return $_[0]->GetAnnotationIDsForEntity($_[1], ALBUM_ANNOTATION);
+	return $_[0]->GetAnnotationIDsForEntity($_[1], RELEASE_ANNOTATION);
 }
 
 sub GetAnnotationIDsForArtist
@@ -506,10 +506,10 @@
 	$self->_Merge(LABEL_ANNOTATION, @_);
 }
 
-sub MergeAlbums
+sub MergeReleases
 {
 	my $self = shift;
-	$self->_Merge(ALBUM_ANNOTATION, @_);
+	$self->_Merge(RELEASE_ANNOTATION, @_);
 }
 
 sub _Merge
@@ -584,7 +584,7 @@
 			changelog => "Result of artist merge",
             notrans => 1
 		);
-	} elsif ($type == ALBUM_ANNOTATION) {
+	} elsif ($type == RELEASE_ANNOTATION) {
 
 		my $artist_id = $opts{artistid} or die;
 
@@ -609,10 +609,10 @@
 	$self->_Delete(ARTIST_ANNOTATION, @_);
 }
 
-sub DeleteAlbum
+sub DeleteRelease
 {
 	my $self = shift;
-	$self->_Delete(ALBUM_ANNOTATION, @_);
+	$self->_Delete(RELEASE_ANNOTATION, @_);
 }
 
 sub DeleteLabel

Modified: mb_server/branches/terminology/cgi-bin/MusicBrainz/Server/Link.pm
===================================================================
--- mb_server/branches/terminology/cgi-bin/MusicBrainz/Server/Link.pm	2008-03-09 20:57:07 UTC (rev 9745)
+++ mb_server/branches/terminology/cgi-bin/MusicBrainz/Server/Link.pm	2008-03-09 21:23:28 UTC (rev 9746)
@@ -558,7 +558,7 @@
 # Merging 
 ################################################################################
 
-sub MergeAlbums
+sub MergeReleases
 {
 	my ($self, $oldid, $newid) = @_;
 	$self->_Merge($oldid, $newid, "album");

Modified: mb_server/branches/terminology/cgi-bin/MusicBrainz/Server/Moderation/MOD_ADD_ALBUM_ANNOTATION.pm
===================================================================
--- mb_server/branches/terminology/cgi-bin/MusicBrainz/Server/Moderation/MOD_ADD_ALBUM_ANNOTATION.pm	2008-03-09 20:57:07 UTC (rev 9745)
+++ mb_server/branches/terminology/cgi-bin/MusicBrainz/Server/Moderation/MOD_ADD_ALBUM_ANNOTATION.pm	2008-03-09 21:23:28 UTC (rev 9746)
@@ -97,8 +97,8 @@
 
 	$an->SetModerator($self->GetModerator());
 	$an->SetModeration($self->GetId());
-	$an->SetType(ALBUM_ANNOTATION);
-	$an->SetAlbum($self->GetRowId());
+	$an->SetType(RELEASE_ANNOTATION);
+	$an->SetRelease($self->GetRowId());
 	$an->SetText($text);
 	$an->SetChangeLog($changelog);
 	$an->Insert();

Modified: mb_server/branches/terminology/cgi-bin/MusicBrainz/Server/Moderation/MOD_MERGE_ALBUM.pm
===================================================================
--- mb_server/branches/terminology/cgi-bin/MusicBrainz/Server/Moderation/MOD_MERGE_ALBUM.pm	2008-03-09 20:57:07 UTC (rev 9745)
+++ mb_server/branches/terminology/cgi-bin/MusicBrainz/Server/Moderation/MOD_MERGE_ALBUM.pm	2008-03-09 21:23:28 UTC (rev 9746)
@@ -175,7 +175,7 @@
 		return STATUS_FAILEDPREREQ;
 	}
 
-	$al->MergeAlbums({
+	$al->MergeReleases({
 		mac => ($self->GetType == MOD_MERGE_ALBUM_MAC),
 		albumids => [ map { $_->{'id'} } @{ $self->{'new_albums'} } ],
 		merge_attributes => $self->{'merge_attributes'},

Modified: mb_server/branches/terminology/cgi-bin/MusicBrainz/Server/Release.pm
===================================================================
--- mb_server/branches/terminology/cgi-bin/MusicBrainz/Server/Release.pm	2008-03-09 20:57:07 UTC (rev 9745)
+++ mb_server/branches/terminology/cgi-bin/MusicBrainz/Server/Release.pm	2008-03-09 21:23:28 UTC (rev 9746)
@@ -502,7 +502,7 @@
     # Remove tags
 	require MusicBrainz::Server::Tag;
 	my $tag = MusicBrainz::Server::Tag->new($sql->{DBH});
-	$tag->RemoveAlbums($this->GetId);
+	$tag->RemoveReleases($this->GetId);
 
     # Remove references from album words table
 	require SearchEngine;
@@ -510,7 +510,7 @@
     $engine->RemoveObjectRefs($this->GetId());
 
     require MusicBrainz::Server::Annotation;
-    MusicBrainz::Server::Annotation->DeleteAlbum($this->{DBH}, $album);
+    MusicBrainz::Server::Annotation->DeleteRelease($this->{DBH}, $album);
 
     $this->RemoveGlobalIdRedirect($album, &TableBase::TABLE_ALBUM);
 
@@ -965,7 +965,7 @@
 
 # Given a list of albums, this function will merge the list of albums into
 # the current album. All Discids, TRM Ids and PUIDs are preserved in the process
-sub MergeAlbums
+sub MergeReleases
 {
    my ($this, $opts) = @_;
    my $intoMAC = $opts->{'mac'};
@@ -1067,7 +1067,7 @@
 
 		# Also merge the Discids
 		require MusicBrainz::Server::ReleaseCDTOC;
-		MusicBrainz::Server::ReleaseCDTOC->MergeAlbums($this->{DBH}, $id, $this->GetId);
+		MusicBrainz::Server::ReleaseCDTOC->MergeReleases($this->{DBH}, $id, $this->GetId);
 
 		# And the releases
 		require MusicBrainz::Server::ReleaseEvent;
@@ -1076,13 +1076,13 @@
 
 		# And the annotations
 		require MusicBrainz::Server::Annotation;
-		MusicBrainz::Server::Annotation->MergeAlbums($this->{DBH}, $id, $this->GetId, artistid => $this->GetArtist);
+		MusicBrainz::Server::Annotation->MergeReleases($this->{DBH}, $id, $this->GetId, artistid => $this->GetArtist);
 
 		# And the ARs
-		$link->MergeAlbums($id, $this->GetId);
+		$link->MergeReleases($id, $this->GetId);
 
 		# ... and the tags
-		$tag->MergeAlbums($id, $this->GetId);
+		$tag->MergeReleases($id, $this->GetId);
 
         $this->SetGlobalIdRedirect($id, $al->GetMBId, $this->GetId, &TableBase::TABLE_ALBUM);
 

Modified: mb_server/branches/terminology/cgi-bin/MusicBrainz/Server/ReleaseCDTOC.pm
===================================================================
--- mb_server/branches/terminology/cgi-bin/MusicBrainz/Server/ReleaseCDTOC.pm	2008-03-09 20:57:07 UTC (rev 9745)
+++ mb_server/branches/terminology/cgi-bin/MusicBrainz/Server/ReleaseCDTOC.pm	2008-03-09 21:23:28 UTC (rev 9746)
@@ -439,7 +439,7 @@
 		if $already_there_flagref;
 }
 
-sub MergeAlbums
+sub MergeReleases
 {
 	my $self = shift;
 	$self = $self->new(shift) if not ref $self;

Modified: mb_server/branches/terminology/cgi-bin/MusicBrainz/Server/Tag.pm
===================================================================
--- mb_server/branches/terminology/cgi-bin/MusicBrainz/Server/Tag.pm	2008-03-09 20:57:07 UTC (rev 9745)
+++ mb_server/branches/terminology/cgi-bin/MusicBrainz/Server/Tag.pm	2008-03-09 21:23:28 UTC (rev 9746)
@@ -302,7 +302,7 @@
     return 1;
 }
 
-sub MergeAlbums
+sub MergeReleases
 {
 	my ($self, $oldid, $newid) = @_;
 	$self->Merge("release", $oldid, $newid);
@@ -343,7 +343,7 @@
     return 1;
 }
 
-sub RemoveAlbums
+sub RemoveReleases
 {
 	my ($self, $id) = @_;
 	$self->Remove("release", $id);

Modified: mb_server/branches/terminology/htdocs/comp/release/release_begin
===================================================================
--- mb_server/branches/terminology/htdocs/comp/release/release_begin	2008-03-09 20:57:07 UTC (rev 9745)
+++ mb_server/branches/terminology/htdocs/comp/release/release_begin	2008-03-09 21:23:28 UTC (rev 9746)
@@ -173,7 +173,7 @@
 
 			# load the annotation from the database
 			my $annotation = MusicBrainz::Server::Annotation->new($mb->{DBH});
-			$annotation->SetAlbum($releaseid);
+			$annotation->SetRelease($releaseid);
 			$annotation->GetLatestAnnotation() or $annotation = undef;
 
 			$m->out(qq!<tr><td class="editannotation">!);

Modified: mb_server/branches/terminology/htdocs/edit/annotation/album/edit.html
===================================================================
--- mb_server/branches/terminology/htdocs/edit/annotation/album/edit.html	2008-03-09 20:57:07 UTC (rev 9745)
+++ mb_server/branches/terminology/htdocs/edit/annotation/album/edit.html	2008-03-09 21:23:28 UTC (rev 9746)
@@ -3,7 +3,7 @@
 </%flags>
 
 <%attr>
-	annotationtype => &MusicBrainz::Server::Annotation::ALBUM_ANNOTATION
+	annotationtype => &MusicBrainz::Server::Annotation::RELEASE_ANNOTATION
 	edittype => &ModDefs::MOD_ADD_ALBUM_ANNOTATION
 	entitytype => "album"
 	title => "Edit Release Annotation"

Modified: mb_server/branches/terminology/htdocs/edit/annotation/album/history.html
===================================================================
--- mb_server/branches/terminology/htdocs/edit/annotation/album/history.html	2008-03-09 20:57:07 UTC (rev 9745)
+++ mb_server/branches/terminology/htdocs/edit/annotation/album/history.html	2008-03-09 21:23:28 UTC (rev 9746)
@@ -3,7 +3,7 @@
 </%flags>
 
 <%attr>
-	annotationtype => &MusicBrainz::Server::Annotation::ALBUM_ANNOTATION
+	annotationtype => &MusicBrainz::Server::Annotation::RELEASE_ANNOTATION
 	edittype => &ModDefs::MOD_ADD_ALBUM_ANNOTATION
 	entitytype => "album"
 	title => "Release Annotation History"

Modified: mb_server/branches/terminology/htdocs/edit/annotation/backreference
===================================================================
--- mb_server/branches/terminology/htdocs/edit/annotation/backreference	2008-03-09 20:57:07 UTC (rev 9745)
+++ mb_server/branches/terminology/htdocs/edit/annotation/backreference	2008-03-09 21:23:28 UTC (rev 9746)
@@ -21,7 +21,7 @@
 	#
 	# Summary:
 	# -----------------------------------------------------------------------------
-	# This component loads the artist and release (if type=ALBUM_ANNOTATION)
+	# This component loads the artist and release (if type=RELEASE_ANNOTATION)
 	# object and returns them as list. If type is ARTIST_ANNOTATION, undef is
 	# returned for the release object.
 	#

Modified: mb_server/branches/terminology/htdocs/edit/annotation/edit-link
===================================================================
--- mb_server/branches/terminology/htdocs/edit/annotation/edit-link	2008-03-09 20:57:07 UTC (rev 9745)
+++ mb_server/branches/terminology/htdocs/edit/annotation/edit-link	2008-03-09 21:23:28 UTC (rev 9746)
@@ -41,10 +41,10 @@
 						$annotation->GetArtist(),
 						$annotation->GetId());
 	}
-	elsif ($type == &MusicBrainz::Server::Annotation::ALBUM_ANNOTATION)
+	elsif ($type == &MusicBrainz::Server::Annotation::RELEASE_ANNOTATION)
 	{
 		$m->out(sprintf qq!<a href="/edit/annotation/album/edit.html?id=%d&amp;annotationid=%d">Edit</a>!,
-						$annotation->GetAlbum(),
+						$annotation->GetRelease(),
 						$annotation->GetId());
 	}
 	elsif ($type == &MusicBrainz::Server::Annotation::LABEL_ANNOTATION)

Modified: mb_server/branches/terminology/htdocs/edit/annotation/latest
===================================================================
--- mb_server/branches/terminology/htdocs/edit/annotation/latest	2008-03-09 20:57:07 UTC (rev 9745)
+++ mb_server/branches/terminology/htdocs/edit/annotation/latest	2008-03-09 21:23:28 UTC (rev 9746)
@@ -58,7 +58,7 @@
 		$entitytype = "album";
 		$entitytype2 = "release";
 		$entityid = $album->GetId;
-		$annotation->SetAlbum($album->GetId);
+		$annotation->SetRelease($album->GetId);
 	}
 	elsif (defined $label)
 	{

Modified: mb_server/branches/terminology/htdocs/edit/annotation/show
===================================================================
--- mb_server/branches/terminology/htdocs/edit/annotation/show	2008-03-09 20:57:07 UTC (rev 9745)
+++ mb_server/branches/terminology/htdocs/edit/annotation/show	2008-03-09 21:23:28 UTC (rev 9746)
@@ -21,7 +21,7 @@
 	#
 	# Summary:
 	# -----------------------------------------------------------------------------
-	# This component loads the artist and release (if type=ALBUM_ANNOTATION)
+	# This component loads the artist and release (if type=RELEASE_ANNOTATION)
 	# object and returns them as list. If type is ARTIST_ANNOTATION, undef is
 	# returned for the release object.
 	#




More information about the MusicBrainz-commits mailing list