Merged V3.0 to HEAD

12801: ETHREEOH-1081 - Unable to revert previous version of Wiki Page

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12802 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mike Hatfield
2009-01-15 21:57:08 +00:00
parent c88f9baf33
commit 71083f7b40

View File

@@ -71,6 +71,7 @@ function update()
var workingCopy = page.checkout(); var workingCopy = page.checkout();
workingCopy.content = json.get("pagecontent"); workingCopy.content = json.get("pagecontent");
workingCopy.checkin(); workingCopy.checkin();
page.save();
activityType = "org.alfresco.wiki.page-edited"; activityType = "org.alfresco.wiki.page-edited";
} }
@@ -130,7 +131,8 @@ function update()
*/ */
function pageVersionMatchesSubmitted(page) function pageVersionMatchesSubmitted(page)
{ {
var currentVersion = 0, repoVersion = 0; var currentVersion = "0",
repoVersion = "0";
if (json.has("currentVersion")) if (json.has("currentVersion"))
{ {
@@ -143,9 +145,12 @@ function pageVersionMatchesSubmitted(page)
} }
return (sortByLabel( return (sortByLabel(
{ label: repoVersion}, {
{ label: currentVersion } label: repoVersion
) != -1); },
{
label: currentVersion
}) != -1);
} }
function sortByLabel(version1, version2) function sortByLabel(version1, version2)