Needs work
Project:
Switchtheme
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 May 2008 at 20:18 UTC
Updated:
4 Aug 2010 at 14:05 UTC
Jump to comment: Most recent file
Comments
Comment #1
sunI like this idea. However, your coding-style needs work, see http://drupal.org/coding-standards for further information.
Comment #2
clivesj commentedThanks Sun, can you point some more specific where I missed the standards?
Comment #3
sun- Insert a space after the comma to separate array values.
- Use 2 spaces instead of tabs.
- Else is always on the next line, same indent as If.
...if you already read the coding standards section in the handbooks, then read it again, please. All of this is clearly stated there. Either read, understand, and adapt Drupal's coding standards, or do not post patches. Thanks.
Other than that:
- $note is not initialized.
- We do not use dirty HTML hacks like the one in #suffix in Drupal.
- You accidently removed the form submit button in switchtheme_switch_form().
Comment #4
clivesj commentedThanks for the pointers,
I will re-do my homework and re-supply a patch
Comment #5
christefano commentedI've noticed on occasion that for anonymous visitors, Switchtheme somehow switched to a theme after the theme has been disabled. It's strange to see this as a feature request.
Comment #6
sun@christefano: This issue is a feature request. What you are reporting is a completely separate issue. Please open a new bug report for it. Thanks.
Comment #7
christefano commented@sun: I'm aware that this is a feature request and noted that in my comment. If you prefer that I just write "subscribing" instead please let me know. :)
Comment #8
sunAny updates?
Comment #9
clivesj commentedHere's a patch i'm using on my D5 site.
I will install and test the D6 version on my D6 site and provide the patch when ready.
regards
Comment #10
sunUhm - why not simply:
s/non-enabled/disabled/ ;)
I don't think this description is of any help...
Instead, we should store $attr->name as key and "@themename (disabled)" as value for $options here.
Beer-o-mania starts in 20 days! Don't drink and patch.
Comment #11
mikesir87 commentedIs this in the current version of the code? I am able to switch to the Garland theme, even when it is not enabled. I see this as being a problem, so would like to suggest creating a permission to allow someone to switch to a non-enabled theme. I don't want anonymous users to be able to switch to any theme they want.
Thoughts?