From d9c537c4671d358f8dbf31f18ce5e8f8a694de53 Mon Sep 17 00:00:00 2001 From: pdontthink Date: Fri, 5 Dec 2008 09:46:53 +0000 Subject: [PATCH] Don't load plugin pages if plugin is not enabled. Thanks to Niels Teusink for finding this. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13354 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- plugins/mail_fetch/fetch.php | 5 +++++ plugins/mail_fetch/options.php | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/plugins/mail_fetch/fetch.php b/plugins/mail_fetch/fetch.php index d7085276..dbaf9740 100644 --- a/plugins/mail_fetch/fetch.php +++ b/plugins/mail_fetch/fetch.php @@ -20,6 +20,11 @@ require('../../include/init.php'); include_once(SM_PATH . 'functions/imap_general.php'); include_once(SM_PATH . 'plugins/mail_fetch/functions.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); /* end globals */ diff --git a/plugins/mail_fetch/options.php b/plugins/mail_fetch/options.php index 35eb094e..e74766f4 100644 --- a/plugins/mail_fetch/options.php +++ b/plugins/mail_fetch/options.php @@ -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); -- 2.25.1