It would be cleaner to have rrdtool_drupal_apis() build an array with a call to file_scan_directory. Perhaps when included each file should be verified to have the necessary hook definitions. The result should be stored in a static so that multiple calls to rrdtool_drupal_apis only requires one file scan. For example, there is an include file for the bootstrap, but it doesn't show up in the admin interface because it's not been added to the rrdtool_drupal_apis(), something we'd not have to do if we use a file scan.

...
  $includes = drupal_get_path('module', 'rrdtool_drupal') . '/includes';
  $apis = file_scan_directory($includes, '/.inc$/');
...

Comments

killes@www.drop.org’s picture

Assigned: Unassigned » killes@www.drop.org
Status: Active » Fixed

Status: Fixed » Closed (fixed)

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