You are here

function emfield_include_list in Embedded Media Field 6.3

Same name and namespace in other branches
  1. 5 emfield.module \emfield_include_list()
  2. 6 emfield.module \emfield_include_list()
  3. 6.2 emfield.module \emfield_include_list()

Maintains a list of all loaded include files.

Parameters

$file: Optional; a file object (from emfield_system_list()) to be included.

$remove: Optional boolean; if TRUE, then remove the file from the list.

Return value

An array of all loaded includes (without the .inc extension).

1 call to emfield_include_list()
emfield_system_list in deprecated/emfield-deprecated.inc
Return an array of installed .inc files and/or loads them upon request. This routine is modeled after drupal_system_listing() (and also depends on it). It's major difference, however, is that it loads .inc files by default.

File

deprecated/emfield-deprecated.inc, line 550
Functionality to be deprecated from earlier versions of Embedded Media Field.

Code

function emfield_include_list($file = NULL, $remove = FALSE) {
  static $list = array();
  if ($file && $file->filename && !isset($list[$file->filename])) {
    include_once './' . $file->filename;
    $list[$file->filename] = $file->name;
  }
  if ($file && $remove) {
    unset($list[$file->filename]);
  }
  return $list;
}