dokuwiki-source-plugin

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 4  →  ?path2? @ 3
File deleted
/manager.dat
/action.php
@@ -5,9 +5,10 @@
* Action plugin component, for cache validity determination
*
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
* @author Christopher Smith <chris@jalakai.co.uk>
* @author Wizardry and Steamworks office@grimore.org
* original: Christopher Smith <chris@jalakai.co.uk>
*/
if(!defined('DOKU_INC')) die(); // no DokuWiki, no go
if(!defined('DOKU_INC')) die(); // no Dokuwiki, no go
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
require_once(DOKU_PLUGIN.'action.php');
@@ -23,17 +24,17 @@
*/
function getInfo(){
return array(
'author' => 'Christopher Smith',
'email' => 'chris@jalakai.co.uk',
'date' => '2008-08-13',
'author' => 'Wizardry and Steamworks',
'email' => 'office@grimore.org',
'date' => '2016-11-19',
'name' => 'Source Plugin',
'desc' => 'Include a remote source file',
'url' => 'http://www.dokuwiki.org/plugin:source',
'url' => 'http://grimore.org/dokuwiki/plugins/source',
);
}
/**
* plugin should use this method to register its handlers with the DokuWiki's event controller
* plugin should use this method to register its handlers with the dokuwiki's event controller
*/
function register(Doku_Event_Handler $controller) {
$controller->register_hook('PARSER_CACHE_USE','BEFORE', $this, '_cache_prepare');
@@ -98,5 +99,4 @@
}
//Setup VIM: ex: et ts=4 enc=utf-8 :
 
//Setup VIM: ex: et ts=4 enc=utf-8 :
/syntax.php
@@ -22,7 +22,8 @@
* - this plugin's location, allow & deny settings.
*
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
* @author Christopher Smith <chris@jalakai.co.uk>
* @author Wizardry and Steamworks office@grimore.org
* original: Christopher Smith <chris@jalakai.co.uk>
*/
if(!defined('DOKU_INC')) die(); // no Dokuwiki, no go
@@ -84,7 +85,7 @@
list($attr, $title) = preg_split('/\|/u', $match, 2); //split out title
$attr = trim($attr);
$pattern = ($attr[0] == '"' || $attr[0] == "'") ? $attr[0] : '\s';
$pattern = ($attr{0} == '"' || $attr{0} == "'") ? $attr{0} : '\s';
list($file, $prop) = preg_split("/$pattern/u", $attr, 3, PREG_SPLIT_NO_EMPTY);
if (isset($prop) && trim($prop)) {
@@ -131,7 +132,7 @@
$title = ($title) ? "<span>".hsc($title)."</span>"
: $this->_makeTitle($file, $start, $end);
$renderer->doc .= "<div class='source'><p>$title</p>";
$renderer->doc .= "<div class='source'><p class='title'>$title</p>";
$renderer->code($source, $lang);
$renderer->doc .= "</div>";
} else {
@@ -222,7 +223,7 @@
$rules = explode("\n",$rules);
foreach ($rules as $rule) {
$rule = trim($rule);
if (!$rule || $rule[0] == ';') continue;
if (!$rule || $rule{0} == ';') continue;
$match = array();
if (!preg_match('/^(allow|deny)\s+(.+)$/i',$rule,$match)) continue;