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

nbz - July 6, 2008 - 02:42

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

litwol - July 6, 2008 - 07:16

I think i agree with you. i shall implement that.

#3

litwol - July 6, 2008 - 07:26
Category:support request» task
Assigned to:Anonymous» litwol
Status:active» patch (code needs work)

#4

nbz - July 21, 2008 - 20:25
Status:patch (code needs work)» patch (code needs review)

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.

AttachmentSize
namespace.patch6.36 KB

#5

litwol - July 21, 2008 - 20:30
Priority:minor» critical

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

litwol - July 25, 2008 - 17:59
Version:6.x-1.x-dev» HEAD
Priority:critical» normal
Assigned to:litwol» Anonymous
Status:patch (code needs review)» fixed

Thanks for the patch: http://drupal.org/cvs?commit=129808

changed commited to HEAD

#7

nbz - July 25, 2008 - 18:09
Status:fixed» patch (code needs work)

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

litwol - July 25, 2008 - 19:36
Status:patch (code needs work)» fixed

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

Anonymous (not verified) - August 8, 2008 - 19:42
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.