You are here

function filefield_progress_implementation in FileField 6.3

Determine which upload progress implementation to use, if any available.

4 calls to filefield_progress_implementation()
filefield_progress in ./filefield.module
Menu callback for upload progress.
filefield_requirements in ./filefield.install
Implementation of hook_requirements().
filefield_widget_process in ./filefield_widget.inc
An element #process callback for the filefield_widget field type.
filefield_widget_settings_form in ./filefield_widget.inc
Implementation of CCK's hook_widget_settings($op == 'form').

File

./filefield.module, line 707
FileField: Defines a CCK file field type.

Code

function filefield_progress_implementation() {
  static $implementation;
  if (!isset($implementation)) {
    $implementation = FALSE;

    // We prefer the PECL extension uploadprogress because it supports multiple
    // simultaneous uploads. APC only supports one at a time.
    if (extension_loaded('uploadprogress')) {
      $implementation = 'uploadprogress';
    }
    elseif (extension_loaded('apc') && ini_get('apc.rfc1867')) {
      $implementation = 'apc';
    }
  }
  return $implementation;
}