Explorar o código

Don't load plugin pages if plugin is not enabled. Thanks to Niels Teusink for finding this.

pdontthink %!s(int64=16) %!d(string=hai) anos
pai
achega
bfa610b4b3
Modificáronse 2 ficheiros con 10 adicións e 0 borrados
  1. 5 0
      plugins/mail_fetch/fetch.php
  2. 5 0
      plugins/mail_fetch/options.php

+ 5 - 0
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 */

+ 5 - 0
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);