From 88f06748f6231e2c6b8c9a97732fb3f7c811a34b Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sat, 8 Dec 2007 15:14:24 -0500 Subject: [PATCH] Pastebin and source web app updates --- extra/webapps/pastebin/new-paste.furnace | 2 +- extra/webapps/pastebin/pastebin.factor | 9 ++++----- extra/webapps/source/source.factor | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/extra/webapps/pastebin/new-paste.furnace b/extra/webapps/pastebin/new-paste.furnace index c647df82b0..46cf0df818 100755 --- a/extra/webapps/pastebin/new-paste.furnace +++ b/extra/webapps/pastebin/new-paste.furnace @@ -1,7 +1,7 @@ <% USING: furnace namespaces ; %> <% - "new paste" "title" set + "New paste" "title" set "header" render-template %> diff --git a/extra/webapps/pastebin/pastebin.factor b/extra/webapps/pastebin/pastebin.factor index cd81c74828..555670e7fa 100755 --- a/extra/webapps/pastebin/pastebin.factor +++ b/extra/webapps/pastebin/pastebin.factor @@ -79,9 +79,10 @@ SYMBOL: store pastebin-pastes 2dup length swap set-paste-n push ; : submit-paste ( summary author channel mode contents -- ) - - \ pastebin get-global add-paste - save-pastebin-store ; + [ + \ pastebin get-global add-paste + save-pastebin-store + ] keep paste-link permanent-redirect ; \ submit-paste { { "summary" v-required } @@ -91,8 +92,6 @@ SYMBOL: store { "contents" v-required } } define-action -\ submit-paste [ paste-list ] define-redirect - : annotate-paste ( n summary author mode contents -- ) swap get-paste paste-annotations push diff --git a/extra/webapps/source/source.factor b/extra/webapps/source/source.factor index 36fbf9d5ae..efc46c68b7 100755 --- a/extra/webapps/source/source.factor +++ b/extra/webapps/source/source.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2007 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: io.files namespaces webapps.file http.server.responders -xmode.code2html kernel ; +xmode.code2html kernel html ; IN: webapps.source global [ @@ -12,7 +12,7 @@ global [ [ drop serving-html - swap htmlize-stream + [ swap htmlize-stream ] with-html-stream ] serve-file-hook set file-responder ] with-scope