mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-1584 - Wrong QName usage in org.alfresco.repo.jscript.ContentAwareScriptableQNameMap.get(Object name)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@18950 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -76,14 +76,17 @@ public class ContentAwareScriptableQNameMap<K,V> extends ScriptableQNameMap<K,V>
|
||||
{
|
||||
// found a valid cm:content property that is not initialised
|
||||
String mimetype = null;
|
||||
String fileName = (String)get("cm:name");
|
||||
if (fileName != null)
|
||||
if (qname.equals(ContentModel.PROP_CONTENT))
|
||||
{
|
||||
mimetype = this.services.getMimetypeService().guessMimetype(fileName);
|
||||
String fileName = (String)get("cm:name");
|
||||
if (fileName != null)
|
||||
{
|
||||
mimetype = this.services.getMimetypeService().guessMimetype(fileName);
|
||||
}
|
||||
}
|
||||
ContentData cdata = new ContentData(null, mimetype, 0L, "UTF-8");
|
||||
// create the JavaScript API object we need
|
||||
value = factory.new ScriptContentData(cdata, ContentModel.PROP_CONTENT);
|
||||
value = factory.new ScriptContentData(cdata, qname);
|
||||
// and store it so it is available to the API user
|
||||
put(name, value);
|
||||
}
|
||||
|
Reference in New Issue
Block a user