You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

30 lines
656 B

  1. <?php
  2. /**
  3. * DokuWiki AJAX call handler
  4. *
  5. * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
  6. * @author Andreas Gohr <andi@splitbrain.org>
  7. */
  8. use dokuwiki\Utf8\Clean;
  9. use dokuwiki\Ajax;
  10. if (!defined('DOKU_INC')) define('DOKU_INC', __DIR__ . '/../../');
  11. require_once(DOKU_INC . 'inc/init.php');
  12. //close session
  13. session_write_close();
  14. // default header, ajax call may overwrite it later
  15. header('Content-Type: text/html; charset=utf-8');
  16. //call the requested function
  17. global $INPUT;
  18. if ($INPUT->has('call')) {
  19. $call = $INPUT->filter([Clean::class, 'stripspecials'])->str('call');
  20. new Ajax($call);
  21. } else {
  22. http_status(404);
  23. }