1<?php 2/** 3 * Prolog plug-in : Rule-based System for Groupware. 4 * 5 * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) 6 * @author Paweł Kupka <pawel.kupka@gmail.com> 7 */ 8 9// must be run within Dokuwiki 10if (!defined('DOKU_INC')) die(); 11if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/'); 12require_once (DOKU_PLUGIN . 'action.php'); 13 14class action_plugin_prolog extends DokuWiki_Action_Plugin { 15 16 /** 17 * Returns the information about action prolog plug-in 18 */ 19 function getInfo() { 20 return array 21 ( 22 'author' => 'Paweł Kupka', 23 'email' => 'pawel.kupka@gmail.com', 24 'date' => '2008-05-02', 25 'name' => 'Action prolog plug-in', 26 'desc' => 'Rule-based System for Groupware.', 27 'url' => 'https://ai.ia.agh.edu.pl' 28 ); 29 } 30 31 /** 32 * Registers its procedures of event operations in the DokuWiki controller 33 * @param object $controller DokuWiki's event controller object. Also available as global $EVENT_HANDLER 34 */ 35 function register(&$controller) 36 { 37 $controller->register_hook('PARSER_CACHE_USE', 'BEFORE', $this, '_preventCache', array ()); 38 } 39 40 /** 41 * Prevents page caching 42 * @param mixed $param the parameters passed to register_hook when this handler was registered 43 * @param object $event event object by reference 44 */ 45 function _preventCache(&$event, $param) 46 { 47 $event->preventDefault(); 48 $event->stopPropagation(); 49 $event->result = false; 50 } 51}