Allow for file names containing '-'
authorMichael Ang <testflip@home.us.archive.org>
Thu, 2 Jul 2009 00:27:02 +0000 (00:27 +0000)
committerMichael Ang <testflip@home.us.archive.org>
Thu, 2 Jul 2009 00:27:02 +0000 (00:27 +0000)
GnuBookIA/inc/FlipSearchMap.inc

index 8756d25..e9345ca 100644 (file)
@@ -140,7 +140,7 @@ class FlipSearchMap {
     //For now we'll parse the $url passed us.
     #if (!preg_match('|http://\w+.archive.org(/[0-9]/items/\w+)/(\w+)_djvu.xml$|', $url, $match))
     #if (!preg_match('|(\w+)/(\w+)_djvu.xml$|', $url, $match))      
-    if (!preg_match('|(/[0-9]/items/\w+)/(\w+)_djvu.xml$|', $url, $match))
+    if (!preg_match('|(/[0-9]/items/[\w-]+)/([\w-]+)_djvu.xml$|', $url, $match))
       fatal("Can't get server and identifier from url $url");
     $bookDir = $match[1];
     $identifier = $match[2];