Skip to content

Commit

Permalink
fixed api browser on apache
Browse files Browse the repository at this point in the history
  • Loading branch information
taoeffect committed Nov 6, 2009
1 parent 946a460 commit d76d1c8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions .hgignore
Expand Up @@ -3,3 +3,4 @@
plugins-active/_config\.lsp$ plugins-active/_config\.lsp$
test_.+\.lsp$ test_.+\.lsp$
\.pxm$ \.pxm$
~$
Expand Up @@ -30,7 +30,7 @@
<div id="api-browser">&nbsp</div> <div id="api-browser">&nbsp</div>
<script type="text/javascript"> <script type="text/javascript">
(function api_browse(path, anchor) { (function api_browse(path, anchor) {
$.post("/?dragonfly_ajax-api", "path=" + path, $.post("%s", "path=" + path,
function (data) { function (data) {
$("#api-browser").html(data); $("#api-browser").html(data);
$("#api-browser a").click(function () { $("#api-browser a").click(function () {
Expand All @@ -50,7 +50,7 @@
); );
})("%s"); })("%s");
</script> </script>
[/text] path) [/text] (web-root "dragonfly_ajax-api" true) path)
) )
) )


Expand Down
2 changes: 0 additions & 2 deletions example-site/views/dragonfly_ajax-api.html
Expand Up @@ -2,8 +2,6 @@
(let (path ($POST "path")) (let (path ($POST "path"))
; security check! make sure they ain't asking ; security check! make sure they ain't asking
; for something they shouldn't be asking for! ; for something they shouldn't be asking for!
(log-info "path: " path)
(log-info "our path: " (real-path))
(if (and (find "../api-docs/" path) (ends-with path ".html")) (if (and (find "../api-docs/" path) (ends-with path ".html"))
(include path) (include path)
(die "bad path: " path) (die "bad path: " path)
Expand Down

0 comments on commit d76d1c8

Please sign in to comment.