Menu

Custom Modules

Help
2011-05-28
2012-12-15
  • Hugh Kelley

    Hugh Kelley - 2011-05-28

    I have made a custom module to do some DB lookups into another system (our asset register).   I modeled this on the IP Address lookup module and the code seems to be working as expected with only one issue.

    The issue is that the function is only called when that input is set to the "IP-Address" type.

    However, I just want the function's result treated as a Varchar.    Do I need to tweak the code somewhere?  I looked in the config files but couldn't find a place to toggle this.

    Hugh

     
  • Hugh Kelley

    Hugh Kelley - 2011-05-29

    Looks like the issue is in line 60 of includes/attr.inc.php.

    The IP Address class gets an instance of the module list before it calls:

    $_value = module_list::getInstance()->get_input_value( $this->db_object->get_label(), $item_processor);
    

    The "default" class (and most of the others) try to call it on the class itself:

    $_value = module_list::get_input_value( $this->db_object->get_label(), $item_processor);
    

    I'll file a bug report.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.