Prevent endless recursive sent subfolder names - see: http://thread.gmane.org/gmane...
[squirrelmail.git] / plugins / administrator / setup.php
index 50d395c59384e1e7c2679e51f0744c4e92851fe7..2b6dbc597802906bdfb2af73d4bcdb024c3be4c5 100644 (file)
@@ -1,39 +1,45 @@
 <?php
 
 /**
- * setup.php
+ * Administrator plugin - Setup script
  *
- * Copyright (c) 1999-2003 The SquirrelMail Project Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
+ * Plugin allows remote administration.
  *
- *  Administrator plugin. Allows remote administration.  Philippe Mingo
- *
- * $Id$
+ * @author Philippe Mingo
+ * @copyright 1999-2012 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
  * @package plugins
  * @subpackage administrator
  */
 
-/** @ignore */
-require_once(SM_PATH . 'plugins/administrator/auth.php');
-
+/**
+ * Init the plugin
+ * @access private
+ */
 function squirrelmail_plugin_init_administrator() {
-    global $squirrelmail_plugin_hooks, $username;
+    global $squirrelmail_plugin_hooks;
 
-    if ( adm_check_user() ) {        
-        $squirrelmail_plugin_hooks['optpage_register_block']['administrator'] =
-                                  'squirrelmail_administrator_optpage_register_block';
-    }
+    $squirrelmail_plugin_hooks['optpage_register_block']['administrator'] =
+        'squirrelmail_administrator_optpage_register_block';
 }
 
+/**
+ * Register option block
+ * @access private
+ */
 function squirrelmail_administrator_optpage_register_block() {
-    global $optpage_blocks;
-    global $AllowSpamFilters;
+    /** add authentication functions */
+    include_once(SM_PATH . 'plugins/administrator/auth.php');
 
-    $optpage_blocks[] = array(
-        'name' => _("Administration"),
-        'url'  => '../plugins/administrator/options.php',
-        'desc' => _("This module allows administrators to manage SquirrelMail main configuration remotely."),
-        'js'   => false
-    );
+    if ( adm_check_user() ) {
+        global $optpage_blocks;
+
+        $optpage_blocks[] = array(
+            'name' => _("Administration"),
+            'url'  => SM_PATH . 'plugins/administrator/options.php',
+            'desc' => _("This module allows administrators to manage SquirrelMail main configuration remotely."),
+            'js'   => false
+            );
+    }
 }
-?>