Don't load plugin pages if plugin is not enabled. Thanks to Niels Teusink for findin...
[squirrelmail.git] / plugins / mail_fetch / options.php
index 35eb094e0e6e6ad7b8cc5e185a2fd138145f80fa..e74766f4cb119ee1d9d9f3f111e9da48d24de13e 100644 (file)
@@ -20,6 +20,11 @@ include_once(SM_PATH . 'plugins/mail_fetch/functions.php' );
 include_once(SM_PATH . 'functions/imap_general.php');
 include_once(SM_PATH . 'functions/forms.php');
 
+// don't load this page if this plugin is not enabled
+//
+global $plugins;
+if (!in_array('mail_fetch', $plugins)) exit;
+
 /* globals */
 sqgetGlobalVar('delimiter',  $delimiter,  SQ_SESSION);