Link underlining in skins doesn't work

Bug #1429871 reported by Olli Puurunen on 2015-03-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Medium
Unassigned
1.10
Medium
Unassigned
1.8
Medium
Unassigned
1.9
Medium
Unassigned
15.04
Medium
Unassigned
15.10
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)

Aaron Wells (u-aaronw) wrote :

Hi Olli,

Thanks for the bug report!

Cheers,
Aaron

tags: added: skins

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>

Mahara Bot (dev-mahara) wrote :

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

Mahara Bot (dev-mahara) wrote :

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

Mahara Bot (dev-mahara) wrote :

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

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>

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>

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) on 2015-04-17
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  Edit
Everyone can see this information.

Other bug subscribers