Skip to content

Commit 69947b6

Browse files
committed
Merge remote-tracking branch 'origin/2.3.0-dev' into 2.3.0-dev
2 parents e5dfd50 + 3e5686a commit 69947b6

File tree

17 files changed

+72
-976
lines changed

17 files changed

+72
-976
lines changed

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
Description: Solo POM.
4-
Version: 3.17.2.45, Aug 13, 2017
4+
Version: 3.17.2.46, Aug 14, 2017
55
Author: <a href="http://88250.b3log.org">Liang Ding</a>
66
Author: <a href="http://www.annpeter.cn">Ann Peter</a>
77
Author: <a href="http://vanessa.b3log.org">Vanessa</a>
@@ -76,7 +76,7 @@
7676
<properties>
7777
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
7878

79-
<org.b3log.latke.version>2.3.14</org.b3log.latke.version>
79+
<org.b3log.latke.version>2.3.15</org.b3log.latke.version>
8080

8181
<servlet.version>3.1.0</servlet.version>
8282
<slf4j.version>1.7.5</slf4j.version>

src/main/java/org/b3log/solo/plugin/broadcast/ChanceProcessor.java

Lines changed: 0 additions & 316 deletions
This file was deleted.

src/main/java/org/b3log/solo/processor/CategoryProcessor.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
* Category processor.
5454
*
5555
* @author <a href="http://88250.b3log.org">Liang Ding</a>
56-
* @version 1.0.0.2, Apr 10, 2017
56+
* @version 1.0.1.2, Apr 21, 2017
5757
* @since 2.0.0
5858
*/
5959
@RequestProcessor
@@ -192,6 +192,13 @@ public void showCategoryArticles(final HTTPRequestContext context) throws IOExce
192192
final JSONObject result = articleQueryService.getCategoryArticles(categoryId, currentPageNum, pageSize);
193193
final List<JSONObject> articles = (List<JSONObject>) result.opt(Article.ARTICLES);
194194

195+
final int pageCount = result.optJSONObject(Pagination.PAGINATION).optInt(Pagination.PAGINATION_PAGE_COUNT);
196+
if (0 == pageCount) {
197+
response.sendError(HttpServletResponse.SC_NOT_FOUND);
198+
199+
return;
200+
}
201+
195202
Skins.fillLangs(preference.optString(Option.ID_C_LOCALE_STRING), (String) request.getAttribute(Keys.TEMAPLTE_DIR_NAME), dataModel);
196203

197204
final boolean hasMultipleUsers = userQueryService.hasMultipleUsers();
@@ -204,13 +211,6 @@ public void showCategoryArticles(final HTTPRequestContext context) throws IOExce
204211
filler.setArticlesExProperties(request, articles, author, preference);
205212
}
206213

207-
final int pageCount = result.optJSONObject(Pagination.PAGINATION).optInt(Pagination.PAGINATION_PAGE_COUNT);
208-
if (0 == pageCount) {
209-
response.sendError(HttpServletResponse.SC_NOT_FOUND);
210-
211-
return;
212-
}
213-
214214
final List<Integer> pageNums = (List) result.optJSONObject(Pagination.PAGINATION).opt(Pagination.PAGINATION_PAGE_NUMS);
215215

216216
fillPagination(dataModel, pageCount, currentPageNum, articles, pageNums);

0 commit comments

Comments
 (0)