From: Michael Ang Date: Mon, 25 Oct 2010 19:28:42 +0000 (+0000) Subject: Allow &subPrefix= in JSLocate, to match param name in Images X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=794abaec9d1ac3c6ff4d5ebec77a94644197f1c3;hp=de897e59ba78a369a1bf272dc0a721de95df1a13;p=bookreader.git Allow &subPrefix= in JSLocate, to match param name in Images --- diff --git a/BookReaderIA/www/BookReaderJSLocate.php b/BookReaderIA/www/BookReaderJSLocate.php index c71ffeb..f60d221 100644 --- a/BookReaderIA/www/BookReaderJSLocate.php +++ b/BookReaderIA/www/BookReaderJSLocate.php @@ -22,6 +22,7 @@ require_once '/petabox/setup.inc'; $id = $_REQUEST['id']; $book = $_REQUEST['book']; // support multiple books within an item +$subPrefix = $_REQUEST['subPrefix']; // same as above but with same naming as BookReaderImages if ("" == $id) { echo "No identifier specified!"; @@ -36,7 +37,9 @@ $server = $results[0][0]; $serverBaseURL = BookReader::serverBaseURL($server); $url = "http://{$serverBaseURL}/BookReader/BookReaderJSIA.php?id=" . urlencode($id) . "&itemPath={$results[0][1]}&server={$server}"; -if ($book) { +if ($subPrefix) { + $url .= "&subPrefix=" . urlencode($subPrefix); +} else if ($book) { $url .= "&subPrefix=" . urlencode($book); }