xref: /plugin/siteexport/admin.php (revision 0571ece201b9e3bc14846f6c88d943a4f1512014)
1<?php
2if(!defined('DOKU_INC')) {
3    define('DOKU_INC',realpath(dirname(__FILE__).'/../../../').'/');
4}
5if(!defined('DOKU_PLUGIN')) {
6    define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
7}
8require_once(DOKU_PLUGIN.'admin.php');
9
10/**
11 * All DokuWiki plugins to extend the admin function
12 * need to inherit from this class
13 */
14class admin_plugin_siteexport extends DokuWiki_Admin_Plugin {
15
16    /**
17     * Constructor
18     */
19    function __construct() {
20        $this->setupLocale();
21    }
22
23    /**
24     * for backward compatability
25     * @see inc/DokuWiki_Plugin#getInfo()
26     */
27    function getInfo() {
28        if (method_exists(parent, 'getInfo')) {
29            $info = parent::getInfo();
30        }
31        return is_array($info) ? $info : confToHash(dirname(__FILE__) . '/plugin.info.txt');
32    }
33
34    /**
35     * return sort order for position in admin menu
36     */
37    function getMenuSort() {
38        return 100;
39    }
40
41    function forAdminOnly() {
42        return false;
43    }
44
45    /**
46     * handle user request
47     */
48    function handle() {
49    }
50
51    /**
52     * output appropriate html
53     */
54    function html() {
55
56        if (!$functions = & plugin_load('helper', 'siteexport')) {
57            msg("Can't initialize");
58            return false;
59        }
60
61        $functions->__siteexport_addpage();
62    }
63}
64//Setup VIM: ex: et ts=4 enc=utf-8 :
65