fix export, web_path was not set correctly
authorAndreas Unterkircher <unki@netshadow.at>
Sun, 25 May 2008 07:20:24 +0000 (09:20 +0200)
committerAndreas Unterkircher <unki@netshadow.at>
Sun, 25 May 2008 08:02:09 +0000 (10:02 +0200)
Signed-off-by: Andreas Unterkircher <unki@netshadow.at>
phpfspot.class.php
phpfspot.js
themes/default/templates/export.tpl

index 9a1106961f61041980594481519d1f0679c54f76..60521adf247c2a15ed98d3f6a6abc4de7917e05f 100644 (file)
@@ -299,7 +299,9 @@ class PHPFSPOT {
                }
                break;
             case 'export':
-               $this->tmpl->show("export.tpl");
+               /* fetch export template */
+               print $this->tmpl->fetch("export.tpl");
+               /* no further execution necessary. */
                return;
                break;
             case 'slideshow':
index 19224483d4fdfcc1321c229156ec1e0f15a8dce4..ebe124225f169a182530acda770bdccc46c22f72 100644 (file)
@@ -337,8 +337,13 @@ function datesearch()
  * called for photo-index export. will return the
  * selected mode via AJAX from the server.
  */
-function setViewMode(mode)
+function setViewMode(srv_webpath, mode)
 {
+   if(srv_webpath != undefined)
+      web_path = srv_webpath;
+   else
+      web_path = '';
+
    var exprt = document.getElementById('output');
    exprt.innerHTML = "Loading...";
    exprt.innerHTML = HTML_AJAX.grab(encodeURI(web_path + '/rpc.php?action=get_export&mode=' + mode));
index 7f6f2de9ec0a00a3368ce4dbb08a2cf042cf84ad..d7443de0371291d3505adcf30c017c2b114356f7 100644 (file)
@@ -1,7 +1,7 @@
 {include file="header.tpl"}
  <body>
   <div id="frame">
-  <form action="javascript:#" onsubmit="setViewMode(document.getElementsByName('format')[0].options[document.getElementsByName('format')[0].selectedIndex].value); return false;">
+  <form action="javascript:#" onsubmit="setViewMode('{$web_path}', document.getElementsByName('format')[0].options[document.getElementsByName('format')[0].selectedIndex].value); return false;">
    <select name="format">
     <option value="HTML">HTML</option>
     <option value="MoinMoin">MoinMoin Wiki</option>