]> git.mxchange.org Git - mailer.git/commitdiff
Rewrite for eval() command
authorRoland Häder <roland@mxchange.org>
Sun, 6 Jun 2010 17:42:26 +0000 (17:42 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 6 Jun 2010 17:42:26 +0000 (17:42 +0000)
inc/functions.php

index 305ee3f8aa02f6b18964bd1878aa3fb6aac2c7cb..254a29a17ef88d789297edfd803751925360f30c 100644 (file)
@@ -324,9 +324,6 @@ function loadTemplate ($template, $return = false, $content = array()) {
 
                        // Cache the eval() command here
                        $GLOBALS['template_eval'][$template] = $eval;
 
                        // Cache the eval() command here
                        $GLOBALS['template_eval'][$template] = $eval;
-
-                       // Eval the code
-                       eval($GLOBALS['template_eval'][$template]);
                } elseif ((isAdmin()) || ((isInstalling()) && (!isInstalled()))) {
                        // Only admins shall see this warning or when installation mode is active
                        $ret = '<br /><span class="guest_failed">{--TEMPLATE_404--}</span><br />
                } elseif ((isAdmin()) || ((isInstalling()) && (!isInstalled()))) {
                        // Only admins shall see this warning or when installation mode is active
                        $ret = '<br /><span class="guest_failed">{--TEMPLATE_404--}</span><br />
@@ -341,10 +338,13 @@ function loadTemplate ($template, $return = false, $content = array()) {
                        // No file!
                        $GLOBALS['template_eval'][$template] = '404';
                }
                        // No file!
                        $GLOBALS['template_eval'][$template] = '404';
                }
-       } else {
+       }
+
+       // Code set?
+       if ((isset($GLOBALS['template_eval'][$template])) && ($GLOBALS['template_eval'][$template] != '404')) {
                // Eval the code
                eval($GLOBALS['template_eval'][$template]);
                // Eval the code
                eval($GLOBALS['template_eval'][$template]);
-       }
+       } // END - if
 
        // Do we have some content to output or return?
        if (!empty($ret)) {
 
        // Do we have some content to output or return?
        if (!empty($ret)) {