From 0041a3b27a4d324452268482b5754c037a20d552 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sun, 24 May 2009 21:46:15 +0000 Subject: [PATCH] web: period arg wasn't being preserved --- Commands/Web.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Commands/Web.hs b/Commands/Web.hs index aa105da26..91de991f3 100644 --- a/Commands/Web.hs +++ b/Commands/Web.hs @@ -64,7 +64,7 @@ webHandlers opts args l t = msum ] where view f = withDataFn rqdata $ render f - render f (a,p) = layout (a, p) $ f opts' args' l' + render f (a,p) = layout (a,p) $ f opts' args' l' where opts' = opts ++ [Period p] args' = args ++ (map urlDecode $ words a) @@ -106,7 +106,9 @@ maintemplate (a,p) r = printf (unlines -- another way to get them -- a = fromMaybe "" $ queryValue "a" r -- p = fromMaybe "" $ queryValue "p" r - q' = intercalate "&" $ if null a then [] else [(("a="++).urlEncode) a] ++ if null p then [] else [(("p="++).urlEncode) p] + q' = intercalate "&" $ + (if null a then [] else [(("a="++).urlEncode) a]) ++ + (if null p then [] else [(("p="++).urlEncode) p]) q = if null q' then "" else '?':q' resetlink | null a && null p = "" | otherwise = printf "  reset" u