Closed (fixed)
Project:
Drupal core
Component:
system.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
26 Nov 2005 at 22:59 UTC
Updated:
14 Dec 2005 at 11:20 UTC
Jump to comment: Most recent file
This patch does two things. First it fixes a bug introduced by the forms API that makes a theme show up on the user/x/edit form even if it is the only enabled theme. Second, it introduces a permission 'can choose theme'. A user cannot choose his or her own theme unless granted this permission. This is necessary as people are now creating multi themed sites using the sections module, and so forth. Many times I have two themes enabled for every site I run; one theme for production, and one for me to tinker with so that I can preview the site. I don't want my users to be able to choose my tinker theme as their default.
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | user_themes4.txt | 4.91 KB | robertdouglass |
| #15 | theme_bugfix.txt | 3.4 KB | robertdouglass |
| #6 | user_themes3.txt | 4.9 KB | robertdouglass |
| #1 | user_themes2.txt | 4.88 KB | robertdouglass |
| user_themes.txt | 3.84 KB | robertdouglass |
Comments
Comment #1
robertdouglass commentedFixed some code style and added updated help text to user module.
Comment #2
saerdna commentederrr i was about to follow up this but clumsy as i am sometimes i replied at my own. :-) I repost it here which it was supposed to.
i contributed with a simple fix yesterday ( http://drupal.org/node/38933 ) but this is better since it introduces a new access role.
+1
(would be cool if you could introduce a access role "allow username changes" too. I tried to look into it but im to new to drupal to make this proper)
Comment #3
saerdna commentedim working some more on this patch, i submit later today. girlfriend wants to go on a xmas market now :-)
Comment #4
robertdouglass commentedGlad you're working on it too. Make sure not to introduce too many issues in one patch, though. There are two already, which pushes the limit of acceptability. If you want to add other features or fix other problems, make sure to start new issues.
thanks!
-Robert
Comment #5
saerdna commentedhmm im unable to apply the patch, it worked yesterday. crazy.
anyway i think its better to check if theres more than 1 theme (if(count($themes) > 1)) before theme stuff are made, should save some performence and memory. Instead of doing the themestuff and then unset it. that was the only change i tried to make. think you can fix it?
Comment #6
robertdouglass commentedheh, I always end up doing patches right before bed. Bad idea. Here's one that checks in the right place.
Comment #7
saerdna commentedhmm what am i doing wrong? isnt patch -p1
Comment #8
Crell commentedNo, it's patch -p0. Applied fine for me.
Overall I like, although as an earlier commenter said it's generally better to split a patch like this into two, one a bugfix and one a feature.
Code looks clean enough, functionality all works. My only negative comment is that "can choose theme" doesn't seem like a good name. It's much less formal sounding than the rest of the permissions in the core modules. Perhaps "may select own theme"? It's a minor niggle either way, so I'm going to set this ready to commit.
Of course, it would be even better if we could get a longer description of permissions in there, but that's been sitting in queue for a while now.
</shameless plug>+1.
Comment #9
saerdna commentedgreat work!
+10 ;)
Comment #10
dries commented"can choose theme" sounds weird but I can't think of anything better though.
I wish this were two patches so that I could have fixed the bugfix.
Comment #11
Stefan Nagtegaal commentedHow about 'access theme selection' or 'access theme selection page'?
Comment #12
dries commentedI prefer the simplified version made by chx but I'm not 100% happy with the keys used in the links array.
blog_usernames_blog,comment_commentsorcomment_comments_new.Comment #13
Tobias Maier commentedor whats about
"change users' theme"
"user can select another theme"
"user can change (own?) theme"
Comment #14
Stefan Nagtegaal commentedDries, I think you picked the wrong tab while updating the issues..
this seems related to the "Override restructured _links patch".
Comment #15
robertdouglass commentedHere's a bugfix patch. I'm not creating another issue for it.
Comment #16
robertdouglass commentedHow about "select personal theme" for the permission? This patch contains both the bugfix and the new permission.
Comment #17
dries commentedCommitted to HEAD. Thanks.
Comment #18
(not verified) commented