moving administrator check to option block registration. reduces amount of
[squirrelmail.git] / plugins / administrator / setup.php
CommitLineData
abd7a3f8 1<?php
abd7a3f8 2/**
fb579f0b 3 * Administrator plugin - Setup script
abd7a3f8 4 *
fb579f0b 5 * Plugin allows remote administration.
abd7a3f8 6 *
0df03ce7 7 * @version $Id$
fb579f0b 8 * @author Philippe Mingo
6c84ba1e 9 * @copyright (c) 1999-2005 The SquirrelMail Project Team
fb579f0b 10 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
ea5f4b8e 11 * @package plugins
12 * @subpackage administrator
abd7a3f8 13 */
14
0df03ce7 15/**
16 * Init the plugin
17 * @access private
18 */
abd7a3f8 19function squirrelmail_plugin_init_administrator() {
ce68b76b 20 global $squirrelmail_plugin_hooks;
abd7a3f8 21
75e32d38 22 $squirrelmail_plugin_hooks['optpage_register_block']['administrator'] =
23 'squirrelmail_administrator_optpage_register_block';
abd7a3f8 24}
25
0df03ce7 26/**
27 * Register option block
28 * @access private
29 */
91e811f0 30function squirrelmail_administrator_optpage_register_block() {
75e32d38 31 /** add authentication functions */
32 include_once(SM_PATH . 'plugins/administrator/auth.php');
abd7a3f8 33
75e32d38 34 if ( adm_check_user() ) {
35 global $optpage_blocks;
36
37 $optpage_blocks[] = array(
38 'name' => _("Administration"),
39 'url' => SM_PATH . 'plugins/administrator/options.php',
40 'desc' => _("This module allows administrators to manage SquirrelMail main configuration remotely."),
41 'js' => false
42 );
43 }
abd7a3f8 44}
0df03ce7 45?>