You are here

function _install_selected_from_zip in Bibliography Module 6.2

Same name and namespace in other branches
  1. 7 modules/CiteProc/biblio_citeproc.admin.inc \_install_selected_from_zip()
1 call to _install_selected_from_zip()
biblio_citeproc_style_manager_form_submit in modules/CiteProc/biblio_citeproc.admin.inc

File

modules/CiteProc/biblio_citeproc.admin.inc, line 426

Code

function _install_selected_from_zip($filename = '', $ids = array()) {
  $za = new ZipArchive();
  if ($za
    ->open($filename) == TRUE) {
    foreach ($ids as $id) {
      $name = $za
        ->getNameIndex($id);
      $name = basename($name);
      if (strstr($name, '.csl')) {
        $csl = $za
          ->getFromIndex($id);
        _install_csl($name, $csl);
      }
    }
    $za
      ->close();
  }
}