The code in system_listing() for determining the module name has an operator
priority ambiguity, because it does something like:
a ? a : b ? b : c
This is hard to read, has uncertain outcome, and involves calling function a twice.
retrieving revision 1.138
diff -r1.138 system.module
67,268c269,273
< $info->name = module_invoke($file->name, "help", "admin/system/modules#name") ? module_invoke($file->name, "help", "admin/system/modules#name") : module_invoke($file->name, "system", "name") ? module_invoke($file->name, "system", "name") : $file->name;
< $info->description = module_invoke($file->name, "help", "admin/system/modules#description") ? module_invoke($file->name, "help", "admin/system/modules#description") : module_invoke($file->name, "system", "description");
---
> $hname = module_invoke($file->name, "help", "admin/system/modules#name");
> $sname = module_invoke($file->name, "system", "name");
> $info->name = $hname ? $hname : ($sname ? $sname : $file->name);
> $hdesc = module_invoke($file->name, "help", "admin/system/modules#description");
> $info->description = $hdesc ? $hdesc : module_invoke($file->name, "system", "description");
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | system_0.patch | 1.25 KB | jonbob |
Comments
Comment #1
mda-1 commentedI was the submitter of this bug. I guess there is no way to take ownership of an anonymous post after it has been submitted.
Comment #2
jonbob commentedThere's no reason to keep the legacy hook_system() handling around, is there?
Comment #3
dries commentedComment #4
(not verified) commented