mirror of https://github.com/halo-dev/halo
Fixed #280
parent
c30f107a96
commit
3d280de545
|
@ -62,7 +62,7 @@ public class PostParam implements InputConverter<Post> {
|
||||||
@Override
|
@Override
|
||||||
public Post convertTo() {
|
public Post convertTo() {
|
||||||
if (StringUtils.isBlank(url)) {
|
if (StringUtils.isBlank(url)) {
|
||||||
url = title;
|
url = title.replace(".","");
|
||||||
}
|
}
|
||||||
if (null == thumbnail) {
|
if (null == thumbnail) {
|
||||||
thumbnail = "";
|
thumbnail = "";
|
||||||
|
@ -80,7 +80,7 @@ public class PostParam implements InputConverter<Post> {
|
||||||
@Override
|
@Override
|
||||||
public void update(Post post) {
|
public void update(Post post) {
|
||||||
if (StringUtils.isBlank(url)) {
|
if (StringUtils.isBlank(url)) {
|
||||||
url = title;
|
url = title.replace(".","");
|
||||||
}
|
}
|
||||||
if (null == thumbnail) {
|
if (null == thumbnail) {
|
||||||
thumbnail = "";
|
thumbnail = "";
|
||||||
|
|
|
@ -53,13 +53,9 @@ public class SheetParam implements InputConverter<Sheet> {
|
||||||
@Override
|
@Override
|
||||||
public Sheet convertTo() {
|
public Sheet convertTo() {
|
||||||
if (StringUtils.isBlank(url)) {
|
if (StringUtils.isBlank(url)) {
|
||||||
url = HaloUtils.normalizeUrl(title);
|
url = title.replace(".","");
|
||||||
} else {
|
|
||||||
url = HaloUtils.normalizeUrl(url);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
url = HaloUtils.initializeUrlIfBlank(url);
|
|
||||||
|
|
||||||
if (null == thumbnail) {
|
if (null == thumbnail) {
|
||||||
thumbnail = "";
|
thumbnail = "";
|
||||||
}
|
}
|
||||||
|
@ -76,13 +72,9 @@ public class SheetParam implements InputConverter<Sheet> {
|
||||||
@Override
|
@Override
|
||||||
public void update(Sheet sheet) {
|
public void update(Sheet sheet) {
|
||||||
if (StringUtils.isBlank(url)) {
|
if (StringUtils.isBlank(url)) {
|
||||||
url = HaloUtils.normalizeUrl(title);
|
url = title.replace(".","");
|
||||||
} else {
|
|
||||||
url = HaloUtils.normalizeUrl(url);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
url = HaloUtils.initializeUrlIfBlank(url);
|
|
||||||
|
|
||||||
if (null == thumbnail) {
|
if (null == thumbnail) {
|
||||||
thumbnail = "";
|
thumbnail = "";
|
||||||
}
|
}
|
||||||
|
|
|
@ -194,7 +194,7 @@ public class AdminServiceImpl implements AdminService {
|
||||||
@Override
|
@Override
|
||||||
public StatisticDTO getCount() {
|
public StatisticDTO getCount() {
|
||||||
StatisticDTO statisticDTO = new StatisticDTO();
|
StatisticDTO statisticDTO = new StatisticDTO();
|
||||||
statisticDTO.setPostCount(postService.countByStatus(PostStatus.PUBLISHED));
|
statisticDTO.setPostCount(postService.countByStatus(PostStatus.PUBLISHED) + sheetService.countByStatus(PostStatus.PUBLISHED));
|
||||||
statisticDTO.setAttachmentCount(attachmentService.count());
|
statisticDTO.setAttachmentCount(attachmentService.count());
|
||||||
|
|
||||||
// Handle comment count
|
// Handle comment count
|
||||||
|
|
|
@ -1,16 +1,8 @@
|
||||||
server:
|
server:
|
||||||
port: 8090
|
port: 8090
|
||||||
use-forward-headers: true
|
use-forward-headers: true
|
||||||
undertow:
|
|
||||||
io-threads: 2
|
|
||||||
worker-threads: 36
|
|
||||||
buffer-size: 1024
|
|
||||||
directBuffers: true
|
|
||||||
servlet:
|
|
||||||
session:
|
|
||||||
timeout: 86400s
|
|
||||||
compression:
|
compression:
|
||||||
enabled: true
|
enabled: false
|
||||||
mime-types: application/javascript,text/css,application/json,application/xml,text/html,text/xml,text/plain
|
mime-types: application/javascript,text/css,application/json,application/xml,text/html,text/xml,text/plain
|
||||||
spring:
|
spring:
|
||||||
jackson:
|
jackson:
|
||||||
|
@ -48,7 +40,9 @@ spring:
|
||||||
multipart:
|
multipart:
|
||||||
max-file-size: 10240MB
|
max-file-size: 10240MB
|
||||||
max-request-size: 10240MB
|
max-request-size: 10240MB
|
||||||
|
mvc:
|
||||||
|
favicon:
|
||||||
|
enabled: false
|
||||||
cache:
|
cache:
|
||||||
type: none
|
type: none
|
||||||
logging:
|
logging:
|
||||||
|
|
|
@ -1,16 +1,8 @@
|
||||||
server:
|
server:
|
||||||
port: 8090
|
port: 8090
|
||||||
use-forward-headers: true
|
use-forward-headers: true
|
||||||
undertow:
|
|
||||||
io-threads: 2
|
|
||||||
worker-threads: 36
|
|
||||||
buffer-size: 1024
|
|
||||||
directBuffers: true
|
|
||||||
servlet:
|
|
||||||
session:
|
|
||||||
timeout: 86400s
|
|
||||||
compression:
|
compression:
|
||||||
enabled: true
|
enabled: false
|
||||||
mime-types: application/javascript,text/css,application/json,application/xml,text/html,text/xml,text/plain
|
mime-types: application/javascript,text/css,application/json,application/xml,text/html,text/xml,text/plain
|
||||||
spring:
|
spring:
|
||||||
jackson:
|
jackson:
|
||||||
|
@ -47,7 +39,9 @@ spring:
|
||||||
multipart:
|
multipart:
|
||||||
max-file-size: 10MB
|
max-file-size: 10MB
|
||||||
max-request-size: 10MB
|
max-request-size: 10MB
|
||||||
|
mvc:
|
||||||
|
favicon:
|
||||||
|
enabled: false
|
||||||
cache:
|
cache:
|
||||||
type: none
|
type: none
|
||||||
logging:
|
logging:
|
||||||
|
|
|
@ -1,16 +1,8 @@
|
||||||
server:
|
server:
|
||||||
port: 8090
|
port: 8090
|
||||||
use-forward-headers: true
|
use-forward-headers: true
|
||||||
undertow:
|
|
||||||
io-threads: 2
|
|
||||||
worker-threads: 36
|
|
||||||
buffer-size: 1024
|
|
||||||
directBuffers: true
|
|
||||||
servlet:
|
|
||||||
session:
|
|
||||||
timeout: 86400s
|
|
||||||
compression:
|
compression:
|
||||||
enabled: true
|
enabled: false
|
||||||
mime-types: application/javascript,text/css,application/json,application/xml,text/html,text/xml,text/plain
|
mime-types: application/javascript,text/css,application/json,application/xml,text/html,text/xml,text/plain
|
||||||
spring:
|
spring:
|
||||||
jackson:
|
jackson:
|
||||||
|
|
Loading…
Reference in New Issue