]> git.mxchange.org Git - mailer.git/blobdiff - inc/template-functions.php
Continued:
[mailer.git] / inc / template-functions.php
index d08805fa50f5e7938fa4758b4af32ad3a3adb03a..1cc687b0f606e33b07bd93d48cf2a9eeb5fbd99e 100644 (file)
@@ -238,7 +238,7 @@ function doFinalCompilation ($code, $insertComments = TRUE, $enableCodes = TRUE)
        // Compile all out
        while (((isInString('{--', $code)) || (isInString('{DQUOTE}', $code)) || (isInString('{?', $code)) || (isInString('{%', $code) !== FALSE)) && ($totalCompilations < 7)) {
                // Init common variables
-               $content = array();
+               $content = [];
                $newContent = '';
 
                // Compile it
@@ -293,7 +293,7 @@ function outputRawCode ($htmlCode) {
 }
 
 // Load a template file and return it's content (only it's name; do not use ' or ")
-function loadTemplate ($template, $return = FALSE, $content = array(), $compileCode = TRUE) {
+function loadTemplate ($template, $return = FALSE, $content = [], $compileCode = TRUE) {
        // @TODO Remove these sanity checks if all is fine
        if (!is_bool($return)) {
                // $return has to be boolean
@@ -477,7 +477,7 @@ function detectExtraTemplatePath ($prefix, $template) {
 }
 
 // Loads an email template and compiles it
-function loadEmailTemplate ($template, $content = array(), $userid = NULL, $loadUserData = TRUE) {
+function loadEmailTemplate ($template, $content = [], $userid = NULL, $loadUserData = TRUE) {
        // Make sure all template names are lowercase!
        $template = strtolower($template);
 
@@ -685,7 +685,7 @@ function compileRawCode ($code, $full = TRUE, $compileCode = TRUE) {
        // Are some matches found?
        if ((isFilledArray($matches)) && (isFilledArray($matches[0]))) {
                // Replace all matches
-               $matchesFound = array();
+               $matchesFound = [];
                foreach ($matches[0] as $key => $match) {
                        // Fuzzy look has failed by default
                        $fuzzyFound = FALSE;
@@ -2058,7 +2058,7 @@ function generateGenderSelectionBox ($selectedGender = '', $fieldName = 'gender'
 // Generates a selection box for given default value
 function generateTimeUnitSelectionBox ($defaultUnit, $fieldName, $unitArray) {
        // Init variables
-       $messageIds = array();
+       $messageIds = [];
 
        // Generate message id array
        foreach ($unitArray as $unit) {
@@ -2275,7 +2275,7 @@ function doTemplateGuestFooterExtras ($templateName, $clear) {
                // Name of used template
                'template' => $templateName,
                // Target array for gathered data
-               '__data'   => array(),
+               '__data'   => [],
                // Where the HTML output will go
                '__output' => '',
        );
@@ -2302,7 +2302,7 @@ function doTemplateMemberFooterExtras ($templateName, $clear) {
                // Name of used template
                'template' => $templateName,
                // Target array for gathered data
-               '__data'   => array(),
+               '__data'   => [],
                // Where the HTML output will go
                '__output' => '',
        );
@@ -2398,7 +2398,7 @@ function doTemplateDereferrerUrl ($templateName, $clear = FALSE, $url = NULL) {
 }
 
 // Load another template and return its content
-function doTemplateLoadTemplate ($templateName, $clear = FALSE, $theTemplate, $content = array()) {
+function doTemplateLoadTemplate ($templateName, $clear = FALSE, $theTemplate, $content = []) {
        // Load "the" template
        return loadTemplate($theTemplate, TRUE, $content);
 }