<commit_before><%--
  ~ ConcourseConnect
  ~ Copyright 2009 Concursive Corporation
  ~ http://www.concursive.com
  ~
  ~ This file is part of ConcourseConnect, an open source social business
  ~ software and community platform.
  ~
  ~ Concursive ConcourseConnect is free software: you can redistribute it and/or
  ~ modify it under the terms of the GNU Affero General Public License as published
  ~ by the Free Software Foundation, version 3 of the License.
  ~
  ~ Under the terms of the GNU Affero General Public License you must release the
  ~ complete source code for any application that uses any part of ConcourseConnect
  ~ (system header files and libraries used by the operating system are excluded).
  ~ These terms must be included in any work that has ConcourseConnect components.
  ~ If you are developing and distributing open source applications under the
  ~ GNU Affero General Public License, then you are free to use ConcourseConnect
  ~ under the GNU Affero General Public License.
  ~
  ~ If you are deploying a web site in which users interact with any portion of
  ~ ConcourseConnect over a network, the complete source code changes must be made
  ~ available.  For example, include a link to the source archive directly from
  ~ your web site.
  ~
  ~ For OEMs, ISVs, SIs and VARs who distribute ConcourseConnect with their
  ~ products, and do not license and distribute their source code under the GNU
  ~ Affero General Public License, Concursive provides a flexible commercial
  ~ license.
  ~
  ~ To anyone in doubt, we recommend the commercial license. Our commercial license
  ~ is competitively priced and will eliminate any confusion about how
  ~ ConcourseConnect can be used and distributed.
  ~
  ~ ConcourseConnect is distributed in the hope that it will be useful, but WITHOUT
  ~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  ~ FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
  ~ details.
  ~
  ~ You should have received a copy of the GNU Affero General Public License
  ~ along with ConcourseConnect.  If not, see <http://www.gnu.org/licenses/>.
  ~
  ~ Attribution Notice: ConcourseConnect is an Original Work of software created
  ~ by Concursive Corporation
  --%>
<%@ taglib uri="/WEB-INF/portlet.tld" prefix="portlet" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/WEB-INF/concourseconnect-taglib.tld" prefix="ccp" %>
<%@ page import="com.concursive.commons.text.StringUtils"%>
<%@ page import="com.concursive.connect.web.modules.wiki.utils.WikiUtils"%>
<%@ page import="com.concursive.connect.web.modules.members.dao.TeamMember"%>
<%@ page import="com.concursive.connect.web.modules.wiki.dao.WikiComment"%>
<%@ page import="com.concursive.connect.web.modules.wiki.utils.WikiToHTMLUtils" %>
<%@ page import="com.concursive.connect.web.modules.profile.utils.ProjectUtils" %>
<%@ page import="com.concursive.connect.web.modules.ModuleUtils" %>
<jsp:useBean id="SKIN" class="java.lang.String" scope="application"/>
<jsp:useBean id="User" class="com.concursive.connect.web.modules.login.dao.User" scope="session"/>
<jsp:useBean id="project" class="com.concursive.connect.web.modules.profile.dao.Project" scope="request"/>
<jsp:useBean id="currentMember" class="com.concursive.connect.web.modules.members.dao.TeamMember" scope="request"/>
<jsp:useBean id="wiki" class="com.concursive.connect.web.modules.wiki.dao.Wiki" scope="request"/>
<jsp:useBean id="wikiStateList" class="com.concursive.connect.cms.portal.dao.ProjectItemList" scope="request"/>
<jsp:useBean id="commentList" class="com.concursive.connect.web.modules.wiki.dao.WikiCommentList" scope="request"/>
<jsp:useBean id="userRating" class="java.lang.String" scope="request"/>
<jsp:useBean id="imageList" class="java.util.HashMap" scope="request"/>
<jsp:useBean id="wikiHtml" class="java.lang.String" scope="request"/>
<jsp:useBean id="trailMap" class="com.concursive.connect.web.utils.TrailMap" scope="request"/>
<portlet:defineObjects/>
<%@ include file="initPage.jsp" %>
<%-- Initialize the drop-down menus --%>
<%@ include file="initPopupMenu.jsp" %>
<%@ include file="projects_center_wiki_menu.jspf" %>
<%-- Preload image rollovers --%>
<script language="JavaScript" type="text/javascript">
  loadImages('select_<%= SKIN %>');
</script>
<div id="message" class="menu">
  <p>Thank you for your valuable feedback.</p>
</div>
  <div id="deleteMessage" class="menu">
    <p>Comment deleted.</p>
  </div>
<div class="articleContainer">
  <c:if test="${empty param.popup && empty popup}">
    <div class="articleHeader">
      <div class="header">
        <%-- Show the user's current trail --%>
        <ccp:evaluate if="<%= trailMap.size() > 0 %>">
          <portlet:renderURL var="homeUrl" portletMode="view">
            <portlet:param name="portlet-action" value="show"/>
            <portlet:param name="portlet-object" value="wiki"/>
          </portlet:renderURL>
          <p>Your trail:
            <a href="${homeUrl}"><ccp:label name="projectsCenterWiki.home">Home</ccp:label></a>
            <%
              Iterator i = trailMap.iterator();
              while (i.hasNext()) {
                String thisSubject = (String) i.next();
            %>
            &gt;
            <portlet:renderURL var="trailUrl" portletMode="view">
              <portlet:param name="portlet-action" value="show"/>
              <portlet:param name="portlet-object" value="wiki"/>
              <portlet:param name="portlet-value" value='<%= StringUtils.replace(StringUtils.jsEscape(thisSubject), "%20", "+") %>'/>
            </portlet:renderURL>
          <ccp:evaluate if="<%= i.hasNext() %>"><p><a href="${trailUrl}"></ccp:evaluate><%= toHtml(thisSubject) %><ccp:evaluate if="<%= i.hasNext() %>"></a></ccp:evaluate>
          <%
            }
          %>
          </p>
        </ccp:evaluate>
        <h1>
          <ccp:evaluate if="<%= hasText(wiki.getSubject()) %>">
            <%= toHtml(wiki.getSubject()) %>
          </ccp:evaluate>
          <ccp:evaluate if="<%= !hasText(wiki.getSubject()) %>">
            <%= toHtml(project.getTitle()) %> Home
          </ccp:evaluate>
        </h1>
        <ccp:permission if="any" name="project-wiki-add,project-wiki-admin">
          <div class="actions">
              <%-- WYSIWYG URL --%>
            <portlet:renderURL var="wysiwygUrl" portletMode="view">
              <portlet:param name="portlet-action" value="modify"/>
              <portlet:param name="portlet-object" value="wiki"/>
              <ccp:evaluate if="<%= hasText(wiki.getSubject()) %>">
                <portlet:param name="portlet-value" value="<%= wiki.getSubjectLink() %>"/>
              </ccp:evaluate>
            </portlet:renderURL>
              <%-- Markup Editor URL --%>
            <portlet:renderURL var="markupEditorUrl" portletMode="view">
              <portlet:param name="portlet-action" value="modify"/>
              <portlet:param name="portlet-object" value="wiki"/>
              <ccp:evaluate if="<%= hasText(wiki.getSubject()) %>">
                <portlet:param name="portlet-value" value="<%= wiki.getSubjectLink() %>"/>
              </ccp:evaluate>
              <portlet:param name="mode" value="raw"/>
            </portlet:renderURL>
            <ccp:permission name="project-wiki-add">
              <ccp:evaluate if="<%= !wiki.getReadOnly() %>">
                <a href="${wysiwygUrl}" title="Visual Editor">
                  <em>Visual Editor</em>
                </a>
                <a href="${markupEditorUrl}" title="Markup Editor">
                  <em>Markup Editor</em>
                </a>
              </ccp:evaluate>
              <ccp:evaluate if="<%= wiki.getReadOnly() %>">
                <ccp:permission name="project-wiki-locked-edit">
                  <a href="${wysiwygUrl}" title="Visual Editor">
                    <em>Visual Editor</em>
                  </a>
                  <a href="${markupEditorUrl}" title="Markup Editor">
                    <em>Markup Editor</em>
                  </a>
                </ccp:permission>
              </ccp:evaluate>
            </ccp:permission>
            <ccp:permission if="any" name="project-wiki-add,project-wiki-admin">
              <ccp:evaluate if="<%= wiki.getId() > -1 %>">
                <portlet:renderURL var="exportUrl">
                  <portlet:param name="portlet-action" value="export"/>
                  <portlet:param name="portlet-object" value="wiki"/>
                  <ccp:evaluate if="<%= hasText(wiki.getSubject()) %>">
                    <portlet:param name="portlet-value" value="<%= wiki.getSubjectLink() %>"/>
                  </ccp:evaluate>
                </portlet:renderURL>
                <a href="${exportUrl}" rel="shadowbox" title="Export to PDF">
                  <img src="${ctx}/images/icons/pdf_export.png" border="0" height="16" width="16" alt="Export to PDF"/>
                </a>
                <ccp:permission name="project-wiki-add">
                  <portlet:renderURL var="versionsUrl">
                    <portlet:param name="portlet-action" value="show"/>
                    <portlet:param name="portlet-object" value="wiki-versions"/>
                    <ccp:evaluate if="<%= hasText(wiki.getSubject()) %>">
                      <portlet:param name="portlet-value" value="<%= wiki.getSubjectLink() %>"/>
                    </ccp:evaluate>
                  </portlet:renderURL>
                  <a href="${versionsUrl}" title="Wiki Versions">
                    <img src="<%= ctx %>/images/icons/notebooks.png" border="0" height="16" width="16" alt="Wiki Versions"/>
                  </a>
                </ccp:permission>
                <ccp:evaluate if="<%= !wiki.getReadOnly() %>"><commit_msg>FIX: permissions<commit_after><%--
  ~ ConcourseConnect
  ~ Copyright 2009 Concursive Corporation
  ~ http://www.concursive.com
  ~
  ~ This file is part of ConcourseConnect, an open source social business
  ~ software and community platform.
  ~
  ~ Concursive ConcourseConnect is free software: you can redistribute it and/or
  ~ modify it under the terms of the GNU Affero General Public License as published
  ~ by the Free Software Foundation, version 3 of the License.
  ~
  ~ Under the terms of the GNU Affero General Public License you must release the
  ~ complete source code for any application that uses any part of ConcourseConnect
  ~ (system header files and libraries used by the operating system are excluded).
  ~ These terms must be included in any work that has ConcourseConnect components.
  ~ If you are developing and distributing open source applications under the
  ~ GNU Affero General Public License, then you are free to use ConcourseConnect
  ~ under the GNU Affero General Public License.
  ~
  ~ If you are deploying a web site in which users interact with any portion of
  ~ ConcourseConnect over a network, the complete source code changes must be made
  ~ available.  For example, include a link to the source archive directly from
  ~ your web site.
  ~
  ~ For OEMs, ISVs, SIs and VARs who distribute ConcourseConnect with their
  ~ products, and do not license and distribute their source code under the GNU
  ~ Affero General Public License, Concursive provides a flexible commercial
  ~ license.
  ~
  ~ To anyone in doubt, we recommend the commercial license. Our commercial license
  ~ is competitively priced and will eliminate any confusion about how
  ~ ConcourseConnect can be used and distributed.
  ~
  ~ ConcourseConnect is distributed in the hope that it will be useful, but WITHOUT
  ~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  ~ FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
  ~ details.
  ~
  ~ You should have received a copy of the GNU Affero General Public License
  ~ along with ConcourseConnect.  If not, see <http://www.gnu.org/licenses/>.
  ~
  ~ Attribution Notice: ConcourseConnect is an Original Work of software created
  ~ by Concursive Corporation
  --%>
<%@ taglib uri="/WEB-INF/portlet.tld" prefix="portlet" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/WEB-INF/concourseconnect-taglib.tld" prefix="ccp" %>
<%@ page import="com.concursive.commons.text.StringUtils"%>
<%@ page import="com.concursive.connect.web.modules.wiki.utils.WikiUtils"%>
<%@ page import="com.concursive.connect.web.modules.members.dao.TeamMember"%>
<%@ page import="com.concursive.connect.web.modules.wiki.dao.WikiComment"%>
<%@ page import="com.concursive.connect.web.modules.wiki.utils.WikiToHTMLUtils" %>
<%@ page import="com.concursive.connect.web.modules.profile.utils.ProjectUtils" %>
<%@ page import="com.concursive.connect.web.modules.ModuleUtils" %>
<jsp:useBean id="SKIN" class="java.lang.String" scope="application"/>
<jsp:useBean id="User" class="com.concursive.connect.web.modules.login.dao.User" scope="session"/>
<jsp:useBean id="project" class="com.concursive.connect.web.modules.profile.dao.Project" scope="request"/>
<jsp:useBean id="currentMember" class="com.concursive.connect.web.modules.members.dao.TeamMember" scope="request"/>
<jsp:useBean id="wiki" class="com.concursive.connect.web.modules.wiki.dao.Wiki" scope="request"/>
<jsp:useBean id="wikiStateList" class="com.concursive.connect.cms.portal.dao.ProjectItemList" scope="request"/>
<jsp:useBean id="commentList" class="com.concursive.connect.web.modules.wiki.dao.WikiCommentList" scope="request"/>
<jsp:useBean id="userRating" class="java.lang.String" scope="request"/>
<jsp:useBean id="imageList" class="java.util.HashMap" scope="request"/>
<jsp:useBean id="wikiHtml" class="java.lang.String" scope="request"/>
<jsp:useBean id="trailMap" class="com.concursive.connect.web.utils.TrailMap" scope="request"/>
<portlet:defineObjects/>
<%@ include file="initPage.jsp" %>
<%-- Initialize the drop-down menus --%>
<%@ include file="initPopupMenu.jsp" %>
<%@ include file="projects_center_wiki_menu.jspf" %>
<%-- Preload image rollovers --%>
<script language="JavaScript" type="text/javascript">
  loadImages('select_<%= SKIN %>');
</script>
<div id="message" class="menu">
  <p>Thank you for your valuable feedback.</p>
</div>
  <div id="deleteMessage" class="menu">
    <p>Comment deleted.</p>
  </div>
<div class="articleContainer">
  <c:if test="${empty param.popup && empty popup}">
    <div class="articleHeader">
      <div class="header">
        <%-- Show the user's current trail --%>
        <ccp:evaluate if="<%= trailMap.size() > 0 %>">
          <portlet:renderURL var="homeUrl" portletMode="view">
            <portlet:param name="portlet-action" value="show"/>
            <portlet:param name="portlet-object" value="wiki"/>
          </portlet:renderURL>
          <p>Your trail:
            <a href="${homeUrl}"><ccp:label name="projectsCenterWiki.home">Home</ccp:label></a>
            <%
              Iterator i = trailMap.iterator();
              while (i.hasNext()) {
                String thisSubject = (String) i.next();
            %>
            &gt;
            <portlet:renderURL var="trailUrl" portletMode="view">
              <portlet:param name="portlet-action" value="show"/>
              <portlet:param name="portlet-object" value="wiki"/>
              <portlet:param name="portlet-value" value='<%= StringUtils.replace(StringUtils.jsEscape(thisSubject), "%20", "+") %>'/>
            </portlet:renderURL>
          <ccp:evaluate if="<%= i.hasNext() %>"><p><a href="${trailUrl}"></ccp:evaluate><%= toHtml(thisSubject) %><ccp:evaluate if="<%= i.hasNext() %>"></a></ccp:evaluate>
          <%
            }
          %>
          </p>
        </ccp:evaluate>
        <h1>
          <ccp:evaluate if="<%= hasText(wiki.getSubject()) %>">
            <%= toHtml(wiki.getSubject()) %>
          </ccp:evaluate>
          <ccp:evaluate if="<%= !hasText(wiki.getSubject()) %>">
            <%= toHtml(project.getTitle()) %> Home
          </ccp:evaluate>
        </h1>
        <ccp:permission if="any" name="project-wiki-add,project-wiki-admin,project-wiki-locked-edit,project-wiki-delete">
          <div class="actions">
              <%-- WYSIWYG URL --%>
            <portlet:renderURL var="wysiwygUrl" portletMode="view">
              <portlet:param name="portlet-action" value="modify"/>
              <portlet:param name="portlet-object" value="wiki"/>
              <ccp:evaluate if="<%= hasText(wiki.getSubject()) %>">
                <portlet:param name="portlet-value" value="<%= wiki.getSubjectLink() %>"/>
              </ccp:evaluate>
            </portlet:renderURL>
              <%-- Markup Editor URL --%>
            <portlet:renderURL var="markupEditorUrl" portletMode="view">
              <portlet:param name="portlet-action" value="modify"/>
              <portlet:param name="portlet-object" value="wiki"/>
              <ccp:evaluate if="<%= hasText(wiki.getSubject()) %>">
                <portlet:param name="portlet-value" value="<%= wiki.getSubjectLink() %>"/>
              </ccp:evaluate>
              <portlet:param name="mode" value="raw"/>
            </portlet:renderURL>
            <ccp:permission name="project-wiki-add">
              <ccp:evaluate if="<%= !wiki.getReadOnly() %>">
                <a href="${wysiwygUrl}" title="Visual Editor">
                  <em>Visual Editor</em>
                </a>
                <a href="${markupEditorUrl}" title="Markup Editor">
                  <em>Markup Editor</em>
                </a>
              </ccp:evaluate>
              <ccp:evaluate if="<%= wiki.getReadOnly() %>">
                <ccp:permission name="project-wiki-locked-edit">
                  <a href="${wysiwygUrl}" title="Visual Editor">
                    <em>Visual Editor</em>
                  </a>
                  <a href="${markupEditorUrl}" title="Markup Editor">
                    <em>Markup Editor</em>
                  </a>
                </ccp:permission>
              </ccp:evaluate>
            </ccp:permission>
            <ccp:permission if="any" name="project-wiki-add,project-wiki-admin,project-wiki-delete">
              <ccp:evaluate if="<%= wiki.getId() > -1 %>">
                <portlet:renderURL var="exportUrl">
                  <portlet:param name="portlet-action" value="export"/>
                  <portlet:param name="portlet-object" value="wiki"/>
                  <ccp:evaluate if="<%= hasText(wiki.getSubject()) %>">
                    <portlet:param name="portlet-value" value="<%= wiki.getSubjectLink() %>"/>
                  </ccp:evaluate>
                </portlet:renderURL>
                <a href="${exportUrl}" rel="shadowbox" title="Export to PDF">
                  <img src="${ctx}/images/icons/pdf_export.png" border="0" height="16" width="16" alt="Export to PDF"/>
                </a>
                <ccp:permission name="project-wiki-add">
                  <portlet:renderURL var="versionsUrl">
                    <portlet:param name="portlet-action" value="show"/>
                    <portlet:param name="portlet-object" value="wiki-versions"/>
                    <ccp:evaluate if="<%= hasText(wiki.getSubject()) %>">
                      <portlet:param name="portlet-value" value="<%= wiki.getSubjectLink() %>"/>
                    </ccp:evaluate>
                  </portlet:renderURL>
                  <a href="${versionsUrl}" title="Wiki Versions">
                    <img src="<%= ctx %>/images/icons/notebooks.png" border="0" height="16" width="16" alt="Wiki Versions"/>
                  </a>
                </ccp:permission>
                <ccp:evaluate if="<%= !wiki.getReadOnly() %>">
{'fraction_non_alphanumeric': 0.15283421373425438, 'fraction_numerical': 0.0021332791548151157, 'mean_word_length': 2.801699169723885, 'pattern_counts': {'":': 0, '<': 337, '<?xml version=': 0, '>': 341, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, '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': '2495784', 'n_tokens_mistral': 5982, 'n_tokens_neox': 5677, 'n_words': 1333}