1<?php 2// must be run within Dokuwiki 3if (!defined('DOKU_INC')) die(); 4 5class admin_plugin_tagging extends DokuWiki_Admin_Plugin { 6 7 private $hlp; 8 var $message; 9 10 function forAdminOnly() { return false; } 11 12 function handle() { 13 $this->hlp = plugin_load('helper', 'tagging'); 14 15 if ($_SERVER['REQUEST_METHOD'] === 'POST') { 16 if (checkSecurityToken()) { 17 if (isset($_POST['action']['rename'])) { 18 $this->message = $this->hlp->renameTag($_POST['action']['formerTagName'], $_POST['action']['newTagName']); 19 } 20 } 21 } 22 } 23 24 function html() { 25 global $ID; 26 $tags = $this->hlp->getAllTags(); 27 include dirname(__FILE__) . '/admin_tpl.php'; 28 } 29 30}