chiark / gitweb /
New non-broken commodmap XML
[ypp-sc-tools.web-live.git] / pctb / yppsc-commod-processor
index 2083be17221c1037db72151526b999b9b310ea88..0eb505644636f7d4cb3ccdf5e1bf7fb9bbdb8aab 100755 (executable)
@@ -235,7 +235,7 @@ sub load_commodmap() {
 
 sub refresh_commodmap() {
     my $ua= LWP::UserAgent->new;
-    my $resp= $ua->get("$pctb/commodmap.php");
+    my $resp= $ua->get("$pctb/commodmap.php?version=2");
     die $resp->status_line unless $resp->is_success;
 
     my $cdata='';
@@ -287,9 +287,6 @@ sub refresh_commodmap() {
         }) or die;
     my $content= $resp->content;
 
-    # hacks to strip off drivel that seems to have been added!
-    $content =~ s/^.*\n(\<\?xml)/$1/s;
-    $content =~ s/\<\/body\>.*//s;
 #    print STDERR "[[[$content]]]\n";
     $xp->parse($content);
     close $o or die $!;