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
b71be4b8
Commit
b71be4b8
authored
Jun 28, 2017
by
Liang Ding
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'refs/remotes/origin/2.2.0-dev'
parents
3d8e50f3
923b1f6b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
src/main/java/org/b3log/solo/processor/IndexProcessor.java
src/main/java/org/b3log/solo/processor/IndexProcessor.java
+10
-9
src/main/java/org/b3log/solo/processor/console/PreferenceConsole.java
...a/org/b3log/solo/processor/console/PreferenceConsole.java
+1
-0
No files found.
src/main/java/org/b3log/solo/processor/IndexProcessor.java
View file @
b71be4b8
...
...
@@ -59,7 +59,7 @@ import java.util.Set;
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="mailto:385321165@qq.com">DASHU</a>
* @version 1.2.
3.6, May 7
, 2017
* @version 1.2.
4.6, Jun 28
, 2017
* @since 0.3.1
*/
@RequestProcessor
...
...
@@ -97,8 +97,8 @@ public class IndexProcessor {
/**
* Shows index with the specified context.
*
* @param context the specified context
* @param request the specified HTTP servlet request
* @param context
the specified context
* @param request
the specified HTTP servlet request
* @param response the specified HTTP servlet response
*/
@RequestProcessing
(
value
=
{
"/\\d*"
,
""
},
uriPatternsMode
=
URIPatternMode
.
REGEX
,
method
=
HTTPRequestMethod
.
GET
)
...
...
@@ -119,8 +119,8 @@ public class IndexProcessor {
if
(
"default"
.
equals
(
specifiedSkin
))
{
specifiedSkin
=
preference
.
optString
(
Option
.
ID_C_SKIN_DIR_NAME
);
final
Cookie
cookie
=
new
Cookie
(
"skin"
,
null
);
cookie
.
setMaxAge
(
0
);
final
Cookie
cookie
=
new
Cookie
(
Skin
.
SKIN
,
null
);
cookie
.
setMaxAge
(
60
*
60
);
// 1 hour
cookie
.
setPath
(
"/"
);
response
.
addCookie
(
cookie
);
}
...
...
@@ -158,6 +158,7 @@ public class IndexProcessor {
// https://github.com/b3log/solo/issues/12060
if
(!
preference
.
optString
(
Skin
.
SKIN_DIR_NAME
).
equals
(
specifiedSkin
)
&&
!
Requests
.
mobileRequest
(
request
))
{
final
Cookie
cookie
=
new
Cookie
(
Skin
.
SKIN
,
specifiedSkin
);
cookie
.
setMaxAge
(
60
*
60
);
// 1 hour
cookie
.
setPath
(
"/"
);
response
.
addCookie
(
cookie
);
}
...
...
@@ -175,8 +176,8 @@ public class IndexProcessor {
/**
* Shows kill browser page with the specified context.
*
* @param context the specified context
* @param request the specified HTTP servlet request
* @param context
the specified context
* @param request
the specified HTTP servlet request
* @param response the specified HTTP servlet response
*/
@RequestProcessing
(
value
=
"/kill-browser"
,
method
=
HTTPRequestMethod
.
GET
)
...
...
@@ -212,8 +213,8 @@ public class IndexProcessor {
/**
* Show register page.
*
* @param context the specified context
* @param request the specified HTTP servlet request
* @param context
the specified context
* @param request
the specified HTTP servlet request
* @param response the specified HTTP servlet response
*/
@RequestProcessing
(
value
=
"/register"
,
method
=
HTTPRequestMethod
.
GET
)
...
...
src/main/java/org/b3log/solo/processor/console/PreferenceConsole.java
View file @
b71be4b8
...
...
@@ -401,6 +401,7 @@ public class PreferenceConsole {
preferenceMgmtService
.
updatePreference
(
preference
);
final
Cookie
cookie
=
new
Cookie
(
Skin
.
SKIN
,
preference
.
getString
(
Skin
.
SKIN_DIR_NAME
));
cookie
.
setMaxAge
(
60
*
60
);
// 1 hour
cookie
.
setPath
(
"/"
);
response
.
addCookie
(
cookie
);
...
...
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