Skip to content

Instantly share code, notes, and snippets.

@benjamn
Created October 13, 2011 18:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benjamn/1285143 to your computer and use it in GitHub Desktop.
Save benjamn/1285143 to your computer and use it in GitHub Desktop.
diff --git a/quora/src/main/scala/com/quora/web/app/view/question/question.scala b/quora/src/main/scala/com/quora/web/app/view/question/question.scala
index 330bdb1..47efa80 100644
--- a/quora/src/main/scala/com/quora/web/app/view/question/question.scala
+++ b/quora/src/main/scala/com/quora/web/app/view/question/question.scala
@@ -2239,29 +2239,30 @@ class QuestionMain(qid: Long, redirectedQid: Option[Long] = None)
z += new QuestionWikiPageLink(qid)
needsBullet = true
}
if (m.Permissions.canDoOnQid(viewer, "on_questions", qid)) {
if (needsBullet) {
z += Util.bullet()
needsBullet = false
}
if (bool(viewer) &&
(m.Question.canDeleteQuestion(viewer.get, qid) ||
((m.Admin.userHasAdminPrivileges(viewer.get, "review_questions", maybeQid = Some(qid)) &&
! m.Admin.reviewerControlsHidden(viewer)))))
- z += new QuestionDeleteLink(qid) {
+ {
+ z += new QuestionDeleteLink(qid)
} else {
// TODO(port) z += new av.report.ReportLink(qid, "qid", "Question")
}
needsBullet = true
}
z
}
override def knowsAbout() = Map(
"comments_list" -> "comments_list",
"question_topics" -> "question_topics")
}
@benjamn
Copy link
Author

benjamn commented Oct 13, 2011

First thought: There's no way this code should have compiled before this fix.
Second thought: Oh… my… god…
Final thought: Scala is so powerful, it makes sense of your typos in ways you never dreamed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment