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