From: pdontthink Date: Fri, 5 Dec 2008 09:46:53 +0000 (+0000) Subject: Don't load plugin pages if plugin is not enabled. Thanks to Niels Teusink for findin... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d9c537c4671d358f8dbf31f18ce5e8f8a694de53;p=squirrelmail.git 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 --- 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);