fixed bug
This commit is contained in:
parent
959b350674
commit
e30794baa6
|
@ -163,8 +163,8 @@ public abstract class ModerationThread {
|
|||
postUserMessage(cmItemStatus, userMessage);
|
||||
}
|
||||
|
||||
public void postItemDeleted(CMItemStatus cmItemStatus) throws Exception {
|
||||
this.cmItemStatus = cmItemStatus;
|
||||
public void postItemDeleted() throws Exception {
|
||||
this.cmItemStatus = null;
|
||||
String fullName = ckanUser.getNameSurname();
|
||||
String message = String.format(
|
||||
"@**%s** deleted the item with name '%s' (id='%s')",
|
||||
|
|
|
@ -162,9 +162,9 @@ public class SocialNotificationModerationThread extends ModerationThread {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void postItemDeleted(CMItemStatus cmItemStatus) throws Exception {
|
||||
public void postItemDeleted() throws Exception {
|
||||
this.create = false;
|
||||
this.cmItemStatus = cmItemStatus;
|
||||
this.cmItemStatus = null;
|
||||
this.catalogueEventType = CatalogueEventType.ITEM_REMOVED;
|
||||
notifyItemDeleted();
|
||||
}
|
||||
|
@ -218,7 +218,7 @@ public class SocialNotificationModerationThread extends ModerationThread {
|
|||
catalogueEvent.setType(catalogueEventType);
|
||||
catalogueEvent.setNotifyText(messageString);
|
||||
catalogueEvent.setItemId(getSubject());
|
||||
if(cmItemStatus == CMItemStatus.APPROVED) {
|
||||
if(cmItemStatus!=null && cmItemStatus == CMItemStatus.APPROVED) {
|
||||
catalogueEvent.setItemURL(new URL(itemURL));
|
||||
}else {
|
||||
catalogueEvent.setItemURL(new URL(getModerationURL()));
|
||||
|
|
|
@ -1467,9 +1467,8 @@ public class CKANPackage extends CKAN implements Moderated {
|
|||
private void postItemDeleted() {
|
||||
try {
|
||||
if(isModerationEnabled()) {
|
||||
CMItemStatus cmItemStatus = getCMItemStatus();
|
||||
moderationThread.setItemCoordinates(itemID, name, itemTitle, itemURL);
|
||||
moderationThread.postItemDeleted(cmItemStatus);
|
||||
moderationThread.postItemDeleted();
|
||||
}
|
||||
} catch(WebApplicationException e) {
|
||||
throw e;
|
||||
|
|
Loading…
Reference in New Issue