"-= M.J. Prinsen =-" <various@bovendelft.xs4all.nl>
[squirrelmail.git] / plugins / administrator / setup.php
index 3331da2..45b0c87 100644 (file)
  * $Id$
  */
 
+require_once('../plugins/administrator/auth.php');
+
 function squirrelmail_plugin_init_administrator() {
     global $squirrelmail_plugin_hooks, $username;
 
-    if ( $adm_id = fileowner('../config/config.php') ) {
-        $adm = posix_getpwuid( $adm_id );
-        if ( $username == $adm['name'] ) {
-            $squirrelmail_plugin_hooks['optpage_register_block']['administrator'] =
-                                      'squirrelmail_administrator_optpage_register_block';
-        }
+    if ( adm_check_user() ) {        
+        $squirrelmail_plugin_hooks['optpage_register_block']['administrator'] =
+                                  'squirrelmail_administrator_optpage_register_block';
     }
 }
 
@@ -30,7 +29,7 @@ function squirrelmail_administrator_optpage_register_block() {
     $optpage_blocks[] = array(
         'name' => _("Administration"),
         'url'  => '../plugins/administrator/options.php',
-        'desc' => _("This module allows administrators to run SquirrelMail configuration remotely."),
+        'desc' => _("This module allows administrators to manage SquirrelMail main configuration remotely."),
         'js'   => false
     );
 }