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