Commit b71be4b8 authored by Liang Ding's avatar Liang Ding

Merge remote-tracking branch 'refs/remotes/origin/2.2.0-dev'

parents 3d8e50f3 923b1f6b
...@@ -59,7 +59,7 @@ import java.util.Set; ...@@ -59,7 +59,7 @@ import java.util.Set;
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="mailto:385321165@qq.com">DASHU</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 * @since 0.3.1
*/ */
@RequestProcessor @RequestProcessor
...@@ -119,8 +119,8 @@ public class IndexProcessor { ...@@ -119,8 +119,8 @@ public class IndexProcessor {
if ("default".equals(specifiedSkin)) { if ("default".equals(specifiedSkin)) {
specifiedSkin = preference.optString(Option.ID_C_SKIN_DIR_NAME); specifiedSkin = preference.optString(Option.ID_C_SKIN_DIR_NAME);
final Cookie cookie = new Cookie("skin", null); final Cookie cookie = new Cookie(Skin.SKIN, null);
cookie.setMaxAge(0); cookie.setMaxAge(60 * 60); // 1 hour
cookie.setPath("/"); cookie.setPath("/");
response.addCookie(cookie); response.addCookie(cookie);
} }
...@@ -158,6 +158,7 @@ public class IndexProcessor { ...@@ -158,6 +158,7 @@ public class IndexProcessor {
// https://github.com/b3log/solo/issues/12060 // https://github.com/b3log/solo/issues/12060
if (!preference.optString(Skin.SKIN_DIR_NAME).equals(specifiedSkin) && !Requests.mobileRequest(request)) { if (!preference.optString(Skin.SKIN_DIR_NAME).equals(specifiedSkin) && !Requests.mobileRequest(request)) {
final Cookie cookie = new Cookie(Skin.SKIN, specifiedSkin); final Cookie cookie = new Cookie(Skin.SKIN, specifiedSkin);
cookie.setMaxAge(60 * 60); // 1 hour
cookie.setPath("/"); cookie.setPath("/");
response.addCookie(cookie); response.addCookie(cookie);
} }
......
...@@ -401,6 +401,7 @@ public class PreferenceConsole { ...@@ -401,6 +401,7 @@ public class PreferenceConsole {
preferenceMgmtService.updatePreference(preference); preferenceMgmtService.updatePreference(preference);
final Cookie cookie = new Cookie(Skin.SKIN, preference.getString(Skin.SKIN_DIR_NAME)); final Cookie cookie = new Cookie(Skin.SKIN, preference.getString(Skin.SKIN_DIR_NAME));
cookie.setMaxAge(60 * 60); // 1 hour
cookie.setPath("/"); cookie.setPath("/");
response.addCookie(cookie); response.addCookie(cookie);
......
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