[Remove the extra Args parameter, now uses a cookie for Ajax features Neil Mitchell**20110115211115] { hunk ./src/Web/All.hs 14 --- FIXME: Only server will preserve extra flags hunk ./src/Web/All.hs 15 - res <- response "datadir/resources" [] q + res <- response "datadir/resources" q hunk ./src/Web/Page.hs 8 -searchLink :: Args -> String -> URL -searchLink extra x = "?" ++ concat [a ++ "=" ++% b ++ "&" | (a,b) <- extra, a /= "hoogle"] ++ "hoogle=" ++% x +searchLink :: String -> URL +searchLink x = "?hoogle=" ++% x hunk ./src/Web/Page.hs 59 -welcome extra = +welcome = hunk ./src/Web/Page.hs 85 - search x = "" ++& x ++ "
" + search x = "" ++& x ++ "
" hunk ./src/Web/Response.hs 21 --- extra is a hack, should be replaced with a local cookie, until it becomes the default -response :: FilePath -> Args -> CmdLine -> IO (Response String) -response resources extra q = do + +response :: FilePath -> CmdLine -> IO (Response String) +response resources q = do hunk ./src/Web/Response.hs 31 - return $ runQuery extra ajax dbs q + return $ runQuery ajax dbs q hunk ./src/Web/Response.hs 63 -runQuery :: Args -> Bool -> Database -> CmdLine -> [String] -runQuery extra ajax dbs Search{queryParsed = Left err} = +runQuery :: Bool -> Database -> CmdLine -> [String] +runQuery ajax dbs Search{queryParsed = Left err} = hunk ./src/Web/Response.hs 80 -runQuery extra ajax dbs q | isBlankQuery $ fromRight $ queryParsed q = welcome extra +runQuery ajax dbs q | isBlankQuery $ fromRight $ queryParsed q = welcome hunk ./src/Web/Response.hs 83 -runQuery extra ajax dbs cq@Search{queryParsed = Right q, queryText = qt} = +runQuery ajax dbs cq@Search{queryParsed = Right q, queryText = qt} = hunk ./src/Web/Response.hs 87 - ["

" ++ showTag extra sug ++ "

" | Just sug <- [querySuggestions dbs q]] ++ + ["

" ++ showTag sug ++ "

" | Just sug <- [querySuggestions dbs q]] ++ hunk ./src/Web/Response.hs 101 - res = [renderRes extra i (i /= 0 && i == start2 && prefix) x | (i,(_,x)) <- zip [0..] src] + res = [renderRes i (i /= 0 && i == start2 && prefix) x | (i,(_,x)) <- zip [0..] src] hunk ./src/Web/Response.hs 108 - "
  • " ++ x ++ "
  • " + "
  • " ++ x ++ "
  • " hunk ./src/Web/Response.hs 110 - "
  • " ++ - "" ++ x ++ "
  • " + "
  • " ++ + "" ++ x ++ "
  • " hunk ./src/Web/Response.hs 114 - urlMore = searchLink extra qt ++ "&start=" ++ show (start2+count2+1) ++ "#more" + urlMore = searchLink qt ++ "&start=" ++ show (start2+count2+1) ++ "#more" hunk ./src/Web/Response.hs 118 -renderRes :: Args -> Int -> Bool -> Result -> [String] -renderRes extra i more Result{..} = +renderRes :: Int -> Bool -> Result -> [String] +renderRes i more Result{..} = hunk ./src/Web/Response.hs 131 - showTag extra docs ++? + showTag docs ++? hunk ./src/Web/Response.hs 146 -showTag :: Args -> TagStr -> String -showTag extra = showTagHTML . transform f +showTag :: TagStr -> String +showTag = showTagHTML . transform f hunk ./src/Web/Response.hs 149 - f (TagLink "" x) = TagLink (if "http:" `isPrefixOf` str then str else searchLink extra str) x + f (TagLink "" x) = TagLink (if "http:" `isPrefixOf` str then str else searchLink str) x hunk ./src/Web/Server.hs 6 -import General.Util hunk ./src/Web/Server.hs 66 - r <- response "/res" (reps ("mode","ajax") ("ajax","1") args) cmd{databases=databases} + r <- response "/res" cmd{databases=databases} }