Closed (fixed)
Project:
Drupal core
Component:
node.module
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
14 Jun 2005 at 23:23 UTC
Updated:
7 Oct 2005 at 13:42 UTC
Jump to comment: Most recent file
Sometimes it comes handy to have the name of the module that defined a node type. I modified a bit node_list so this is possible.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | nodelistreverse_2.patch | 7.27 KB | chx |
| #4 | nodelistreverse_1.patch | 2.19 KB | chx |
| #2 | nodelistreverse_0.patch | 1.16 KB | chx |
| nodelistreverse.patch | 1.45 KB | chx |
Comments
Comment #1
chx commentedComment #2
chx commentedComment #3
moshe weitzman commentedperhaps you missed the already existing node_get_module_name() function?
Comment #4
chx commentedoh. I did. But then again, it artificially constrained the node types to modulename-number. I have not really known about this contraint, and see, it now serves as a good example of my patch.
Comment #5
killes@www.drop.org commented+1
removes more code than it adds.
Comment #6
chx commentedDries says
So, here we are.
Comment #7
dries commentedCommitted to HEAD. Change needs to be documented in the handbook.
Comment #8
asimmonds commentedThe revised implementation of node_get_module_name() of this patch has different output to the previous version.
With modules that have multiple content types (eg project), node_get_module_name() would return the content type name (eg project_project or project_issue). This patch returns just the module name (eg project), which probably should be the correct result.
Comment #9
chx commentedI documented the change in the handbook and no, node_get_module_name always returned the module name.
Comment #10
(not verified) commentedComment #11
(not verified) commentedComment #12
(not verified) commentedComment #13
(not verified) commented