Used EL code {%template,LoadTemplate=foo%} instead of loadTemplate('foo', TRUE);
[mailer.git] / inc / modules / sponsor.php
index eb7297555b39c6495b97b7217ed30b9f3ba8417d..17e5a57475f6953d1beefe768d542cc126b3c9b5 100644 (file)
@@ -16,8 +16,8 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
- * For more information visit: http://www.mxchange.org                  *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software. You can redistribute it and/or modify *
  * it under the terms of the GNU General Public License as published by *
@@ -36,9 +36,9 @@
 
 // Some security stuff...
 if (!defined('__SECURITY')) {
-       die();
+       exit();
 } elseif ((!isExtensionActive('sponsor'))) {
-       displayMessage(generateExtensionInactiveNotInstalledMessage('sponsor'));
+       displayMessage('{%pipe,generateExtensionInactiveNotInstalledMessage=sponsor%}');
        return;
 } elseif (!isSponsor()) {
        // No sponsor!
@@ -46,7 +46,7 @@ if (!defined('__SECURITY')) {
        return;
 } elseif ((!isWhatSet()) || (getWhat() == '')) {
        // Empty what value detected!
-       setWhat('welcome');
+       reportBug(__FUNCTION__, __LINE__, 'what is empty.');
 }
 
 // A valid sponsor login and we are allowed to enter this module so let's
@@ -59,17 +59,11 @@ $content['menu'] = addSponsorMenu(getWhat());
 // Generate right-side output
 $content['content'] = addSponsorContent(getWhat());
 
-// Load header template
-$content['header'] = loadTemplate('sponsor_header', true);
-
-// Load footer template
-$content['footer'] = loadTemplate('sponsor_footer', true);
-
 // 'You are here' navigation
-$content['you_are_here'] = addYouAreHereLink('sponsor', getWhat(), true);
+$content['you_are_here'] = addYouAreHereLink('sponsor', getWhat(), TRUE);
 
 // Load main sponsor template
-loadTemplate('sponsor_main', false, $content);
+loadTemplate('sponsor_main', FALSE, $content);
 
 // [EOF]
 ?>