[open-ils-commits] r15105 - trunk/Open-ILS/src/perlmods/OpenILS/WWW (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Dec 8 15:35:11 EST 2009
Author: miker
Date: 2009-12-08 15:35:06 -0500 (Tue, 08 Dec 2009)
New Revision: 15105
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/WWW/AddedContent.pm
Log:
Add global support for local added content files.
If files exist under (by default) /openils/var/web/opac/extras/ac/{type}/{format}/{key}
on the content server (the main server, unless a separate content server is configured),
these will be served in preference to remote added content. The files here should contain
the same type of data that would be expected from a remote added-content engine, such as
images or html pages.
* "type" is one of jacket, reviews, toc, excerpt or anotes
* "format" is type dependent:
- for jacket, one of small, medium or large
- others, one of html, xml or json ... html is the default for non-image added content
* "key" is the sanitized ISBN (any leading spaces are removed, then anything after the
first space is removed)
Modified: trunk/Open-ILS/src/perlmods/OpenILS/WWW/AddedContent.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/WWW/AddedContent.pm 2009-12-08 19:08:32 UTC (rev 15104)
+++ trunk/Open-ILS/src/perlmods/OpenILS/WWW/AddedContent.pm 2009-12-08 20:35:06 UTC (rev 15105)
@@ -77,6 +77,8 @@
sub handler {
my $r = shift;
+ return Apache2::Const::DECLINED if (-e $r->filename);
+
my $cgi = CGI->new;
my $path = $r->path_info;
my $res;
More information about the open-ils-commits
mailing list