Skip Menu |

This queue is for tickets about the MediaWiki CPAN distribution.

Report information
The Basics
Id: 21174
Status: resolved
Priority: 0/
Queue: MediaWiki

People
Owner: edwardspec [...] gmail.com
Requestors: stuart.caie [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 1.03
  • 1.04
  • 1.05
  • 1.06
  • 1.07
Fixed in: (no value)



Subject: Bug in filepath()/download()
The download() and filepath() functions fail on my wiki (MediaWiki 1.7.1) because it puts a newline between the opening and closing tags of the "fullImageLink" div. The fix is very simple - make the $filepath_regex match more than one line.
Subject: filepath_newline.patch
--- .cpan/build/MediaWiki-1.07/lib/MediaWiki/page.pm 2006-08-19 14:33:39.000000000 +0100 +++ perl/share/perl/5.8.4/MediaWiki/page.pm 2006-08-24 22:34:54.000000000 +0100 @@ -64,7 +64,7 @@ $li_regex = qr/(?<=<li>).*?(?=<\/li>)/; $link_regex1 = qr/<a href=["']\/wiki\/(.*?)["'].*?title=["'](?:.*?)['"]>(.*?)<\/a>/; - $filepath_regex = qr/(?<=<div class=["']fullImageLink["'] id=["']file["']>).*?(?=<\/div>)/; + $filepath_regex = qr/(?<=<div class=["']fullImageLink["'] id=["']file["']>).*?(?=<\/div>)/s; $src_regex = qr/(?<=src=['"]).*?(?=['"])/; $oldid_regex = qr/(?<=&amp;oldid=)[0-9]+(?=")/;
Fixed in version 1.08.