function tblid_load

2.x tripal_bulk_loader.module tblid_load($tblid_id)
3.x tripal_bulk_loader.module tblid_load($tblid_id)

Implements hook_load() for the menu system.

Ensures that a number is passed to the form. We use the letter o in our path instead of the number 0 because the drupal menu system has a bug that doesn't allow 0 as the only character in the path.

Related topics

File

tripal_bulk_loader/tripal_bulk_loader.module, line 256
Provides general functions for the tripal bulk loader.

Code

function tblid_load($tblid_id) {

  if (preg_match('/O/', $tblid_id)) {
    // This ensures that the number 0 is sent to the form as the correct arg
    return 0;
  }
  else {
    return $tblid_id;
  }
}