diff options
-rw-r--r-- | action.php | 10 | ||||
-rw-r--r-- | syntax.php | 6 |
2 files changed, 8 insertions, 8 deletions
@@ -12,7 +12,7 @@ require_once DOKU_PLUGIN.'action.php'; * * like search_namespaces but with limited depth to 1 */ -function search_namespaces1(&$data,$base,$file,$type,$lvl,$opts){ +function treenav_search_namespaces(&$data,$base,$file,$type,$lvl,$opts){ $opts['listdirs'] = true; $opts['depth'] = 1; return search_universal($data,$base,$file,$type,$lvl,$opts); @@ -21,7 +21,7 @@ function search_namespaces1(&$data,$base,$file,$type,$lvl,$opts){ /** * Helper class to list Pages and Namespaces */ -class NamespaceNode { +class treenav_NamespaceNode { public $name; public $level; public function __construct($name, $level) { @@ -40,9 +40,9 @@ class NamespaceNode { global $conf; $data = array(); $childs = array(); - search($data,$conf['datadir'], 'search_namespaces1', array(), str_replace(':', '/', $this->name)); + search($data,$conf['datadir'], 'treenav_search_namespaces', array(), str_replace(':', '/', $this->name)); foreach ($data as $ns) { - $childs[] = new NamespaceNode($ns['id'], $this->level+1); + $childs[] = new treenav_NamespaceNode($ns['id'], $this->level+1); } return $childs; } @@ -71,7 +71,7 @@ class action_plugin_treenav extends DokuWiki_Action_Plugin { $doc = $cache->retrieveCache(false); } else { $deps = array('files' => array()); - $root = new NamespaceNode('',0); + $root = new treenav_NamespaceNode('',0); $renderer =& p_get_renderer('xhtml'); $renderer->listu_open(); @@ -8,13 +8,13 @@ if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); require_once DOKU_PLUGIN.'syntax.php'; class syntax_plugin_treenav extends DokuWiki_Syntax_Plugin { - private $keys = array('icon', 'title'); + var $_keys = array('icon', 'title'); function getType() { return 'baseonly'; } function getSort() { return 32; } function connectTo($mode) { - foreach ($this->keys as $key) { + foreach ($this->_keys as $key) { $this->Lexer->addSpecialPattern('~~'.$key.':.*?~~',$mode,'plugin_treenav'); } } @@ -24,7 +24,7 @@ class syntax_plugin_treenav extends DokuWiki_Syntax_Plugin { case DOKU_LEXER_SPECIAL: $match = substr($match, 2, -2); @list($key, $value) = explode(':', $match, 2); - if (in_array($key, $this->keys)) { + if (in_array($key, $this->_keys)) { return array($key, $value); } } |