]> git.mxchange.org Git - mailer.git/blobdiff - inc/template-functions.php
Removed
[mailer.git] / inc / template-functions.php
index 4f4381e424b0614d297a0819a6a5714bb8d76caa..eeba4db76cad0d6327f1c39de93eae5f23938e0b 100644 (file)
@@ -218,7 +218,7 @@ function doFinalCompilation ($code, $insertComments = true, $enableCodes = true)
        $count = 0;
 
        // Compile all out
-       while (((strpos($code, '{--') !== false) || (strpos($code, '{DQUOTE}') !== false) || (strpos($code, '{?') !== false) || (strpos($code, '{%') !== false)) && ($count < 5)) {
+       while (((strpos($code, '{--') !== false) || (strpos($code, '{DQUOTE}') !== false) || (strpos($code, '{?') !== false) || (strpos($code, '{%') !== false)) && ($count < 7)) {
                // Init common variables
                $content = array();
                $newContent = '';
@@ -443,12 +443,15 @@ function loadEmailTemplate ($template, $content = array(), $userid = '0', $loadU
        if ((isValidUserId($userid)) && (is_array($content))) {
                // If nickname extension is installed, fetch nickname as well
                if ((isExtensionActive('nickname')) && (isNicknameUsed($userid))) {
-                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "NICKNAME!<br />");
                        // Load by nickname
+                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "NICKNAME!<br />");
                        fetchUserData($userid, 'nickname');
+               } elseif (isNicknameUsed($userid)) {
+                       // Non-number characters entered but no ext-nickname found
+                       debug_report_bug(__FUNCTION__, __LINE__, 'userid=' . $userid . ': is no id number and ext-nickname is gone.');
                } else {
-                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "NO-NICK!<br />");
                        // Load by userid
+                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "NO-NICK!<br />");
                        fetchUserData($userid);
                }
 
@@ -1072,6 +1075,12 @@ function generateMemberAdminActionLinks ($userid) {
                $OUT .= '--}</a></span>|';
        } // END - foreach
 
+       // Add special link, in case of the account is unconfirmed
+       if ($status == 'UNCONFIRMED') {
+               // Add it
+               $OUT .= '<span class="admin_user_link"><a target="_blank" title="{--ADMIN_USER_ACTION_LINK_CONFIRM_ACCOUNT_TITLE--}" href="{%url=confirm.php?hash=' . getFetchedUserData('userid', $userid, 'user_hash') . '%}">{--ADMIN_USER_ACTION_LINK_CONFIRM_ACCOUNT--}</a></span>|';
+       } // END - if
+
        // Finish navigation link
        $OUT = substr($OUT, 0, -1) . ']';
 
@@ -1580,9 +1589,9 @@ function sendModeMails ($mod, $modes) {
        }
 
        // Send email to user if required
-       if ((!empty($sub_mem)) && (!empty($message)) && (!empty($content['email']))) {
+       if ((!empty($sub_mem)) && (!empty($message)) && (!empty($content['userid']))) {
                // Send member mail
-               sendEmail($content['email'], $sub_mem, $message);
+               sendEmail($content['userid'], $sub_mem, $message);
        } // END - if
 
        // Send only if no other error has occured
@@ -1602,7 +1611,7 @@ function sendModeMails ($mod, $modes) {
 }
 
 // Generates a 'selection box' from given array
-function generateSelectionBoxFromArray (array $options, $name, $optionValue, $optionContent = '', $extraName = '') {
+function generateSelectionBoxFromArray ($options, $name, $optionValue, $optionContent = '', $extraName = '') {
        // Start the output
        $OUT = '<select name="' . $name . '" size="1" class="form_select">
 <option value="X" disabled="disabled">{--PLEASE_SELECT--}</option>';