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 9a11069..60521ad 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 1922448..ebe1242 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 7f6f2de..d7443de 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>