Skip to content

Commit

Permalink
LS-188 remove insane code that was removing section content on view w…
Browse files Browse the repository at this point in the history
…hen editor choice not available
  • Loading branch information
ottenhoff committed Dec 19, 2014
1 parent 591674e commit 5ca916b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 34 deletions.
1 change: 1 addition & 0 deletions melete/melete-2.9m16_sak10x/CUSTOMIZATIONS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ LS-54 OHSU contributed patch for using sakai Resources
LS-55 OHSU contributed patch for rtsp links
LS-58 SAK 16568 for melete
LS-2 General Custom Melete Distrobution (https://jira.longsight.com/browse/LS-2)
LS-188 remove insane code that was removing content when editor choice not available
Original file line number Diff line number Diff line change
Expand Up @@ -290,40 +290,6 @@ public String saveHere()
AuthorPreferencePage preferencePage = (AuthorPreferencePage) binding.getValue(context);

boolean contentEmpty = false;
//If editor is sferyx, grab content empty flag value and set section to notype
if (section.getContentType().equals("typeEditor") && preferencePage.isShouldRenderSferyx())
{
binding = Util.getBinding("#{addResourcesPage}");
AddResourcesPage resourcesPage = (AddResourcesPage) binding.getValue(context);
HashMap<String, ArrayList<String>> save_err = resourcesPage.getHm_msgs();
logger.debug("hashmap in editsectionpage is " + save_err);
String errKey = "content_empty";
if (save_err != null && !save_err.isEmpty() && save_err.containsKey(errKey))
{
ArrayList<String> errs = save_err.get(errKey);
for (String err : errs)
{
//String errMsg = resourcesPage.getMessageText(err);
if (err.equals("true"))
{
section.setContentType("notype");
contentEmpty = true;
}
}
resourcesPage.removeFromHm_Msgs(errKey);
}

}

//If editor is FCK, check contentEditor and set section to notype if blank
if (section.getContentType().equals("typeEditor") && preferencePage.isShouldRenderFCK())
{
if ((contentEditor == null) || (contentEditor.trim().length() == 0))
{
section.setContentType("notype");
contentEmpty = true;
}
}

Boolean modifyContentResource = false;
binding = Util.getBinding("#{licensePage}");
Expand Down Expand Up @@ -378,6 +344,7 @@ public String saveHere()
if (section.getSectionResource() != null && section.getSectionResource().getResource() != null)
{
String delResourceId = section.getSectionResource().getResource().getResourceId();
System.out.println("zz: deleting resource: " + delResourceId);
sectionService.deleteResourceInUse(delResourceId);
meleteCHService.removeResource(delResourceId);
}
Expand Down

0 comments on commit 5ca916b

Please sign in to comment.