Fix for Code

  1. class indexCallback {
  2.   public $function = NULL;
  3.   public $file = NULL;
  4.   public $module = NULL;
  5.  
  6.   function __construct($function, $file = NULL, $module = NULL) {
  7.     $this->function = $function;
  8.     $this->file = $file;
  9.     $this->module = $module;
  10.   }
  11.  
  12.   /**
  13.   * Execute a callback.
  14.   *
  15.   * @param ...
  16.   *   Additional arguments to pass on to the callback.
  17.   */
  18.   function execute() {
  19.     require_once('./'. drupal_get_path('module', $this->module) . '/' . $this->file);
  20.  
  21.     return call_user_func_array($this->function, func_get_args());
  22.   }
  23. }

Submit Fix

Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Select the syntax highlighting mode to use.