Link underlining in skins doesn't work

Bug #1429871 reported by Olli Puurunen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Unassigned
1.10
Fix Released
Medium
Unassigned
1.8
Fix Released
Medium
Unassigned
1.9
Fix Released
Medium
Unassigned
15.04
Fix Released
Medium
Unassigned
15.10
Fix Released
Medium
Unassigned

Bug Description

If the user edits a skin (Edit skin > Fonts and colours) and checks the Underline link -option, the link doesn't get underlined on a page with the skin applied. There seems to be a bug in skin/style.php#38 with the comparison

if ($option == 'transparent')

because when a checkbox is selected, the $option value is a boolean TRUE and when using PHP's loose comparison operator, (true == 'transparent') = true. Therefore for example $skin->viewskin['view_link_normal_underline'] (and a few others) value changes to an empty string and the value assigned to template is 'none' instead of 'underline'.

A simple fix is to use strict comparison:

if ($option === 'transparent')

---

Mahara version: 1.9.1
Browser: Chrome (Linux) 40.0.2214.115 (64-bit)

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Hi Olli,

Thanks for the bug report!

Cheers,
Aaron

tags: added: skins
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/4637

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/4637
Committed: http://gitorious.org/mahara/mahara/commit/d7e6485eaf62e2565559a7ee4ac93a5d642e6f52
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit d7e6485eaf62e2565559a7ee4ac93a5d642e6f52
Author: Robert Lyon <email address hidden>
Date: Thu Apr 16 10:54:23 2015 +1200

Allowing the skin underline setting to work (Bug #1429871)

Do correct string/variable comparison

Change-Id: I98c5c1360891699e439108789b2015d7587222ca
Signed-off-by: Robert Lyon <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "15.04_STABLE" branch: https://reviews.mahara.org/4639

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "1.10_STABLE" branch: https://reviews.mahara.org/4640

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "1.9_STABLE" branch: https://reviews.mahara.org/4641

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "1.8_STABLE" branch: https://reviews.mahara.org/4642

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/4640
Committed: http://gitorious.org/mahara/mahara/commit/cc0aa2732a16c8e8d4db55218cef32c5172b15c7
Submitter: Robert Lyon (<email address hidden>)
Branch: 1.10_STABLE

commit cc0aa2732a16c8e8d4db55218cef32c5172b15c7
Author: Robert Lyon <email address hidden>
Date: Thu Apr 16 10:54:23 2015 +1200

Allowing the skin underline setting to work (Bug #1429871)

Do correct string/variable comparison

Change-Id: I98c5c1360891699e439108789b2015d7587222ca
Signed-off-by: Robert Lyon <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/4641
Committed: http://gitorious.org/mahara/mahara/commit/973fb7cc779c44947bae18e01fb72393b8e9e16e
Submitter: Robert Lyon (<email address hidden>)
Branch: 1.9_STABLE

commit 973fb7cc779c44947bae18e01fb72393b8e9e16e
Author: Robert Lyon <email address hidden>
Date: Thu Apr 16 10:54:23 2015 +1200

Allowing the skin underline setting to work (Bug #1429871)

Do correct string/variable comparison

Change-Id: I98c5c1360891699e439108789b2015d7587222ca
Signed-off-by: Robert Lyon <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/4639
Committed: http://gitorious.org/mahara/mahara/commit/1d865310387190e6b59cae9dc6d08c129bf1492f
Submitter: Robert Lyon (<email address hidden>)
Branch: 15.04_STABLE

commit 1d865310387190e6b59cae9dc6d08c129bf1492f
Author: Robert Lyon <email address hidden>
Date: Thu Apr 16 10:54:23 2015 +1200

Allowing the skin underline setting to work (Bug #1429871)

Do correct string/variable comparison

Change-Id: I98c5c1360891699e439108789b2015d7587222ca
Signed-off-by: Robert Lyon <email address hidden>

Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
tags: added: no-behat-needed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.