[Lisppaste-cvs] CVS update: lisppaste2/web-server.lisp

Brian Mastenbrook bmastenbrook at common-lisp.net
Fri Jun 11 15:00:42 UTC 2004


Update of /project/lisppaste/cvsroot/lisppaste2
In directory common-lisp.net:/home/bmastenbrook/lisppaste2

Modified Files:
	web-server.lisp 
Log Message:
Allow selected colorization to override default

Date: Fri Jun 11 08:00:41 2004
Author: bmastenbrook

Index: lisppaste2/web-server.lisp
diff -u lisppaste2/web-server.lisp:1.54 lisppaste2/web-server.lisp:1.55
--- lisppaste2/web-server.lisp:1.54	Fri Jun 11 06:02:38 2004
+++ lisppaste2/web-server.lisp	Fri Jun 11 08:00:41 2004
@@ -1,4 +1,4 @@
-;;;; $Id: web-server.lisp,v 1.54 2004/06/11 13:02:38 bmastenbrook Exp $
+;;;; $Id: web-server.lisp,v 1.55 2004/06/11 15:00:41 bmastenbrook Exp $
 ;;;; $Source: /project/lisppaste/cvsroot/lisppaste2/web-server.lisp,v $
 
 ;;;; See the LICENSE file for licensing information.
@@ -529,7 +529,7 @@
               `((tr
                  (th (i "(Optional) Colorize as: "))
                  (td ((select :name "colorize")
-                      ((option :value "" :selected "SELECTED") "")
+                      ((option :value "" :selected "SELECTED") "Default for this channel")
                       ((option :value "None") "None")
                       ,@(mapcar #'(lambda (pair)
                                     `((option :value ,(cdr pair))
@@ -656,7 +656,9 @@
                   ,@(if (not annotation)
                         `((,(encode-for-pre (paste-channel paste)) ,(if *meme-links*
                                                                         " | " ""))))
-                  ,@(if *meme-links*
+                  ,@(if (and *meme-links*
+                             (not (and *no-channel-pastes*
+                                       (string-equal (paste-channel paste) "None"))))
                         `(((a :href ,(irc-log-link (paste-universal-time paste) (paste-channel paste))) "Context in IRC logs")))))))
         (tr ((td :align "left" :valign "top" :nowrap "nowrap") "Paste contents:")
          ,@(if this-url
@@ -685,10 +687,12 @@
                                element)) *pastes*))
          (linenumbers (equalp (araneida:body-param "linenumbers" (araneida:request-body request))
                                     "true"))
-         (colorize-string (or (and paste
-                                   (> (length (paste-colorization-mode paste)) 0)
-                                   (paste-colorization-mode paste))
-                              (araneida:body-param "colorize" (araneida:request-body request))))
+         (colorize-string (or
+                           (araneida:body-param "colorize" (araneida:request-body request))
+                           (and paste
+                                (> (length (paste-colorization-mode paste)) 0)
+                                (paste-colorization-mode paste))
+                           ))
          (colorize-as (or
                        (car (rassoc colorize-string (colorize:coloring-types) :test #'string-equal))
                        (if (and paste





More information about the Lisppaste-cvs mailing list