Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Commit 512a26b

Browse files
authored
Merge pull request #335 from appirio-tech/dev
env and code repo attribute support
2 parents dc05048 + 2651cc0 commit 512a26b

File tree

15 files changed

+46
-84
lines changed

15 files changed

+46
-84
lines changed

components/project_management/build.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@
143143
<property name="junit.jar" value="${ext_libdir}/junit/3.8.2/junit.jar"/>
144144
<property name="j2ee.jar" value="${ext_libdir}/j2ee/j2ee.jar"/>
145145
<property name="ifxjdbc.jar" value="${ext_libdir}/informix/ifxjdbc.jar"/>
146+
<property name="encoder-1.2.1.jar" value="${ext_libdir}/owasp/encoder-1.2.1.jar"/>
146147

147148
<!-- Java Locations -->
148149
<property name="java_1_3_bootclasspath" value="c:\program files\JavaSoft\JRE\1.3.1\lib\rt.jar"/>
@@ -160,6 +161,7 @@
160161
<pathelement location="${jaxb-api.jar}"/>
161162
<pathelement location="${j2ee.jar}"/>
162163
<pathelement location="${ifxjdbc.jar}"/>
164+
<pathelement location="${encoder-1.2.1.jar}"/>
163165
<pathelement location="${logging_wrapper.jar}" />
164166
<pathelement location="${typesafe_enum.jar}" />
165167
<pathelement location="${data_validation.jar}" />

components/project_management/src/java/main/com/topcoder/management/project/persistence/AbstractInformixProjectPersistence.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
import com.topcoder.util.sql.databaseabstraction.CustomResultSet;
6868
import com.topcoder.util.sql.databaseabstraction.InvalidCursorStateException;
6969
import com.topcoder.util.sql.databaseabstraction.NullColumnValueException;
70+
import org.owasp.encoder.Encode;
7071

7172
/**
7273
* <p>
@@ -5985,13 +5986,15 @@ private void createProjectProperties(Long projectId, Project project, Map idValu
59855986
for (Iterator it = idValueMap.entrySet().iterator(); it.hasNext();) {
59865987
Entry entry = (Entry) it.next();
59875988

5989+
Long key = (Long) entry.getKey();
5990+
String value = (String) entry.getValue();
5991+
value = Encode.forHtml(value);
59885992
// insert the project property into database
5989-
Object[] queryArgs = new Object[] {projectId, entry.getKey(),
5990-
entry.getValue(), operator, operator };
5993+
Object[] queryArgs = new Object[] {projectId, key,
5994+
value, operator, operator };
59915995
Helper.doDMLQuery(preparedStatement, queryArgs);
59925996

5993-
auditProjectInfo(conn, projectId, project, AUDIT_CREATE_TYPE, (Long) entry.getKey(),
5994-
(String) entry.getValue());
5997+
auditProjectInfo(conn, projectId, project, AUDIT_CREATE_TYPE, key, value);
59955998
}
59965999

59976000
} catch (SQLException e) {

src/web/WEB-INF/includes/contest/editTab.jsp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -804,19 +804,6 @@
804804
<div class="bottom_spec">
805805
</div>
806806

807-
<div class="hide">
808-
<p class="det_font">
809-
<span class="name"><strong>Environment </strong></span>
810-
<br />
811-
<span class="small_info_spec" id="rswEnvironment"></span>
812-
<br /><br/>
813-
<span class="name"><strong>Code repo </strong> </span>
814-
<br />
815-
<span class="small_info_spec" id="rswRepo"></span>
816-
</p>
817-
<div class="bottom_spec"></div>
818-
</div>
819-
820807
<p class="det_font">
821808
<span class="name"><strong>Final Deliverables</strong></span>
822809
<br />
@@ -883,12 +870,6 @@
883870

884871
</div>
885872
<!-- end .guidelines -->
886-
<div class="envRepo hide">
887-
<h3>Environment</h3>
888-
<input class="environmentEdit" name="environmentEdit" type="text" maxlength="500"/>
889-
<h3>Code Repo</h3>
890-
<input type="text" class="repoEdit" maxlength="500" />
891-
</div>
892873
</div> <!-- end .contestDetail -->
893874
<div class="deliverables">
894875
<h3><span class="icon">Final Deliverables:</span><a href="javascript:;" class="helpIcon"><span class="hide">Help</span></a></h3>

src/web/WEB-INF/includes/contest/editTabMarathon.jsp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@
530530
</div>
531531
</p>
532532
<div class="bottom_spec"></div>
533-
<div class="hide">
533+
<%--
534534
<p class="det_font">
535535
<span class="name"><strong>Environment </strong></span>
536536
<br />
@@ -541,7 +541,7 @@
541541
<span class="small_info_spec" id="rswRepo"></span>
542542
</p>
543543
<div class="bottom_spec"></div>
544-
</div>
544+
--%>
545545
</div><!-- End .detailsContent -->
546546
</div><!-- End .details -->
547547
<!-- END Spec Display -->
@@ -589,12 +589,14 @@
589589

590590
</div>
591591
<!-- end .guidelines -->
592-
<div class="envRepo hide">
592+
<%--
593+
<div class="envRepo">
593594
<h3>Environment</h3>
594595
<input class="environmentEdit" name="environmentEdit" type="text" maxlength="500"/>
595596
<h3>Code Repo</h3>
596597
<input type="text" class="repoEdit" maxlength="500" />
597598
</div>
599+
--%>
598600
</div> <!-- end .contestDetail -->
599601

600602
</div> <!-- End .launchContestOut -->

src/web/WEB-INF/includes/contest/editTabSoftware.jsp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@
840840
</div>
841841
</div>
842842
<!-- End .component -->
843-
<div class="hide">
843+
844844
<p class="det_font">
845845
<span class="name"><strong>Environment </strong></span>
846846
<br />
@@ -851,7 +851,7 @@
851851
<span class="small_info_spec" id="rswRepo"></span>
852852
</p>
853853
<div class="bottom_spec"></div>
854-
</div>
854+
855855
</div><!-- End .detailsContent -->
856856
</div><!-- End .details -->
857857
<!-- END Spec Display -->
@@ -957,12 +957,14 @@
957957
</div> <!-- end of prizesInner_tech -->
958958
</div>
959959
</s:if>
960-
<div class="envRepo hide">
960+
961+
<div class="envRepo">
961962
<h3>Environment</h3>
962963
<input class="environmentEdit" name="environmentEdit" type="text" maxlength="500"/>
963964
<h3>Code Repo</h3>
964965
<input type="text" class="repoEdit" maxlength="500" />
965966
</div>
967+
966968
</div> <!-- end .contestDetail -->
967969
</div> <!-- End .launchContestOut -->
968970

src/web/WEB-INF/includes/launch/overview.jsp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,7 @@
6868
</div>
6969
</div>
7070
<!-- end round 2 information -->
71-
<!-- Environment -->
72-
<div class="prizes hide">
73-
<h3>Environment :</h3>
74-
<input class="environmentEdit text" name="environmentEdit" type="text" maxlength="500"/>
75-
</div>
7671

77-
<!-- repo -->
78-
<div class="prizes hide">
79-
<h3>Code Repo :</h3>
80-
<input class="repoEdit text" name="repo" type="text" maxlength="500"/>
81-
</div>
8272
<!-- upload -->
8373
<div id="uploadSection">
8474

src/web/WEB-INF/includes/launch/overviewAlgorithm.jsp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,19 @@
4646
</div>
4747
</div>
4848
<!-- end Match Rules -->
49+
<%--
4950
<!-- Environment -->
50-
<div class="prizes hide">
51+
<div class="prizes">
5152
<h3>Environment :</h3>
5253
<input class="environmentEdit text" name="environmentEdit" type="text" maxlength="500"/>
5354
</div>
5455
5556
<!-- repo -->
56-
<div class="prizes hide">
57+
<div class="prizes">
5758
<h3>Code Repo :</h3>
5859
<input class="repoEdit text" name="repo" type="text" maxlength="500"/>
5960
</div>
61+
--%>
6062
<!-- upload -->
6163
<div id="alUploadSection">
6264
<h3>File Upload (20MB maximum):</h3>

src/web/WEB-INF/includes/launch/overviewSoftware.jsp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,13 @@
110110
</div> <!-- end of prizesInner_tech -->
111111
</div>
112112
<!-- Environment -->
113-
<div class="prizes hide">
113+
<div class="prizes">
114114
<h3>Environment :</h3>
115115
<input class="environmentEdit text" name="environmentEdit" type="text" maxlength="500"/>
116116
</div>
117117

118118
<!-- repo -->
119-
<div class="prizes hide">
119+
<div class="prizes">
120120
<h3>Code Repo :</h3>
121121
<input class="repoEdit text" name="repo" type="text" maxlength="500"/>
122122
</div>

src/web/WEB-INF/includes/launch/review.jsp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,6 @@
7979

8080
<dt class="rMultiInfo">Round Two Information :</dt>
8181
<dd class="rMultiInfo"><span id="rRound2Info"></span><a href="javascript: showPage('overviewPage');" class="tipLink"><img src="/images/edit-icon.png" alt="Edit"/></a> </dd>
82-
83-
<dt>Environment :</dt>
84-
<dd class="rEnvironment"><a href="javascript: backReview();" class="tipLink"><img src="/images/edit-icon.png" alt="Edit"/></a> </dd>
85-
86-
<dt>Code Repo :</dt>
87-
<dd class="rRepo"><a href="javascript: backReview();" class="tipLink"><img src="/images/edit-icon.png" alt="Edit"/></a> </dd>
8882
</dl>
8983
</div>
9084
<!-- end .contentList -->

src/web/WEB-INF/includes/launch/reviewAlgorithm.jsp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,13 @@
6262

6363
<dt>Match Rules :</dt>
6464
<dd><span id="ralMatchRules"></span><a href="javascript: showPage('overviewAlgorithmPage');" class="tipLink"><img src="/images/edit-icon.png" alt="Edit"/></a> </dd>
65-
65+
<%--
6666
<dt>Environment :</dt>
6767
<dd class="rEnvironment"><a href="javascript: backReview();" class="tipLink"><img src="/images/edit-icon.png" alt="Edit"/></a> </dd>
6868
6969
<dt>Code Repo :</dt>
7070
<dd class="rRepo"><a href="javascript: backReview();" class="tipLink"><img src="/images/edit-icon.png" alt="Edit"/></a> </dd>
71+
--%>
7172
</dl>
7273
</div>
7374
<!-- end .contentList -->

0 commit comments

Comments
 (0)