<commit_before><?xml version="1.0" encoding="UTF-8"?>

<xwikidoc>
  <web>ForumCode</web>
  <name>NewFlagSheet</name>
  <language/>
  <defaultLanguage/>
  <translation>0</translation>
  <parent>WebHome</parent>
  <creator>xwiki:XWiki.Admin</creator>
  <author>xwiki:XWiki.Admin</author>
  <customClass/>
  <contentAuthor>xwiki:XWiki.Admin</contentAuthor>
  <creationDate>1375308000000</creationDate>
  <date>1375308000000</date>
  <contentUpdateDate>1375308000000</contentUpdateDate>
  <version>1.1</version>
  <title>$msg.get("conversations.flag.dialog.header") </title>
  <defaultTemplate/>
  <validationScript/>
  <comment/>
  <minorEdit>false</minorEdit>
  <syntaxId>xwiki/2.1</syntaxId>
  <hidden>true</hidden>
  <content>{{velocity}}
= $msg.get("conversations.flag.dialog.header")  =

#set($flagDocName = $xwiki.getUniquePageName("Flags", "Flag"))
#set($flagDoc = $xwiki.getDocument("Flags.${flagDocName}"))
#set($ok = $flagDoc.setContent($xwiki.getDocument("ForumCode.FlagTemplate").content))
#set($ok = $flagDoc.setParent("Flags.WebHome"))
#set($ok = $flagDoc.setHidden(true))
#if(!$flagDoc.getObject("ForumCode.FlagClass"))
 #set($ok = $flagDoc.newObject("ForumCode.FlagClass"))
#end
#set($ok = $flagDoc.use("ForumCode.FlagClass"))
#if($request.get("ForumCode.FlagClass_0_message") &amp;&amp; $request.get("ForumCode.FlagClass_0_message").trim()!="" &amp;&amp; $request.get("ForumCode.FlagClass_0_reason")!="")
 #set($ok = $flagDoc.updateObjectFromRequest("ForumCode.FlagClass"))
 #set($ok = $flagDoc.set("status", "open"))
 #set($ok = $flagDoc.setSpace("Flags"))
 #set($ok = $flagDoc.saveWithProgrammingRights())
## sending email
#set($mailFrom = $xwiki.getXWikiPreference("admin_email"))
#set($mailTo = $xwiki.getXWikiPreference("admin_email"))
#set($moderator = $flagDoc.getValue("moderator"))
#if($moderator &amp;&amp; $moderator!="")
#set($moderatorDoc = $xwiki.getDocument($moderator))
#set($moderatorEmail = $moderatorDoc.getValue("email"))
#if($moderatorEmail &amp;&amp; $moderatorEmail!="")
 #set($mailTo = "${mailTo},${moderatorEmail}")
#end
#end
#set($url = $flagDoc.getExternalURL())
#set($res = $xwiki.mailsender.sendMessageFromTemplate($mailFrom, $mailTo, $util.null, $util.null, "en", "ForumCode.MailTemplateFlag", $context.vcontext))
## sending notification email
== $msg.get("conversations.flag.success.dialog.header") ==

$msg.get("conversations.flag.success.dialog.message")

[[$msg.get("conversations.flag.success.dialog.goback") &gt;&gt;$request.targetDocName]]
#else
#set($ok = $flagDoc.set("user", $context.user))
#if($request.target)
 #set($target = $request.target)
 #set($ok = $flagDoc.set("target", $target))
 #if($target.indexOf(":")!=-1)
  #set($targetDocName = $target.substring(0, $target.indexOf(":")))
 #else
  #set($targetDocName = $target)
 #end
 #set($targetDoc = $xwiki.getDocument($targetDocName))
 #set($ok = $flagDoc.set("moderator", $targetDoc.creator))
#else
 #set($targetDocName = $request.targetDocName)
#end
{{html clean='false' wiki='true'}}
&lt;form action="" method="post" class="xform"&gt;
&lt;input type="hidden" name="targetDocName" value="${escapetool.xml($targetDocName)}" /&gt;
$flagDoc.display("target", "hidden")
$flagDoc.display("user", "hidden")
$flagDoc.display("moderator", "hidden")
== $msg.get("conversations.flag.dialog.guidingquestion1.txt") ==
$msg.get("conversations.flag.dialog.instruction1.txt")
== $msg.get("conversations.flag.dialog.guidingquestion2.txt") ==
&lt;dl&gt;
  &lt;dt&gt;
    &lt;label&gt;$msg.get("conversations.flag.dialog.reason.label")&lt;/label&gt;
    &lt;span class="xHint"&gt;$msg.get("conversations.flag.dialog.instruction2.txt")&lt;/span&gt;
    #if($request.get("ForumCode.FlagClass_0_reason") &amp;&amp; $request.get("ForumCode.FlagClass_0_reason")=="")
      (% class="xErrorMsg" %)$msg.get("conversations.flag.dialog.mandatory")
    #end
  &lt;/dt&gt;
  &lt;dd&gt;
    $flagDoc.display("reason", "edit")
  &lt;/dd&gt;
  &lt;dt&gt;
    &lt;label&gt;$msg.get("conversations.flag.dialog.message.label")&lt;/label&gt;
    &lt;span class="xHint"&gt;$msg.get("conversations.flag.dialog.instruction3.txt")&lt;/span&gt;
    #if($request.get("ForumCode.FlagClass_0_message") &amp;&amp; $request.get("ForumCode.FlagClass_0_message").trim()=="")
      (% class="xErrorMsg" %)$msg.get("conversations.flag.dialog.mandatory")
    #end
  &lt;/dt&gt;
  &lt;dd&gt;
    $flagDoc.display("message", "edit")
  &lt;/dd&gt;
&lt;/dl&gt;
&lt;div class="buttons"&gt;
  &lt;span class="buttonwrapper"&gt;
    &lt;input class="button btn btn-primary" type="submit" value="$msg.get("conversations.flag.dialog.submit.btt")" /&gt;
  &lt;/span&gt;
  &lt;span class="buttonwrapper"&gt;
    &lt;input class="button secondary btn btn-default" type="button" value="$msg.get("conversations.flag.dialog.cancel.btt")" onclick="history.go(-1);" /&gt;
  &lt;/span&gt;
&lt;/div&gt;
&lt;/form&gt;
{{/html}}
#end
{{/velocity}}</content>
</xwikidoc><commit_msg>XAFORUM-131 : Remove #docextra when flagging<commit_after><?xml version="1.0" encoding="UTF-8"?>

<xwikidoc>
  <web>ForumCode</web>
  <name>NewFlagSheet</name>
  <language/>
  <defaultLanguage/>
  <translation>0</translation>
  <parent>WebHome</parent>
  <creator>xwiki:XWiki.Admin</creator>
  <author>xwiki:XWiki.Admin</author>
  <customClass/>
  <contentAuthor>xwiki:XWiki.Admin</contentAuthor>
  <creationDate>1375308000000</creationDate>
  <date>1375308000000</date>
  <contentUpdateDate>1375308000000</contentUpdateDate>
  <version>1.1</version>
  <title>$msg.get("conversations.flag.dialog.header") </title>
  <defaultTemplate/>
  <validationScript/>
  <comment/>
  <minorEdit>false</minorEdit>
  <syntaxId>xwiki/2.1</syntaxId>
  <hidden>true</hidden>
  <content>{{velocity}}
= $msg.get("conversations.flag.dialog.header")  =

#set($flagDocName = $xwiki.getUniquePageName("Flags", "Flag"))
#set($flagDoc = $xwiki.getDocument("Flags.${flagDocName}"))
#set($ok = $flagDoc.setContent($xwiki.getDocument("ForumCode.FlagTemplate").content))
#set($ok = $flagDoc.setParent("Flags.WebHome"))
#set($ok = $flagDoc.setHidden(true))
#if(!$flagDoc.getObject("ForumCode.FlagClass"))
 #set($ok = $flagDoc.newObject("ForumCode.FlagClass"))
#end
#set($ok = $flagDoc.use("ForumCode.FlagClass"))
#if($request.get("ForumCode.FlagClass_0_message") &amp;&amp; $request.get("ForumCode.FlagClass_0_message").trim()!="" &amp;&amp; $request.get("ForumCode.FlagClass_0_reason")!="")
 #set($ok = $flagDoc.updateObjectFromRequest("ForumCode.FlagClass"))
 #set($ok = $flagDoc.set("status", "open"))
 #set($ok = $flagDoc.setSpace("Flags"))
 #set($ok = $flagDoc.saveWithProgrammingRights())
## sending email
#set($mailFrom = $xwiki.getXWikiPreference("admin_email"))
#set($mailTo = $xwiki.getXWikiPreference("admin_email"))
#set($moderator = $flagDoc.getValue("moderator"))
#if($moderator &amp;&amp; $moderator!="")
#set($moderatorDoc = $xwiki.getDocument($moderator))
#set($moderatorEmail = $moderatorDoc.getValue("email"))
#if($moderatorEmail &amp;&amp; $moderatorEmail!="")
 #set($mailTo = "${mailTo},${moderatorEmail}")
#end
#end
#set($url = $flagDoc.getExternalURL())
#set($res = $xwiki.mailsender.sendMessageFromTemplate($mailFrom, $mailTo, $util.null, $util.null, "en", "ForumCode.MailTemplateFlag", $context.vcontext))
## sending notification email
== $msg.get("conversations.flag.success.dialog.header") ==

$msg.get("conversations.flag.success.dialog.message")

[[$msg.get("conversations.flag.success.dialog.goback") &gt;&gt;$request.targetDocName]]
#else
#set($ok = $flagDoc.set("user", $context.user))
#if($request.target)
 #set($target = $request.target)
 #set($ok = $flagDoc.set("target", $target))
 #if($target.indexOf(":")!=-1)
  #set($targetDocName = $target.substring(0, $target.indexOf(":")))
 #else
  #set($targetDocName = $target)
 #end
 #set($targetDoc = $xwiki.getDocument($targetDocName))
 #set($ok = $flagDoc.set("moderator", $targetDoc.creator))
#else
 #set($targetDocName = $request.targetDocName)
#end
{{html clean='false' wiki='true'}}
&lt;form action="" method="post" class="xform"&gt;
&lt;input type="hidden" name="targetDocName" value="${escapetool.xml($targetDocName)}" /&gt;
$flagDoc.display("target", "hidden")
$flagDoc.display("user", "hidden")
$flagDoc.display("moderator", "hidden")
== $msg.get("conversations.flag.dialog.guidingquestion1.txt") ==
$msg.get("conversations.flag.dialog.instruction1.txt")
== $msg.get("conversations.flag.dialog.guidingquestion2.txt") ==
&lt;dl&gt;
  &lt;dt&gt;
    &lt;label&gt;$msg.get("conversations.flag.dialog.reason.label")&lt;/label&gt;
    &lt;span class="xHint"&gt;$msg.get("conversations.flag.dialog.instruction2.txt")&lt;/span&gt;
    #if($request.get("ForumCode.FlagClass_0_reason") &amp;&amp; $request.get("ForumCode.FlagClass_0_reason")=="")
      (% class="xErrorMsg" %)$msg.get("conversations.flag.dialog.mandatory")
    #end
  &lt;/dt&gt;
  &lt;dd&gt;
    $flagDoc.display("reason", "edit")
  &lt;/dd&gt;
  &lt;dt&gt;
    &lt;label&gt;$msg.get("conversations.flag.dialog.message.label")&lt;/label&gt;
    &lt;span class="xHint"&gt;$msg.get("conversations.flag.dialog.instruction3.txt")&lt;/span&gt;
    #if($request.get("ForumCode.FlagClass_0_message") &amp;&amp; $request.get("ForumCode.FlagClass_0_message").trim()=="")
      (% class="xErrorMsg" %)$msg.get("conversations.flag.dialog.mandatory")
    #end
  &lt;/dt&gt;
  &lt;dd&gt;
    $flagDoc.display("message", "edit")
  &lt;/dd&gt;
&lt;/dl&gt;
&lt;div class="buttons"&gt;
  &lt;span class="buttonwrapper"&gt;
    &lt;input class="button btn btn-primary" type="submit" value="$msg.get("conversations.flag.dialog.submit.btt")" /&gt;
  &lt;/span&gt;
  &lt;span class="buttonwrapper"&gt;
    &lt;input class="button secondary btn btn-default" type="button" value="$msg.get("conversations.flag.dialog.cancel.btt")" onclick="history.go(-1);" /&gt;
  &lt;/span&gt;
&lt;/div&gt;
&lt;/form&gt;
{{/html}}
#end
#set($docextras = [])
{{/velocity}}</content>
</xwikidoc>
{'fraction_non_alphanumeric': 0.22076215505913271, 'fraction_numerical': 0.0128373597493177, 'mean_word_length': 7.245, 'pattern_counts': {'":': 4, '<': 85, '<?xml version=': 2, '>': 85, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '925268', 'n_tokens_mistral': 3818, 'n_tokens_neox': 3729, 'n_words': 420}