Commit 5d5b9258 authored by Liang Ding's avatar Liang Ding

Fix #316

parent 1b4d7c05
......@@ -66,7 +66,7 @@ import org.jsoup.Jsoup;
* Article processor.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.1.2.11, Jul 11, 2013
* @version 1.1.2.12, Oct 14, 2013
* @since 0.3.1
*/
@RequestProcessor
......@@ -1244,7 +1244,7 @@ public class ArticleProcessor {
*/
private void prepareShowArticle(final JSONObject preference, final Map<String, Object> dataModel, final JSONObject article)
throws Exception {
article.put(Common.COMMENTABLE, article.getBoolean(Article.ARTICLE_COMMENTABLE));
article.put(Common.COMMENTABLE, preference.getBoolean(Preference.COMMENTABLE) && article.getBoolean(Article.ARTICLE_COMMENTABLE));
article.put(Common.PERMALINK, article.getString(Article.ARTICLE_PERMALINK));
dataModel.put(Article.ARTICLE, article);
final String articleId = article.getString(Keys.OBJECT_ID);
......
......@@ -49,7 +49,7 @@ import org.json.JSONObject;
* Page processor.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.1.0.2, Apr 29, 2012
* @version 1.1.0.3, Oct 14, 2013
* @since 0.3.1
*/
@RequestProcessor
......@@ -123,7 +123,7 @@ public class PageProcessor {
final String pageId = page.getString(Keys.OBJECT_ID);
page.put(Common.COMMENTABLE, page.getBoolean(Page.PAGE_COMMENTABLE));
page.put(Common.COMMENTABLE, preference.getBoolean(Preference.COMMENTABLE) && page.getBoolean(Page.PAGE_COMMENTABLE));
page.put(Common.PERMALINK, page.getString(Page.PAGE_PERMALINK));
dataModel.put(Page.PAGE, page);
final List<JSONObject> comments = commentQueryService.getComments(pageId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment