I just got a déjà vu.
I would swear that this module has been working... but recently it wasn't, and checking the code I've found that the following check is wrong!
if ($arg[0] == 'admin' && $arg[1] == 'content' && $arg[2] == 'node-type' && !empty($arg[3])) {
The third argument in the path has always been 'types' (not 'node-type'), so I don't understand how is it possible that the module has been working.
The check for $arg[2] should look like this:
if ($arg[0] == 'admin' && $arg[1] == 'content' && $arg[2] == 'types' && !empty($arg[3])) {
Is it me that I've been dreaming? ...anyway, I'll commit this fix, but wait a few days to see if there's some feedback.
Comments
Comment #1
markus_petrux commentedAhah! I got it. It is the admin_menu that changes the content type paths... for a reason I don't quite get, yet.
Here's the code in admin_menu_menu_alter() that does this change:
So the correct check for $arg[2] would have to look like this:
Let's accept the fact that admin_menu needs to perform this change. I'm wondering this does not generate other conflicts somewhere else.
Committed to CVS.