From 22471426df2630e7a8b4aa6564f8080df14c8786 Mon Sep 17 00:00:00 2001 From: Kevin Roast Date: Thu, 15 Jan 2009 13:23:28 +0000 Subject: [PATCH] Merged V3.0 to HEAD 12772: Fix for ETHREEOH-1183 - Share wiki pages now created with indexable mimetype git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12773 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../org/alfresco/slingshot/wiki/lib/wiki.lib.js | 16 ++++------------ .../org/alfresco/slingshot/wiki/page.put.json.js | 4 +--- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/config/alfresco/templates/webscripts/org/alfresco/slingshot/wiki/lib/wiki.lib.js b/config/alfresco/templates/webscripts/org/alfresco/slingshot/wiki/lib/wiki.lib.js index 1a11bf9cb0..fd6af10f33 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/slingshot/wiki/lib/wiki.lib.js +++ b/config/alfresco/templates/webscripts/org/alfresco/slingshot/wiki/lib/wiki.lib.js @@ -2,10 +2,10 @@ * A collection of general functions used across most wiki scripts. */ const DEFAULT_PAGE_CONTENT = "This is a new page. It has no content"; + /** * Takes an array of template parameter arguments * and returns an object keyed on parameter name. - * */ function getTemplateArgs(params) { @@ -24,14 +24,6 @@ function getTemplateArgs(params) /* Format and return error object */ function jsonError(errorString) { -/* - var obj = - { - "error": errorString - }; - - return obj; -*/ status.setCode(status.STATUS_BAD_REQUEST, errorString); } @@ -49,8 +41,10 @@ function createWikiPage(name, folder, options) if (options.content) { page.content = options.content; + page.mimetype = "text/html"; } } + // Initialise tags to empty array page.tags = []; @@ -80,6 +74,4 @@ function getWikiContainer(site) } return wiki; -} - - +} \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/slingshot/wiki/page.put.json.js b/config/alfresco/templates/webscripts/org/alfresco/slingshot/wiki/page.put.json.js index b4aee0bc6a..b26b76dbc3 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/slingshot/wiki/page.put.json.js +++ b/config/alfresco/templates/webscripts/org/alfresco/slingshot/wiki/page.put.json.js @@ -1,12 +1,11 @@ + /** * Update specified wiki page. * - * * @method PUT * @param uri {string} /slingshot/wiki/page/{siteid}/{pageTitle} */ - function getTemplateParams() { // Grab the URI parameters @@ -165,7 +164,6 @@ function sortByLabel(version1, version2) } } - function getLatestVersion(versionHistory) { versionHistory.sort(sortByLabel);