Hi,
It's a bad idea doing this from the database. Here is some XWiki script
to copy a document.
You can then delete the other one:
1 Copy a document
#set($sourcedoc = $request.sourcedoc)
#set($targetdoc = $request.targetdoc)
#set($language = $request.language)
#if ($targetdoc=="")
#set($targetdoc = $sourcedoc)
#end
#set($sourcewiki = $context.database)
#set($targetwiki = $sourcewiki)
#if ($sourcedoc)
Copying document $sourcedoc ($language) from $sourcewiki to $targetwiki:
$xwiki.xWiki.copyDocument($sourcedoc, $targetdoc, $sourcewiki,
$targetwiki, $language, false, $context.context)
[Source doc>$sourcewiki:$sourcedoc?language=$language] [Target
doc>$targetwiki:$targetdoc?language=$language]
#end
<form action="">
<table>
<tr><td>Source Document:</td>
<td><input type="text" name="sourcedoc"
value="$!request.sourcedoc"
size="60"/></td></tr>
<tr><td>Language:</td>
<td><input type="text" name="language"
value="$!request.language"
size="60" /></td></tr>
<tr><td>Target Doc:</td>
<td><input type="text" name="targetdoc"
value="$!request.targetdoc"
size="60" /></td></tr>
<tr><td><input type="submit" value="Copy" />
</td></tr>
</table>
</form>
Ludovic
Ryszard Lach a écrit :
Hi.
I'd like to reorganize my knowledge base by moving some documents
between spaces. I've tried to do it mysql query updating:
xwikidoc: xwd_fullname,xwd_web,xwd_parent
xwikistatsdoc: xws_name
xwikiattachment:xwa_doc_id
but it seems it's not enough. Is it too complicated, or it will be ok if
I modify two or three additional tables? If it is possible - what tables
should I update too?
Richard.
------------------------------------------------------------------------
--
You receive this message as a subscriber of the xwiki-users(a)objectweb.org mailing list.
To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws
--
Ludovic Dubost
XPertNet:
http://www.xpertnet.fr/
Blog:
http://www.ludovic.org/blog/
XWiki:
http://www.xwiki.com
Skype: ldubost AIM: nvludo Yahoo: ludovic