// manually update with Launchpad version number at each checkin so that browsers
// do not use old cached version
// see https://bugs.launchpad.net/gnubook/+bug/330748
- $version = "0.9.18";
+ $version = "0.9.20";
if ("" == $id) {
echo "No identifier specified!";
<?
exit;
}
+
- public static function jsMetadataURL($server, $identifier, $mainDir, $subPrefix = '')
+ public static function serverBaseURL($server)
{
- $serverBaseURL = $server;
-
- // Check if we're on a dev vhost and point to JSIA in the user's public_html on the datanode
+ // Check if we're on a dev vhost and point to JSIA in the user's public_html
+ // on the datanode
if (preg_match("/^www-(\w+)/", $_SERVER["SERVER_NAME"], $match)) {
// $$$ the remapping isn't totally automatic yet and requires user to
// ln -s ~/petabox/www/datanode/BookReader ~/public_html/BookReader
// so we enable it only for known hosts
- $devhosts = array('mang', 'testflip');
+ $devhosts = array('mang', 'testflip', 'rkumar');
if (in_array($match[1], $devhosts)) {
- $serverBaseURL = $serverBaseURL . "/~" . $match[1];
+ $server = $server . "/~" . $match[1];
}
}
-
+ return $server;
+ }
+
+
+ public static function jsMetadataURL($server, $identifier, $mainDir, $subPrefix = '')
+ {
+ $serverBaseURL = BookReader::serverBaseURL($server);
+
$params = array( 'id' => $identifier, 'itemPath' => $mainDir, 'server' => $server );
if ($subPrefix) {
$params['subPrefix'] = $subPrefix;