[mb-commits] branch, mbs-5288, updated. MBS-5288, use ForceArray when calling XMLin instead of normalizing the result...
MusicBrainz Git Server <[email protected]> Mon, 31 Dec 2012 10:28:45 +0000
| Newsgroups | gmane.comp.audio.musicbrainz.cvs |
|---|---|
| Message-ID | <E1Tpcbt-0000MZ-Jw@wiley> |
The branch, mbs-5288 has been updated
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=01f1b1623a9b3473ffd85cb27edfe8829fe0732b (commit)
from http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=9acb63a0b30cd25877d7de2cc9e72e8cb4f547d5 (commit)
Summary of changes:
lib/MusicBrainz/Server/Data/WikiDocIndex.pm | 9 +--------
1 files changed, 1 insertions(+), 8 deletions(-)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 01f1b1623a9b3473ffd85cb27edfe8829fe0732b
Author: warp <[email protected]>
Date: Mon Dec 31 11:24:51 2012 +0100
MBS-5288, use ForceArray when calling XMLin instead of normalizing the result later on.
diff --git a/lib/MusicBrainz/Server/Data/WikiDocIndex.pm b/lib/MusicBrainz/Server/Data/WikiDocIndex.pm
index 9bc0bee..9010a13 100644
--- a/lib/MusicBrainz/Server/Data/WikiDocIndex.pm
+++ b/lib/MusicBrainz/Server/Data/WikiDocIndex.pm
@@ -162,6 +162,7 @@ sub get_wiki_versions
# Parse the XML and make it easier to use.
my $xml = XMLin(
$content,
+ ForceArray => [ 'page' ],
KeyAttr => { page => 'title', r => 'from', n => 'to'},
GroupTags => { pages => 'page', redirects => 'r', normalized => 'n' }
);
@@ -169,14 +170,6 @@ sub get_wiki_versions
my $pages = $xml->{query}->{pages};
my $normalized = $xml->{query}->{normalized};
- if (defined $pages->{title})
- {
- my $newpages = { };
- $newpages->{ $pages->{title} } = $pages;
-
- $pages = $newpages;
- }
-
foreach my $title (keys %$pages) {
my $info->{wiki_version} = $pages->{$title}->{lastrevid};
-----------------------------------------------------------------------
hooks/post-receive
--
mb_server