X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fguest%2Faction-sponsor.php;h=1b7b18db342f387bab4c1d986e95d7a27eaf2e85;hb=a0c37ca650d27d0aed672ebf34e1be4601a2e0e9;hp=994c04959c95a03e978f82a4c7528fd43036d1a3;hpb=357b2ca133fc1f89db74097955c366cb4bee6996;p=mailer.git diff --git a/inc/modules/guest/action-sponsor.php b/inc/modules/guest/action-sponsor.php index 994c04959c..1b7b18db34 100644 --- a/inc/modules/guest/action-sponsor.php +++ b/inc/modules/guest/action-sponsor.php @@ -34,13 +34,19 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php"; require($INC); +} elseif ((!EXT_IS_ACTIVE("sponsor")) && (!IS_ADMIN())) { + ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "sponsor"); + return; +} elseif ($BLOCK_MODE) { + // Block mode detected + return; } // Add description as navigation point ADD_DESCR("guest", __FILE__); // Load the include file -$INC = sprintf("%sinc/modules/guest/what-%s.php", PATH, $GLOBALS['what']); +$INC = sprintf("%sinc/modules/guest/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what'])); if (FILE_READABLE($INC)) { // Ok, we finally load the guest action module include($INC);