opennetadmin / ona

OpenNetAdmin IP Address Management (IPAM) system
opennetadmin.com
GNU General Public License v2.0
137 stars 35 forks source link

DCM php array output broken #57

Closed leth closed 10 years ago

leth commented 10 years ago

The response just contains "Array".

mattpascoe commented 10 years ago

You will need to provide much more detail than that.. how are you using it?

leth commented 10 years ago

Sorry, I thought it might be a more general feature. Specifically I meant this option: https://github.com/opennetadmin/ona/blob/master/www/modules/get_module_list.inc.php#L49

modules_perl is a string so it prints fine, modules_array gets printed as 'Array'.

mattpascoe commented 10 years ago

Ahh yes, the get_module_list is really more of an internal function. The perl and string output types are used by DCM for things like the --list function. It will gather up a list of all the modules stored in the dcm_module_list table.

the modules_array type will return a PHP array. It is used in various places like this:

  // Get a list of the valid "modules" and their descriptions.
  require_once($conf['dcm_module_dir'] . '/get_module_list.inc.php');
  list($status, $self['cache']['modules']) = get_module_list('type=array');
leth commented 10 years ago

Ah right; feel free to close this one!