Exemplo n.º 1
0
 /**
  * Export a list of checked favorites -- actually, we just save the ID list to
  * the session so that a separate link can subsequently be used to retrieve the
  * actual content.
  *
  * @return void
  * @access public
  */
 public function exportFavorites()
 {
     include_once 'services/Cart/Export.php';
     global $configArray;
     unset($_SESSION['no_store']);
     $_SESSION['exportIDS'] = $_POST['ids'];
     $_SESSION['exportFormat'] = $_POST['format'];
     $url = Export::getExportUrl();
     $html = '<p><a class="save" onclick="hideLightbox();" href="';
     if (strtolower($_POST['format']) == 'refworks') {
         $html .= $url . '" target="_blank">' . translate('export_refworks') . '</a></p>';
     } else {
         $html .= $url . '">' . translate('export_download') . '</a></p>';
     }
     return $this->output(array('result' => translate('Done'), 'result_additional' => $html), JSON::STATUS_OK);
 }