# HG changeset patch # User fabien # Date 1065971491 14400 # Node ID 4d194fce51e168cbbe512f88a62fd74cee09da8e # Parent 6d31ed0f6ad340b468dc13dfe4b29f2b1ddffc19 [svn r1594] Update to use user's preferences. diff -r 6d31ed0f6ad3 -r 4d194fce51e1 add_confirm.py --- a/add_confirm.py Sun Oct 12 10:55:22 2003 -0400 +++ b/add_confirm.py Sun Oct 12 11:11:31 2003 -0400 @@ -13,7 +13,8 @@ # import cgitb; cgitb.enable() import cgi -from htmltmpl import TemplateManager, TemplateProcessor +from htmltmpl import TemplateManager +from webutils import get_template_processor import my_db import time from bkmark import Bookmark @@ -56,10 +57,9 @@ kw = unique(kw) return kw -def main(action, bk, kw): +def main(action, bk, kw, prefs): tmpl = TemplateManager().prepare("add_confirm.tmpl") - tproc = TemplateProcessor() - tproc.set("pagetitle", os.environ["REMOTE_USER"]+"'s XBELWeb Confirmation") + tproc = get_template_processor(prefs) tproc.set("confirm_delete", action == 'delete') tproc.set("confirm_update", action == 'update') tproc.set("action", action) @@ -84,5 +84,5 @@ bk = db.get_bookmarks([id])[0] (ids, kw) = apply(zip,db.get_keywords([id])) kw = kw[1:] - main(action, bk, kw) + main(action, bk, kw, db.get_preferences()) diff -r 6d31ed0f6ad3 -r 4d194fce51e1 add_confirm.tmpl --- a/add_confirm.tmpl Sun Oct 12 10:55:22 2003 -0400 +++ b/add_confirm.tmpl Sun Oct 12 11:11:31 2003 -0400 @@ -2,7 +2,7 @@ -

+

's Confirmation

Bookmark diff -r 6d31ed0f6ad3 -r 4d194fce51e1 add_result.py --- a/add_result.py Sun Oct 12 10:55:22 2003 -0400 +++ b/add_result.py Sun Oct 12 11:11:31 2003 -0400 @@ -11,7 +11,8 @@ # import cgitb; cgitb.enable() import cgi -from htmltmpl import TemplateManager, TemplateProcessor +from htmltmpl import TemplateManager +from webutils import get_template_processor import time from utils import unique import my_db @@ -31,10 +32,9 @@ kw.append(id) return kw -def main(bk, kw): +def main(bk, kw, prefs): tmpl = TemplateManager().prepare("add_result.tmpl") - tproc = TemplateProcessor() - tproc.set("pagetitle", os.environ["REMOTE_USER"]+"'s XBELWeb Result") + tproc = get_template_processor(prefs) tproc.set("url", bk.url) tproc.set("name", bk.name) tproc.set("added", bk.added) @@ -62,4 +62,4 @@ id = bk.id db.update_keywords(id, kw) kw = map(lambda e: { 'keyword': e[1] }, db.get_keywords([id])[1:]) - main(bk, kw) + main(bk, kw, db.get_preferences()) diff -r 6d31ed0f6ad3 -r 4d194fce51e1 add_result.tmpl --- a/add_result.tmpl Sun Oct 12 10:55:22 2003 -0400 +++ b/add_result.tmpl Sun Oct 12 11:11:31 2003 -0400 @@ -2,7 +2,7 @@ -

+

's Add Result

Bookmark successfully added:

@@ -11,7 +11,7 @@ ;


-

Retour à la page principale

+

Back to the main page