Skip to content

Commit f040741

Browse files
author
Romain GUINOT
committed
0.55:
- switched back to using the previous, alfresco-provided, JSON parsing utility rather than JSON.parse, which is not available in all supported versions for this dashlet (issue #5). - no new features
1 parent fa068ec commit f040741

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,11 @@ Some sample screenshots with different configurations are included below :
174174
Changelog
175175
---------
176176

177+
0.55:
178+
179+
- switched back to using the previous, alfresco-provided, JSON parsing utility rather than JSON.parse, which is not available in all supported versions for this dashlet (issue #5).
180+
- no new features
181+
177182
0.54:
178183

179184
- replaced the remaining eval calls by JSON.parse, for safety and improved parsing performance

build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
build.version=0.54
1+
build.version=0.55
22
project.name=audit-dashlet
33
jar.name=${project.name}-${build.version}.jar

config/alfresco/site-webscripts/org/sharextras/components/dashlets/audit-application-data.get.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ function main()
7777
//if (logger.isLoggingEnabled()) logger.log("json_requoted_response:\n"+json_requoted_response);
7878
}
7979

80-
// replace with a space spurious newlines that could have been stored in a json item, before the feed gets eval'd. see also ALF-11190.
80+
// replace with a space spurious newlines that could have been stored in a json item, before the feed gets parsed. see also ALF-11190.
8181
var escaped_response = json_requoted_response.replace(/(\n|\r\n|\r)/g, " ");
8282
//if (logger.isLoggingEnabled()) logger.log("escaped_response:\n"+escaped_response);
8383

84-
var auditresponse = JSON.parse(escaped_response);
84+
var auditresponse = jsonUtils.toObject(escaped_response);
8585
model.auditresponse = auditresponse;
8686
model.jsonResp = result.response;
8787
}
@@ -105,7 +105,7 @@ function isJsonQuoteFixRequired(connector)
105105
{
106106
// get current server version to determine if a workaround for ALF-8307 is needed.
107107
var srvInfo = connector.get("/api/server");
108-
var srvInfoJson = JSON.parse(srvInfo);
108+
var srvInfoJson = jsonUtils.toObject(srvInfo);
109109

110110
var serverVersion, serverEdition, serverVersionNumbers;
111111

config/alfresco/site-webscripts/org/sharextras/components/dashlets/audit-application.get.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function getUserIsSiteManager(username)
88
var json = remote.call("/api/sites/" + page.url.templateArgs.site + "/memberships/" + stringUtils.urlEncode(username));
99
if (json.status == 200)
1010
{
11-
membership = JSON.parse(json);
11+
membership = jsonUtils.toObject(json);
1212
}
1313
}
1414
if (membership)

config/alfresco/site-webscripts/org/sharextras/modules/dashlets/audit-application-applist.get.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function main()
99

1010
if (result.status == status.STATUS_OK)
1111
{
12-
var auditcontrol = JSON.parse(result.response);
12+
var auditcontrol = jsonUtils.toObject(result.response) ;
1313
model.auditcontrol = auditcontrol;
1414
}
1515
else

0 commit comments

Comments
 (0)