Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'hotfix/'

  • Loading branch information...
commit 4fcc1446ed89f76d29f7ac46c800b540e5ddefec 2 parents 5b63f43 + db74619
@amalloy amalloy authored
2  project.clj
@@ -1,4 +1,4 @@
-(defproject foreclojure ""
+(defproject foreclojure ""
:description "4clojure - a website for lisp beginners"
:dependencies [[clojure "1.2.1"]
[clojure-contrib "1.2.0"]
BIN  resources/public/images/gus-of-disapproval.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 src/foreclojure/solutions.clj
@@ -20,9 +20,9 @@
:only [(keyword (str "scores." problem-id))
(cond (seq scores) (str "Scored " (first (vals scores))
- ", before 4clojure started storing solutions."),
+ ", before 4clojure started saving solutions."),
- (some #{problem-id} solved) "Solved before 4clojure started saving solutions")))))
+ (some #{problem-id} solved) "Solved before 4clojure started scoring solutions")))))
(defn save-solution [user-id problem-id code]
(update! :solutions
14 src/foreclojure/users.clj
@@ -72,14 +72,16 @@
(let [canonical-email (comp string/trim string/lower-case)
md5 #(DigestUtils/md5Hex %)
- no-gravatar-url (static-url "images/no-gravatar.png")
- encoded (URLEncoder/encode no-gravatar-url)]
- (defn gravatar-img [{:keys [email size class] :or {size 24}}]
+ as-url #(URLEncoder/encode (static-url %))
+ no-gravatar-url (as-url "images/no-gravatar.png")]
+ (defn gravatar-img [{:keys [email size class default] :or {size 24}}]
(let [hash (if email
(md5 (canonical-email email))
url (str (name *http-scheme*) "://"
- hash "?s=" size "&d=" encoded)]
+ hash "?s=" size "&d=" (if default
+ (as-url default)
+ no-gravatar-url))]
[:img (conj {:src url, :alt "gravatar icon"
:width size :height size}
(when class {:class class}))])))
@@ -180,7 +182,9 @@
{:title page-title
- [:div#profile-pic (gravatar-img {:email email, :size 80 :class "user-profile-img"})]
+ [:div#profile-pic (gravatar-img {:email email, :size 80
+ :class "user-profile-img"
+ :default "images/gus-of-disapproval.png"})]
[:div.user-profile-name page-title]
(if (session/session-get :user)
(with-user [{:keys [_id following]}]
Please sign in to comment.
Something went wrong with that request. Please try again.