glossary.js.php 526 B

123456789101112131415161718
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. require_once __DIR__.'/../inc/global.inc.php';
  4. $tpl = new Template();
  5. $templateName = 'glossary/glossary_auto.js.tpl';
  6. if (api_get_setting('show_glossary_in_documents') == 'ismanual') {
  7. $templateName = 'glossary/glossary_manual.js.tpl';
  8. }
  9. $addReady = isset($_GET['add_ready']) ? true : false;
  10. $tpl->assign('add_ready', $addReady);
  11. $contentTemplate = $tpl->get_template($templateName);
  12. header('Content-type: application/x-javascript');
  13. $tpl->display($contentTemplate);