url namespacing
nbz - July 6, 2008 - 02:33
| Project: | Privatemsg |
| Version: | HEAD |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
The moduele currently uses the following urls:
messages/private
messages/private/inbox
messages/private/new
I think the "private" bit of the url should be dropped, because 1: I assume there will not be messages of a type other than private. 2: a smaller url is easier to remember. 3: (and this is the main reason) it just annoys me :P

#1
Just a further thought - I would go as far as removing the word "private" from the menu item and merge the inbox with that menu item. What else can it really show?
I would expect clicking on (private) Messages to take me to my messages.
Anyway, good work.
/Is a good at cheering others on with the work.
#2
I think i agree with you. i shall implement that.
#3
#4
And an actual patch that does this.
The menu item is still Private Messages, but the url no longer contains the "private/" bit. Functionality should not have changed one bit, which is as my tests show.
PS I can't see why we have two functions - one for privatemsg_list and privatemsg_list_inbox which do the same thing. I think the latter should be deleted and only the former used.
#5
Thanks nzb, i will have this patched asap when i get home.
as for function names, i'm going to change that soon.
special case handling are for inboxes and sent messages folder. i envision offering functionality to list messages by tags (replacing message folders with message tagging) and that is why i was experimenting with different names. but since inbox and sent messages are natively supported (can be considered folders or can be considered message status or format.. its still not a tag) i had to come up with a dedicated function to list them.
#6
Thanks for the patch: http://drupal.org/cvs?commit=129808
changed commited to HEAD
#7
I think I may have been working on an old version of the module as a couple of the changes are not intended:
line 33 from here: http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/privatemsg/...
'page callback' => 'privatemsg_list',is replaced with'page callback' => 'privatemsg_list_inbox',. This is not needed and the function privatemsg_list_inbox which was added in that commit (line 180 to 241 of that commit) can also be safely deleted.Sorry, no idea where they came from. (I was gonna post a patch to remove that function... no idea where I got it from. I thought it was stale code already in the module...)
(I would also question line 26 as a hello function is not really needed.)
#8
yeah i noticed it too. but lets deal with it in a dedicated issue since hte original purpose of this issue has been completed.
#9
Automatically closed -- issue fixed for two weeks with no activity.