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
This commit is contained in:
Kevin Roast
2009-01-15 13:23:28 +00:00
parent fcd7387a33
commit 22471426df
2 changed files with 5 additions and 15 deletions

View File

@@ -2,10 +2,10 @@
* A collection of general functions used across most wiki scripts. * A collection of general functions used across most wiki scripts.
*/ */
const DEFAULT_PAGE_CONTENT = "This is a new page. It has no content"; const DEFAULT_PAGE_CONTENT = "This is a new page. It has no content";
/** /**
* Takes an array of template parameter arguments * Takes an array of template parameter arguments
* and returns an object keyed on parameter name. * and returns an object keyed on parameter name.
*
*/ */
function getTemplateArgs(params) function getTemplateArgs(params)
{ {
@@ -24,14 +24,6 @@ function getTemplateArgs(params)
/* Format and return error object */ /* Format and return error object */
function jsonError(errorString) function jsonError(errorString)
{ {
/*
var obj =
{
"error": errorString
};
return obj;
*/
status.setCode(status.STATUS_BAD_REQUEST, errorString); status.setCode(status.STATUS_BAD_REQUEST, errorString);
} }
@@ -49,8 +41,10 @@ function createWikiPage(name, folder, options)
if (options.content) if (options.content)
{ {
page.content = options.content; page.content = options.content;
page.mimetype = "text/html";
} }
} }
// Initialise tags to empty array // Initialise tags to empty array
page.tags = []; page.tags = [];
@@ -80,6 +74,4 @@ function getWikiContainer(site)
} }
return wiki; return wiki;
} }

View File

@@ -1,12 +1,11 @@
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/wiki/lib/wiki.lib.js"> <import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/wiki/lib/wiki.lib.js">
/** /**
* Update specified wiki page. * Update specified wiki page.
* *
*
* @method PUT * @method PUT
* @param uri {string} /slingshot/wiki/page/{siteid}/{pageTitle} * @param uri {string} /slingshot/wiki/page/{siteid}/{pageTitle}
*/ */
function getTemplateParams() function getTemplateParams()
{ {
// Grab the URI parameters // Grab the URI parameters
@@ -165,7 +164,6 @@ function sortByLabel(version1, version2)
} }
} }
function getLatestVersion(versionHistory) function getLatestVersion(versionHistory)
{ {
versionHistory.sort(sortByLabel); versionHistory.sort(sortByLabel);