Closed (duplicate)
Project:
Global Redirect
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
13 Feb 2009 at 19:56 UTC
Updated:
26 May 2010 at 22:35 UTC
This patch switches the radio buttons with checkboxes and replaces the global defines with TRUE and FALSE.
| Comment | File | Size | Author |
|---|---|---|---|
| bool.patch | 8.79 KB | robloach |
Comments
Comment #1
nicholasthompsonHey rob. Thanks for this.
Question... What does this achieve?
Globalredirect used to use static Boolean values but I switched to defines for 'readability'... Do people believe TRUE/FALSE is better for checkboxes (or all settings?)
Also, if this were committed would we need an update hook to sort out/clean up the settings?
I would test it or look it up myself but I'm in a pub right now ;-)
Comment #2
dave reidThis actually makes a lot of sense. We typically don't like to use defines for simple on/off settings, which most of these are. To core developers, I bet:
if ($alias && variable_get('globalredirect_case_sensitive_urls', 1)) {is easier to read than:
if ($alias && variable_get('globalredirect_case_sensitive_urls', GLOBALREDIRECT_CASE_SENSITIVE_URLS_ENABLED) == GLOBALREDIRECT_CASE_SENSITIVE_URLS_ENABLED) {Comment #3
nicholasthompsonFair point - I've gone off the define's too now ;)
I'm marking this as duplicate of a more recent post which has a more thorough refactoring patch in it... #803830: A bit of refactoring + mixed language redirects (only to keep the issue queue tidy)