Skip to content

Commit

Permalink
#218 convert "true"/"false" String to boolean values as intended, cod…
Browse files Browse the repository at this point in the history
…e review.
  • Loading branch information
Rita-C committed Jun 3, 2020
1 parent 11614bf commit 9f80bf9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class ExternalSiteController {
RateLimiter genbankRateLimiter = RateLimiter.create(3.0) // rate max requests per second (Double)

// by default do not sanitise EOL response
boolean sanitiseEol = grailsApplication.config.eol.sanitise ?: "false".toBoolean()
boolean sanitiseEol = grailsApplication.config.getProperty("eol.sanitise", Boolean, false)

def index() {}

Expand Down
2 changes: 1 addition & 1 deletion grails-app/views/species/_names.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
</td>
<td class="source">
<ul>
<g:if test="${grailsApplication.config.vernacularName.pull.showLanguage?:"false".toBoolean()}">
<g:if test="${grailsApplication.config.getProperty("vernacularName.pull.showLanguage", Boolean, false)}">
<li>
<bie:showLanguage lang="${language}"/>
</li>
Expand Down
2 changes: 1 addition & 1 deletion grails-app/views/species/show.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
<g:if test="${tc?.taxonConcept?.acceptedConceptName}">
<h2><g:link uri="/species/${tc.taxonConcept.acceptedConceptID}">${tc.taxonConcept.acceptedConceptName}</g:link></h2>
</g:if>
<g:if test="${grailsApplication.config.vernacularName.pull.showHeader?:"false".toBoolean() && tc.pullCommonNames}">
<g:if test="${grailsApplication.config.getProperty("vernacularName.pull.showHeader", Boolean, false) && tc.pullCommonNames}">
<g:each in="${tc.pullCommonNames}" var="cn" status="cni">
<g:if test="${cni % 2 == 0}"><g:if test="${cni != 0}"></div></g:if><div class="row"></g:if>
<div class="col-md-6"><h2><bie:markLanguage text="${cn.nameString}" lang="${cn.language}" mark="${grailsApplication.config.vernacularName.pull.showLanguage}" tag="${false}"/></h2></div>
Expand Down

2 comments on commit 9f80bf9

@charvolant
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me. I'm surprised that you can embed double quotes in double quotes in <g:if> I've never had the courage to do it.

@Rita-C
Copy link
Contributor Author

@Rita-C Rita-C commented on 9f80bf9 Jun 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, changed to single quotes for consistency.

Please sign in to comment.