1.1 --- a/README.txt Sun Nov 03 19:40:56 2013 +0100
1.2 +++ b/README.txt Sun Nov 03 22:33:56 2013 +0100
1.3 @@ -237,8 +237,8 @@
1.4 also supports PDF page exports since the "doexportpage" action uses
1.5 identifiers to indicate which page is to be exported. In an environment that
1.6 uses .htaccess and mod_rewrite, the redirect.py script should also be deployed
1.7 -under a separate name (such as export.py) so that it can discover whether it
1.8 -should be exporting a page instead of just showing it.
1.9 +under separate names (such as export.py and exportpdf.py) so that it can
1.10 +discover whether it should be exporting a page instead of just showing it.
1.11
1.12 The search.py script redirects search requests in a suitable form to the
1.13 MoinMoin "fullsearch" action.
2.1 --- a/config/mailmanwiki-redirect Sun Nov 03 19:40:56 2013 +0100
2.2 +++ b/config/mailmanwiki-redirect Sun Nov 03 22:33:56 2013 +0100
2.3 @@ -1,5 +1,6 @@
2.4 ScriptAlias /x "/var/www/mmwiki-scripts/redirect.py"
2.5 ScriptAlias /pages/viewpage.action "/var/www/mmwiki-scripts/redirect.py"
2.6 ScriptAlias /pages/doexportpage.action "/var/www/mmwiki-scripts/redirect.py"
2.7 +ScriptAlias /spaces/flyingpdf/pdfpageexport.action "/var/www/mmwiki-scripts/redirect.py"
2.8 ScriptAlias /dosearchsite.action "/var/www/mmwiki-scripts/search.py"
2.9 ScriptAlias /dashboard.action "/var/www/mmwiki-scripts/dashboard.py"
3.1 --- a/config/mailmanwiki-redirect-htaccess Sun Nov 03 19:40:56 2013 +0100
3.2 +++ b/config/mailmanwiki-redirect-htaccess Sun Nov 03 22:33:56 2013 +0100
3.3 @@ -12,6 +12,10 @@
3.4
3.5 RewriteCond %{REQUEST_FILENAME} !-f
3.6 RewriteCond %{REQUEST_FILENAME} !-d
3.7 +RewriteRule ^spaces/flyingpdf/pdfpageexport.action /exportpdf.py [PT,L,QSA]
3.8 +
3.9 +RewriteCond %{REQUEST_FILENAME} !-f
3.10 +RewriteCond %{REQUEST_FILENAME} !-d
3.11 RewriteRule ^dosearchsite.action /search.py [PT,L,QSA]
3.12
3.13 RewriteCond %{REQUEST_FILENAME} !-f
4.1 --- a/scripts/redirect.py Sun Nov 03 19:40:56 2013 +0100
4.2 +++ b/scripts/redirect.py Sun Nov 03 22:33:56 2013 +0100
4.3 @@ -17,6 +17,7 @@
4.4
4.5 URL_PREFIX = ""
4.6 EXPORT_SCRIPT = "/export.py"
4.7 +EXPORT_PDF_SCRIPT = "/exportpdf.py"
4.8
4.9 # See the scripts/tiny.py program for similar code in a stand-alone program.
4.10
4.11 @@ -80,7 +81,12 @@
4.12 if pageid is None:
4.13 fail(pageid)
4.14
4.15 - export = (script.endswith(EXPORT_SCRIPT) or script.endswith("/pages/doexportpage.action")) and args.get("type", [""])[0] == "TYPE_PDF"
4.16 + export = (script.endswith(EXPORT_SCRIPT) or
4.17 + script.endswith("/pages/doexportpage.action")
4.18 + ) and args.get("type", [""])[0] == "TYPE_PDF" or \
4.19 + (script.endswith(EXPORT_PDF_SCRIPT) or
4.20 + script.endswith("/spaces/flyingpdf/pdfpageexport.action")
4.21 + )
4.22
4.23 f = open(MAPPING_ID_TO_PAGE)
4.24 try: