<commit_before><?xml version="1.0" encoding="ISO-8859-1"?>

<xwikidoc>
<web>WikiManager</web>
<name>CreateNewWiki</name>
<language></language>
<defaultLanguage>en</defaultLanguage>
<translation>0</translation>
<parent>WikiManager.WebHome</parent>
<creator>XWiki.Admin</creator>
<author>XWiki.Admin</author>
<customClass></customClass>
<contentAuthor>XWiki.Admin</contentAuthor>
<creationDate>1186676964000</creationDate>
<date>1233157893000</date>
<contentUpdateDate>1233157893000</contentUpdateDate>
<version>4.1</version>
<title>CreateNewWiki</title>
<template></template>
<defaultTemplate></defaultTemplate>
<validationScript></validationScript>
<comment></comment>
<minorEdit>false</minorEdit>
<syntaxId>xwiki/1.0</syntaxId>
<hidden>false</hidden>
<object>
<class>
<name>XWiki.TagClass</name>
<customClass></customClass>
<customMapping></customMapping>
<defaultViewSheet></defaultViewSheet>
<defaultEditSheet></defaultEditSheet>
<defaultWeb></defaultWeb>
<nameField></nameField>
<validationScript></validationScript>
<tags>
<cache>0</cache>
<displayType>input</displayType>
<multiSelect>1</multiSelect>
<name>tags</name>
<number>1</number>
<prettyName>Tags</prettyName>
<relationalStorage>1</relationalStorage>
<separator> </separator>
<separators> ,|</separators>
<size>30</size>
<unmodifiable>0</unmodifiable>
<values></values>
<classType>com.xpn.xwiki.objects.classes.StaticListClass</classType>
</tags>
</class>
<name>WikiManager.CreateNewWiki</name>
<number>0</number>
<className>XWiki.TagClass</className>
<guid>afccd63d-a604-48bc-84a9-22ac9c9e065c</guid>
<property>
<tags/>
</property>
</object>
<content>############################################################################################
## Create a new wiki with initial minimum informations step by step or in one page.
##
## Can use URL parameters :
## -doc
##   0   : Just show input and properties names
##   1   : Print documentation for each field
## -stepbystep
##   0   : All informations in one page and create button
##   1   : Step by step based on javascript
##
############################################################################################
## PLUGINS DEPENDANCIES
#set ($WikiManager = $xwiki.wikimanager)
#if (!$WikiManager)
  #error($msg.get("wikimanager.pluginnotenabled"))
#end
#if (!$xwiki.applicationmanager)
  #error($msg.get("xapp.pluginnotenabled"))
#end
#if(!$xwiki.isVirtualMode())
  #error($msg.get("wikimanager.notinvirtualmode"))
#end
############################################################################################
## MACROS
#macro(getRequestList $paramlist $paramname)
  #set ($paramtable = [])
  #set ($paramtable = $request.getParameterValues($paramname))
  #if ($paramtable)
    #set ($paramlist = [])
    #foreach($paramvalue in $paramtable)
      #set ($ok = $paramlist.add($paramvalue))
    #end
  #end
#end
##
#macro(printUsersAndGroups $users $groups $rightlevel $userlist $grouplist $hidden)
  &lt;select #if ($hidden) type="hidden" #end name="${rightlevel}users" id="${rightlevel}users" multiple="multiple"&gt;
    #foreach ($user in $users)
      #if ($context.database == $context.mainWikiName) #set ($user = "${context.mainWikiName}:${user}") #end
      &lt;option value="$user" #if ($userlist &amp;&amp; $userlist.contains($user)) selected="selected" #end&gt;$xwiki.getUserName($user, $util.null, false)&lt;/option&gt;
    #end
  &lt;/select&gt;
  &lt;select #if ($hidden) type="hidden" #end name="${rightlevel}groups" id="${rightlevel}groups" multiple="multiple"&gt;
    #foreach ($group in $groups)
      #if ($context.database == $context.mainWikiName) #set ($group = "${context.mainWikiName}:${group}") #end
      #set ($pointindex = $group.indexOf(".") + 1)
      &lt;option value="$group" #if ($grouplist &amp;&amp; $grouplist.contains($group)) selected="selected" #end&gt;$group.substring($pointindex)&lt;/option&gt;
    #end
  &lt;/select&gt;
#end
##
#macro(addRights $prefdoc $userlist $grouplist $rights $needsave)
  #set ($users = "")
  #foreach($user in $userlist)
    #if ($users != "")
      #set ($users = "${users},${user}")
    #else
      #set ($users = $user)
    #end
  #end
  #set ($groups = "")
  #foreach($group in $grouplist)
    #if ($groups != "")
      #set ($groups = "${groups},${group}")
    #else
      #set ($groups = $group)
    #end
  #end
  ##
  #if (($users != "") || ($groups != ""))
    #set ($rightsobj = $prefdoc.newObject("XWiki.XWikiGlobalRights"))
    ##
    #set ($ok = $rightsobj.set("users", $users))
    #set ($ok = $rightsobj.set("groups", $groups))
    #set ($ok = $rightsobj.set("levels", $rights))
    #set ($ok = $rightsobj.set("allow", 1))
    ##
    #set ($needsave = true)
  #end
#end
############################################################################################
## TOOLS
#set ($Exception = $WikiManager.DefaultException)
#set ($ALIASSUFFIX = ".localdomain.com")
#set ($WSTEPID_INTRO = 0)    ## Wiki creation introduction
#set ($WSTEPNAME_INTRO = "wstep_intro")
#set ($WSTEPID_WIKINAME = 1) ## Wiki name
#set ($WSTEPNAME_WIKINAME = "wstep_wikiname")
#set ($WSTEPID_WIKIDESC = 2) ## Wiki descriptor informations
#set ($WSTEPNAME_WIKIDESC = "wstep_wikidesc")
#set ($WSTEPID_DATAFROM = 3) ## Initialise wiki data from wiki template or XAR package
#set ($WSTEPNAME_DATAFROM = "wstep_datafrom")
#set ($WSTEPID_USERS = 4)    ## Preregistered users
#set ($WSTEPNAME_USERS = "wstep_users")
#set ($WSTEPID_SUMMARY = 5)  ## Summary be fore create
#set ($WSTEPNAME_SUMMARY = "wstep_summary")
#set ($WSTEPLIST = [$WSTEPNAME_INTRO, $WSTEPNAME_WIKINAME, $WSTEPNAME_WIKIDESC, $WSTEPNAME_DATAFROM, $WSTEPNAME_USERS, $WSTEPNAME_SUMMARY])
#set ($ISWIKINAMEAVAILABLE = $xwiki.getDocument("WikiCode.IsWikiOrDatabaseAvailableService").externalURL)
#set ($MSG_ERROR_WIKIALREADYEXISTS = "&lt;div class=\"errormessage\"&gt;&lt;span class=\"messagetype\"&gt;$msg.get('error'): &lt;/span&gt;$msg.get('wikimanager.wikiname.error.wikialreadyexists')&lt;/div&gt;")
#set ($MSG_WARNING_DATABASEALREADYEXISTS = "&lt;div class=\"warningmessage\"&gt;&lt;span class=\"messagetype\"&gt;$msg.get('warning'): &lt;/span&gt;$msg.get('wikimanager.wikiname.error.databasealreadyexists')&lt;/div&gt;")
#set ($MSG_ERROR_DATABASEALREADYEXISTS = "&lt;div class=\"errormessage\"&gt;&lt;span class=\"messagetype\"&gt;$msg.get('error'): &lt;/span&gt;$msg.get('wikimanager.wikiname.error.databasealreadyexists')&lt;/div&gt;")
#set ($MSG_ERROR_WIKINAMEALREADYUSED = "&lt;div class=\"errormessage\"&gt;&lt;span class=\"messagetype\"&gt;$msg.get('error'): &lt;/span&gt;$msg.get('wikimanager.wikiname.error.alreadyused')&lt;/div&gt;")
#set ($MSG_ERROR_WIKINAMEEMPTY = "&lt;div class=\"errormessage\"&gt;&lt;span class=\"messagetype\"&gt;$msg.get('error'): &lt;/span&gt;$msg.get('wikimanager.wikiname.error.empty')&lt;/div&gt;")
#set ($MSG_INFO_WIKINAMEVALID = "&lt;div class=\"infomessage\"&gt;&lt;span class=\"messagetype\"&gt;$msg.get('info'): &lt;/span&gt;$msg.get('wikimanager.wikiname.info.valid')&lt;/div&gt;")
##
############################################################################################
## REQUEST PARAMETERS
#if ($request.stepbystep)<commit_msg>XAWM-97: The create new wiki form should not use getExternalURL to generate the ajax URL<commit_after><?xml version="1.0" encoding="ISO-8859-1"?>

<xwikidoc>
<web>WikiManager</web>
<name>CreateNewWiki</name>
<language></language>
<defaultLanguage>en</defaultLanguage>
<translation>0</translation>
<parent>WikiManager.WebHome</parent>
<creator>XWiki.Admin</creator>
<author>XWiki.Admin</author>
<customClass></customClass>
<contentAuthor>XWiki.Admin</contentAuthor>
<creationDate>1186676964000</creationDate>
<date>1233157893000</date>
<contentUpdateDate>1233157893000</contentUpdateDate>
<version>4.1</version>
<title>CreateNewWiki</title>
<template></template>
<defaultTemplate></defaultTemplate>
<validationScript></validationScript>
<comment></comment>
<minorEdit>false</minorEdit>
<syntaxId>xwiki/1.0</syntaxId>
<hidden>false</hidden>
<object>
<class>
<name>XWiki.TagClass</name>
<customClass></customClass>
<customMapping></customMapping>
<defaultViewSheet></defaultViewSheet>
<defaultEditSheet></defaultEditSheet>
<defaultWeb></defaultWeb>
<nameField></nameField>
<validationScript></validationScript>
<tags>
<cache>0</cache>
<displayType>input</displayType>
<multiSelect>1</multiSelect>
<name>tags</name>
<number>1</number>
<prettyName>Tags</prettyName>
<relationalStorage>1</relationalStorage>
<separator> </separator>
<separators> ,|</separators>
<size>30</size>
<unmodifiable>0</unmodifiable>
<values></values>
<classType>com.xpn.xwiki.objects.classes.StaticListClass</classType>
</tags>
</class>
<name>WikiManager.CreateNewWiki</name>
<number>0</number>
<className>XWiki.TagClass</className>
<guid>afccd63d-a604-48bc-84a9-22ac9c9e065c</guid>
<property>
<tags/>
</property>
</object>
<content>############################################################################################
## Create a new wiki with initial minimum informations step by step or in one page.
##
## Can use URL parameters :
## -doc
##   0   : Just show input and properties names
##   1   : Print documentation for each field
## -stepbystep
##   0   : All informations in one page and create button
##   1   : Step by step based on javascript
##
############################################################################################
## PLUGINS DEPENDANCIES
#set ($WikiManager = $xwiki.wikimanager)
#if (!$WikiManager)
  #error($msg.get("wikimanager.pluginnotenabled"))
#end
#if (!$xwiki.applicationmanager)
  #error($msg.get("xapp.pluginnotenabled"))
#end
#if(!$xwiki.isVirtualMode())
  #error($msg.get("wikimanager.notinvirtualmode"))
#end
############################################################################################
## MACROS
#macro(getRequestList $paramlist $paramname)
  #set ($paramtable = [])
  #set ($paramtable = $request.getParameterValues($paramname))
  #if ($paramtable)
    #set ($paramlist = [])
    #foreach($paramvalue in $paramtable)
      #set ($ok = $paramlist.add($paramvalue))
    #end
  #end
#end
##
#macro(printUsersAndGroups $users $groups $rightlevel $userlist $grouplist $hidden)
  &lt;select #if ($hidden) type="hidden" #end name="${rightlevel}users" id="${rightlevel}users" multiple="multiple"&gt;
    #foreach ($user in $users)
      #if ($context.database == $context.mainWikiName) #set ($user = "${context.mainWikiName}:${user}") #end
      &lt;option value="$user" #if ($userlist &amp;&amp; $userlist.contains($user)) selected="selected" #end&gt;$xwiki.getUserName($user, $util.null, false)&lt;/option&gt;
    #end
  &lt;/select&gt;
  &lt;select #if ($hidden) type="hidden" #end name="${rightlevel}groups" id="${rightlevel}groups" multiple="multiple"&gt;
    #foreach ($group in $groups)
      #if ($context.database == $context.mainWikiName) #set ($group = "${context.mainWikiName}:${group}") #end
      #set ($pointindex = $group.indexOf(".") + 1)
      &lt;option value="$group" #if ($grouplist &amp;&amp; $grouplist.contains($group)) selected="selected" #end&gt;$group.substring($pointindex)&lt;/option&gt;
    #end
  &lt;/select&gt;
#end
##
#macro(addRights $prefdoc $userlist $grouplist $rights $needsave)
  #set ($users = "")
  #foreach($user in $userlist)
    #if ($users != "")
      #set ($users = "${users},${user}")
    #else
      #set ($users = $user)
    #end
  #end
  #set ($groups = "")
  #foreach($group in $grouplist)
    #if ($groups != "")
      #set ($groups = "${groups},${group}")
    #else
      #set ($groups = $group)
    #end
  #end
  ##
  #if (($users != "") || ($groups != ""))
    #set ($rightsobj = $prefdoc.newObject("XWiki.XWikiGlobalRights"))
    ##
    #set ($ok = $rightsobj.set("users", $users))
    #set ($ok = $rightsobj.set("groups", $groups))
    #set ($ok = $rightsobj.set("levels", $rights))
    #set ($ok = $rightsobj.set("allow", 1))
    ##
    #set ($needsave = true)
  #end
#end
############################################################################################
## TOOLS
#set ($Exception = $WikiManager.DefaultException)
#set ($ALIASSUFFIX = ".localdomain.com")
#set ($WSTEPID_INTRO = 0)    ## Wiki creation introduction
#set ($WSTEPNAME_INTRO = "wstep_intro")
#set ($WSTEPID_WIKINAME = 1) ## Wiki name
#set ($WSTEPNAME_WIKINAME = "wstep_wikiname")
#set ($WSTEPID_WIKIDESC = 2) ## Wiki descriptor informations
#set ($WSTEPNAME_WIKIDESC = "wstep_wikidesc")
#set ($WSTEPID_DATAFROM = 3) ## Initialise wiki data from wiki template or XAR package
#set ($WSTEPNAME_DATAFROM = "wstep_datafrom")
#set ($WSTEPID_USERS = 4)    ## Preregistered users
#set ($WSTEPNAME_USERS = "wstep_users")
#set ($WSTEPID_SUMMARY = 5)  ## Summary be fore create
#set ($WSTEPNAME_SUMMARY = "wstep_summary")
#set ($WSTEPLIST = [$WSTEPNAME_INTRO, $WSTEPNAME_WIKINAME, $WSTEPNAME_WIKIDESC, $WSTEPNAME_DATAFROM, $WSTEPNAME_USERS, $WSTEPNAME_SUMMARY])
#set ($ISWIKINAMEAVAILABLE = $xwiki.getDocument("WikiCode.IsWikiOrDatabaseAvailableService").URL)
#set ($MSG_ERROR_WIKIALREADYEXISTS = "&lt;div class=\"errormessage\"&gt;&lt;span class=\"messagetype\"&gt;$msg.get('error'): &lt;/span&gt;$msg.get('wikimanager.wikiname.error.wikialreadyexists')&lt;/div&gt;")
#set ($MSG_WARNING_DATABASEALREADYEXISTS = "&lt;div class=\"warningmessage\"&gt;&lt;span class=\"messagetype\"&gt;$msg.get('warning'): &lt;/span&gt;$msg.get('wikimanager.wikiname.error.databasealreadyexists')&lt;/div&gt;")
#set ($MSG_ERROR_DATABASEALREADYEXISTS = "&lt;div class=\"errormessage\"&gt;&lt;span class=\"messagetype\"&gt;$msg.get('error'): &lt;/span&gt;$msg.get('wikimanager.wikiname.error.databasealreadyexists')&lt;/div&gt;")
#set ($MSG_ERROR_WIKINAMEALREADYUSED = "&lt;div class=\"errormessage\"&gt;&lt;span class=\"messagetype\"&gt;$msg.get('error'): &lt;/span&gt;$msg.get('wikimanager.wikiname.error.alreadyused')&lt;/div&gt;")
#set ($MSG_ERROR_WIKINAMEEMPTY = "&lt;div class=\"errormessage\"&gt;&lt;span class=\"messagetype\"&gt;$msg.get('error'): &lt;/span&gt;$msg.get('wikimanager.wikiname.error.empty')&lt;/div&gt;")
#set ($MSG_INFO_WIKINAMEVALID = "&lt;div class=\"infomessage\"&gt;&lt;span class=\"messagetype\"&gt;$msg.get('info'): &lt;/span&gt;$msg.get('wikimanager.wikiname.info.valid')&lt;/div&gt;")
##
############################################################################################
## REQUEST PARAMETERS
#if ($request.stepbystep)
{'fraction_non_alphanumeric': 0.24659638343922363, 'fraction_numerical': 0.012427564057809119, 'mean_word_length': 6.984392419175028, 'pattern_counts': {'":': 0, '<': 215, '<?xml version=': 2, '>': 215, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3638138', 'n_tokens_mistral': 5164, 'n_tokens_neox': 4948, 'n_words': 823}