archiver_get_info

Versions
7
archiver_get_info()

Retrieve a list of all available archivers.

▾ 2 functions call archiver_get_info()

archiver_get_archiver in includes/common.inc
Create the appropriate archiver for the specified file.
update_manager_install_form in modules/update/update.manager.inc
Build the form for the update manager page to install new projects.

Code

includes/common.inc, line 6427

<?php
function archiver_get_info() {
  $archiver_info = &drupal_static(__FUNCTION__, array());

  if (empty($archiver_info)) {
    $cache = cache_get('archiver_info');
    if ($cache === FALSE) {
      // Rebuild the cache and save it.
      $archiver_info = module_invoke_all('archiver_info');
      drupal_alter('archiver_info', $archiver_info);
      uasort($archiver_info, 'drupal_sort_weight');
      cache_set('archiver_info', $archiver_info);
    }
    else {
      $archiver_info = $cache->data;
    }
  }

  return $archiver_info;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.