You are here

function __forena_load_repository in Forena Reports 7

Same name and namespace in other branches
  1. 6 forena.common.inc \__forena_load_repository()
1 call to __forena_load_repository()
forena_repository in ./forena.common.inc

File

./forena.common.inc, line 115
Common functions used throughout the project but loaded in this file to keep the module file lean.

Code

function __forena_load_repository(&$repo) {

  // First determine if the class file exisits
  $path = $repo['path'];
  $conf = array();
  if (file_exists($path . '/settings.php')) {

    // Override with repository specific data
    include $path . '/settings.php';
  }
  $repo = array_merge($conf, $repo);

  // $repo['user callback'] = $conf['user callback'];
  if (!isset($repos['data']) || !is_object($repo['data'])) {
    $repo['data'] = __forena_load_provider($repo, $repo['path']);
  }

  //$repo['auth'] = __forena_load_auth($security_provider);
}