|
|
@@ -77,6 +77,7 @@ public class ArticleService extends BaseTransaction {
|
|
|
private static final String PREVIEW_RELEASE_TIME_KEY = "releaseTime";
|
|
|
private static final Pattern LOCAL_UPLOAD_ABSOLUTE_URL_PATTERN = Pattern.compile(
|
|
|
"(?i)(?:https?:)?//(?:ht\\.gzhxtc\\.edu\\.cn|localhost|127\\.0\\.0\\.1|ffkj-[a-z0-9-]+\\.localhost)(?::\\d+)?(/web/upload/[^\"'<>\\s]*)");
|
|
|
+ private static final Long NAVIGATION_STYLE_TEXT_LIST = 10000L;
|
|
|
private static final Long NAVIGATION_STYLE_GRAPHIC_LIST = 10010L;
|
|
|
private static final String COLLEGE_RED_TEMPLATE_ID_CODE = "ffkjcollegered1";
|
|
|
private static final String ARTICLE_PUBLISHED_HISTORY_ROOT = "/web/upload/article-history/";
|
|
|
@@ -235,7 +236,7 @@ public class ArticleService extends BaseTransaction {
|
|
|
if (wn == null) {
|
|
|
return DEFAULT_FORWARD;
|
|
|
}
|
|
|
- if (!verifyGraphicListThumbnailRequired(gdba, wn, article, "发布栏目")) {
|
|
|
+ if (!verifyNavigationThumbnailRequired(gdba, wn, article, "发布栏目")) {
|
|
|
return DEFAULT_FORWARD;
|
|
|
}
|
|
|
if (!verifyArticleCopyNavigationList(gdba, navIdList, article)) {
|
|
|
@@ -389,7 +390,7 @@ public class ArticleService extends BaseTransaction {
|
|
|
if (wn == null) {
|
|
|
return DEFAULT_FORWARD;
|
|
|
}
|
|
|
- if (!verifyGraphicListThumbnailRequired(gdba, wn, article, "发布栏目")) {
|
|
|
+ if (!verifyNavigationThumbnailRequired(gdba, wn, article, "发布栏目")) {
|
|
|
return DEFAULT_FORWARD;
|
|
|
}
|
|
|
if (!verifyArticleCopyNavigationList(gdba, navIdList, article)) {
|
|
|
@@ -487,16 +488,16 @@ public class ArticleService extends BaseTransaction {
|
|
|
if (wn == null) {
|
|
|
return false;
|
|
|
}
|
|
|
- if (!verifyGraphicListThumbnailRequired(gdba, wn, article, "抄送栏目")) {
|
|
|
+ if (!verifyNavigationThumbnailRequired(gdba, wn, article, "抄送栏目")) {
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
- private boolean verifyGraphicListThumbnailRequired(GeneralDBAccess gdba, WebsiteNavigation wn, Article article,
|
|
|
+ private boolean verifyNavigationThumbnailRequired(GeneralDBAccess gdba, WebsiteNavigation wn, Article article,
|
|
|
String targetName) throws Exception {
|
|
|
- if (wn == null || !NAVIGATION_STYLE_GRAPHIC_LIST.equals(wn.getWnlscode())) {
|
|
|
+ if (wn == null || NAVIGATION_STYLE_TEXT_LIST.equals(wn.getWnlscode())) {
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
@@ -504,7 +505,7 @@ public class ArticleService extends BaseTransaction {
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
- setResponsePackage(getResponseWarningMsgPackage(targetName + "为图文列表时必须上传缩略图"));
|
|
|
+ setResponsePackage(getResponseWarningMsgPackage(targetName + "排版样式不是文字列表时必须上传缩略图"));
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
@@ -641,7 +642,7 @@ public class ArticleService extends BaseTransaction {
|
|
|
if (wn == null) {
|
|
|
return TIPS_FORWARD;
|
|
|
}
|
|
|
- if (!verifyGraphicListThumbnailRequired(gdba, wn, article, "发布栏目")) {
|
|
|
+ if (!verifyNavigationThumbnailRequired(gdba, wn, article, "发布栏目")) {
|
|
|
return TIPS_FORWARD;
|
|
|
}
|
|
|
if (!verifyArticleCopyNavigationList(gdba, navIdList, article)) {
|