Code source wiki de Blog migration

Modifié par Administrator le 2008/12/14 00:30

Afficher les derniers auteurs
1 {{velocity filter="none"}}
2 #if($request.migrate)
3 #set($newContent = '#includeForm("Blog.BlogPostSheet")')
4 #set($query = ", BaseObject obj where obj.name = doc.fullName and obj.className = 'XWiki.ArticleClass'")
5 #foreach($article in $xwiki.searchDocuments($query))
6 #if($xwiki.hasAccessLevel('edit', $context.user, $article))
7 #set($articleDoc = $xwiki.getDocument($article))
8 #set($articleObj = $articleDoc.getObject('XWiki.ArticleClass'))
9 #set($entryObj = $articleDoc.newObject('Blog.BlogPostClass'))
10 #foreach($property in ['title', 'content', 'extract', 'category'])
11 $!entryObj.set($property, $articleObj.getProperty($property).value)
12 #end
13 $!entryObj.set('published', 1)
14 $!entryObj.set('publishDate', $articleDoc.creationDate)
15 $!entryObj.set('hidden', 0)
16 #set($discard = $articleDoc.removeObjects('XWiki.ArticleClass'))
17 $articleDoc.setContent($newContent)
18 $!articleDoc.save($msg.get('xe.blog.migration.migrated'), true)
19 * $msg.get('xe.blog.migration.updated') [[$entryObj.title>>${article}]] ($msg.get('xe.blog.migration.inspace') [[$articleDoc.space>>${articleDoc.space}.WebHome]])
20 #else
21 * $msg.get('xe.blog.migration.skipping') [[$article]]
22 #end
23 #end
24 $msg.get('xe.blog.migration.done') [[$msg.get('xe.blog.migration.backtoblog')>>Blog.WebHome]]
25 #else
26 $msg.get('xe.blog.migration.pleaseconfirm')
27
28 {{html clean="false" wiki="true"}}
29 <form action="$doc.getURL()" method="post">
30 <div><input type="submit" name="migrate" value="$msg.get('xe.blog.migration.confirm')"/></div>
31 </form>
32 {{/html}}
33
34 [[$msg.get('xe.blog.migration.backtoblog')>>Blog.WebHome]]
35 #end
36 {{/velocity}}

Erreur dans lexécution de la macro [velocity]. Cause : [The execution of the [velocity] script macro is not allowed in [tamilio:Blog.BlogParameters]. Check the rights of its last author or the parameters if it's rendered from another script.]. Cliquer sur ce message pour voir plus de détails.


Erreur dans lexécution de la macro [velocity]. Cause : [The execution of the [velocity] script macro is not allowed in [tamilio:Blog.BlogCode]. Check the rights of its last author or the parameters if it's rendered from another script.]. Cliquer sur ce message pour voir plus de détails.

Erreur dans lexécution de la macro [velocity]. Cause : [The execution of the [velocity] script macro is not allowed in [tamilio:Blog.RecentPostsPanel]. Check the rights of its last author or the parameters if it's rendered from another script.]. Cliquer sur ce message pour voir plus de détails.

Erreur dans lexécution de la macro [velocity]. Cause : [The execution of the [velocity] script macro is not allowed in [tamilio:Blog.BlogParameters]. Check the rights of its last author or the parameters if it's rendered from another script.]. Cliquer sur ce message pour voir plus de détails.


Erreur dans lexécution de la macro [velocity]. Cause : [The execution of the [velocity] script macro is not allowed in [tamilio:Blog.BlogCode]. Check the rights of its last author or the parameters if it's rendered from another script.]. Cliquer sur ce message pour voir plus de détails.

Erreur dans lexécution de la macro [velocity]. Cause : [The execution of the [velocity] script macro is not allowed in [tamilio:Blog.UnpublishedPanel]. Check the rights of its last author or the parameters if it's rendered from another script.]. Cliquer sur ce message pour voir plus de détails.

Erreur dans lexécution de la macro [velocity]. Cause : [The execution of the [velocity] script macro is not allowed in [tamilio:Blog.BlogParameters]. Check the rights of its last author or the parameters if it's rendered from another script.]. Cliquer sur ce message pour voir plus de détails.


Erreur dans lexécution de la macro [velocity]. Cause : [The execution of the [velocity] script macro is not allowed in [tamilio:Blog.BlogCode]. Check the rights of its last author or the parameters if it's rendered from another script.]. Cliquer sur ce message pour voir plus de détails.

Erreur dans lexécution de la macro [velocity]. Cause : [The execution of the [velocity] script macro is not allowed in [tamilio:Blog.CategoriesCode]. Check the rights of its last author or the parameters if it's rendered from another script.]. Cliquer sur ce message pour voir plus de détails.

Erreur dans lexécution de la macro [velocity]. Cause : [The execution of the [velocity] script macro is not allowed in [tamilio:Blog.CategoriesPanel]. Check the rights of its last author or the parameters if it's rendered from another script.]. Cliquer sur ce message pour voir plus de détails.

Erreur dans lexécution de la macro [velocity]. Cause : [The execution of the [velocity] script macro is not allowed in [tamilio:Blog.BlogParameters]. Check the rights of its last author or the parameters if it's rendered from another script.]. Cliquer sur ce message pour voir plus de détails.


Erreur dans lexécution de la macro [velocity]. Cause : [The execution of the [velocity] script macro is not allowed in [tamilio:Blog.BlogCode]. Check the rights of its last author or the parameters if it's rendered from another script.]. Cliquer sur ce message pour voir plus de détails.

Erreur dans lexécution de la macro [velocity]. Cause : [The execution of the [velocity] script macro is not allowed in [tamilio:Blog.ArchivePanel]. Check the rights of its last author or the parameters if it's rendered from another script.]. Cliquer sur ce message pour voir plus de détails.