瀏覽代碼

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

pdontthink 16 年之前
父節點
當前提交
bfa610b4b3
共有 2 個文件被更改,包括 10 次插入0 次删除
  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);