Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
solo-1
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
solo-1
Commits
a11e3034
Unverified
Commit
a11e3034
authored
Sep 26, 2018
by
Liang Ding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🎨
Cleanup code
parent
cd234ef1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
src/main/java/org/b3log/solo/processor/ArticleProcessor.java
src/main/java/org/b3log/solo/processor/ArticleProcessor.java
+1
-1
src/main/java/org/b3log/solo/processor/SitemapProcessor.java
src/main/java/org/b3log/solo/processor/SitemapProcessor.java
+2
-2
src/main/java/org/b3log/solo/processor/TagProcessor.java
src/main/java/org/b3log/solo/processor/TagProcessor.java
+2
-2
No files found.
src/main/java/org/b3log/solo/processor/ArticleProcessor.java
View file @
a11e3034
...
@@ -414,7 +414,7 @@ public class ArticleProcessor {
...
@@ -414,7 +414,7 @@ public class ArticleProcessor {
final
int
currentPageNum
=
getTagArticlesPagedCurrentPageNum
(
request
.
getRequestURI
());
final
int
currentPageNum
=
getTagArticlesPagedCurrentPageNum
(
request
.
getRequestURI
());
Stopwatchs
.
start
(
"Get Tag-Articles Paged[tagTitle="
+
tagTitle
+
", pageNum="
+
currentPageNum
+
']'
);
Stopwatchs
.
start
(
"Get Tag-Articles Paged
[tagTitle="
+
tagTitle
+
", pageNum="
+
currentPageNum
+
']'
);
try
{
try
{
jsonObject
.
put
(
Keys
.
STATUS_CODE
,
true
);
jsonObject
.
put
(
Keys
.
STATUS_CODE
,
true
);
...
...
src/main/java/org/b3log/solo/processor/SitemapProcessor.java
View file @
a11e3034
...
@@ -55,7 +55,7 @@ import java.net.URLEncoder;
...
@@ -55,7 +55,7 @@ import java.net.URLEncoder;
* Sitemap processor.
* Sitemap processor.
*
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.2.
3, Sep 20
, 2018
* @version 1.0.2.
4, Sep 26
, 2018
* @since 0.3.1
* @since 0.3.1
*/
*/
@RequestProcessor
@RequestProcessor
...
@@ -122,7 +122,7 @@ public class SitemapProcessor {
...
@@ -122,7 +122,7 @@ public class SitemapProcessor {
LOGGER
.
log
(
Level
.
INFO
,
"Generated sitemap"
);
LOGGER
.
log
(
Level
.
INFO
,
"Generated sitemap"
);
renderer
.
setContent
(
content
);
renderer
.
setContent
(
content
);
}
catch
(
final
Exception
e
)
{
}
catch
(
final
Exception
e
)
{
LOGGER
.
log
(
Level
.
ERROR
,
"Ge
t blog article feed error
"
,
e
);
LOGGER
.
log
(
Level
.
ERROR
,
"Ge
nerates sitemap failed
"
,
e
);
context
.
getResponse
().
sendError
(
HttpServletResponse
.
SC_SERVICE_UNAVAILABLE
);
context
.
getResponse
().
sendError
(
HttpServletResponse
.
SC_SERVICE_UNAVAILABLE
);
}
}
...
...
src/main/java/org/b3log/solo/processor/TagProcessor.java
View file @
a11e3034
...
@@ -164,10 +164,10 @@ public class TagProcessor {
...
@@ -164,10 +164,10 @@ public class TagProcessor {
final
int
tagArticleCount
=
tag
.
getInt
(
Tag
.
TAG_PUBLISHED_REFERENCE_COUNT
);
final
int
tagArticleCount
=
tag
.
getInt
(
Tag
.
TAG_PUBLISHED_REFERENCE_COUNT
);
final
int
pageCount
=
(
int
)
Math
.
ceil
((
double
)
tagArticleCount
/
(
double
)
pageSize
);
final
int
pageCount
=
(
int
)
Math
.
ceil
((
double
)
tagArticleCount
/
(
double
)
pageSize
);
LOGGER
.
log
(
Level
.
TRACE
,
"Paginate tag-articles[currentPageNum={0}, pageSize={1}, pageCount={2}, windowSize={3}]"
,
LOGGER
.
log
(
Level
.
TRACE
,
"Paginate tag-articles
[currentPageNum={0}, pageSize={1}, pageCount={2}, windowSize={3}]"
,
currentPageNum
,
pageSize
,
pageCount
,
windowSize
);
currentPageNum
,
pageSize
,
pageCount
,
windowSize
);
final
List
<
Integer
>
pageNums
=
Paginator
.
paginate
(
currentPageNum
,
pageSize
,
pageCount
,
windowSize
);
final
List
<
Integer
>
pageNums
=
Paginator
.
paginate
(
currentPageNum
,
pageSize
,
pageCount
,
windowSize
);
LOGGER
.
log
(
Level
.
TRACE
,
"tag-articles[pageNums={0}]"
,
pageNums
);
LOGGER
.
log
(
Level
.
TRACE
,
"tag-articles
[pageNums={0}]"
,
pageNums
);
fillPagination
(
dataModel
,
pageCount
,
currentPageNum
,
articles
,
pageNums
);
fillPagination
(
dataModel
,
pageCount
,
currentPageNum
,
articles
,
pageNums
);
dataModel
.
put
(
Common
.
PATH
,
"/tags/"
+
URLEncoder
.
encode
(
tagTitle
,
"UTF-8"
));
dataModel
.
put
(
Common
.
PATH
,
"/tags/"
+
URLEncoder
.
encode
(
tagTitle
,
"UTF-8"
));
dataModel
.
put
(
Keys
.
OBJECT_ID
,
tagId
);
dataModel
.
put
(
Keys
.
OBJECT_ID
,
tagId
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment