diff options
| author | dumpfmprod <dumpfmprod@ubuntu.(none)> | 2010-01-15 14:22:44 -0500 |
|---|---|---|
| committer | dumpfmprod <dumpfmprod@ubuntu.(none)> | 2010-01-15 14:22:44 -0500 |
| commit | 549fd3567f0871e342fd75b4334419786ed03029 (patch) | |
| tree | bdeb06ba95bfe3da25de8eab4c2c4a3e72268837 | |
| parent | 4167e78c42ee2e4ccf19e9a45bab4f22bf3df059 (diff) | |
| parent | 692e2d725f278708324fd2534007448ed03a150d (diff) | |
Merge branch 'master' of /pichat/repo/
| -rwxr-xr-x | src/site.clj | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/site.clj b/src/site.clj index d387247..5868f94 100755 --- a/src/site.clj +++ b/src/site.clj @@ -194,17 +194,12 @@ ;; Templates -(defn set-user-attributes [st session] - (if (session :nick) - (.setAttribute st "user_nick" (session :nick)) - (.setAttribute st "isadmin" (session :is_admin)))) - (defn fetch-template [template-name session] (let [st (.getInstanceOf template-group template-name)] - (and st - (do - (set-user-attributes st session) - st)))) + (if (and st (session :nick)) + (do (.setAttribute st "user_nick" (session :nick)) + (.setAttribute st "isadmin" (session :is_admin)))) + st)) ;; Landing |
