1<?php 2if (strpos($call, 'plugin_') === 0) { 3 $name = explode('_', substr($call, 7), 3); 4 $fname = DOKU_INC."lib/plugins/{$name[0]}/ajax" . 5 (count($name) === 2 ? "/{$name[1]}" : "") . '.php'; 6 if (is_file($fname)) { 7 require $fname; 8 if (isset($AJAX_JSON)) { 9 $json = new JSON; 10 echo '(' . $json->encode($AJAX_JSON) . ')'; 11 } 12 exit; 13 } 14} 15 16//Setup VIM: ex: et ts=2 enc=utf-8 : 17