X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Ftemplate-functions.php;h=0c10acd3396a0a8fbc565c25a3062d6dc93f2c4b;hb=9cb21d53382dd6d36b6792677cc98f36caeec634;hp=4a3b1cb7b085aced2675e4a9c20d6170157fb2d3;hpb=e4bb9dcc763483e7cc6a11d57cad79cf2425cc6d;p=mailer.git
diff --git a/inc/template-functions.php b/inc/template-functions.php
index 4a3b1cb7b0..0c10acd339 100644
--- a/inc/template-functions.php
+++ b/inc/template-functions.php
@@ -331,7 +331,7 @@ function loadTemplate ($template, $return = false, $content = array(), $compileC
(' . $template . ')
- {--TEMPLATE_CONTENT--}
+ {--TEMPLATE_CONTENT--}:
' . print_r($content, true) . '
';
} else {
@@ -455,8 +455,13 @@ function loadEmailTemplate ($template, $content = array(), $userid = '0', $loadU
// Merge data if valid
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "content()=".count($content)." - PRE
");
if ((isUserDataValid()) && ($loadUserData === true)) {
+ // It is valid
$content = merge_array($content, getUserDataArray());
+
+ // But we don't like hashed passwords be mailed
+ unset($content['password']);
} // END - if
+
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "content()=".count($content)." - AFTER
");
} // END - if
@@ -490,9 +495,9 @@ function loadEmailTemplate ($template, $content = array(), $userid = '0', $loadU
{--TEMPLATE_404--}: ' . $template . '
- {--TEMPLATE_CONTENT--}
+ {--TEMPLATE_CONTENT--}:
' . print_r($content, true) . '
- {--TEMPLATE_DATA--}
+ {--TEMPLATE_DATA--}:
' . print_r($DATA, true) . '
';
@@ -543,8 +548,8 @@ function getMenuCssClasses ($data) {
}
// Generate XHTML code for the CAPTCHA
-function generateCaptchaCode ($code, $type, $DATA, $userid) {
- return '';
+function generateCaptchaCode ($code, $type, $type, $userid) {
+ return '';
}
// Compiles the given HTML/mail code
@@ -818,6 +823,7 @@ function generateImageOrCode ($img_code, $headerSent = true) {
// Remove image from memory
imagedestroy($image);
}
+
// Create selection box or array of splitted timestamp
function createTimeSelections ($timestamp, $prefix = '', $display = '', $align = 'center', $return_array=false) {
// Do not continue if ONE_DAY is absend
@@ -1026,7 +1032,9 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align =
// Generate a list of administrative links to a given userid
function generateMemberAdminActionLinks ($userid) {
// Make sure userid is a number
- if ($userid != bigintval($userid)) debug_report_bug(__FUNCTION__, __LINE__, 'userid is not a number!');
+ if ($userid != bigintval($userid)) {
+ debug_report_bug(__FUNCTION__, __LINE__, 'userid is not a number!');
+ } // END - if
// Define all main targets
$targetArray = array('del_user', 'edit_user', 'lock_user', 'add_points', 'sub_points');
@@ -1231,7 +1239,9 @@ function handleCodeMessage () {
$ext = 'unknown';
// Is extension given?
- if (isGetRequestParameterSet('ext')) $ext = getRequestParameter('ext');
+ if (isGetRequestParameterSet('ext')) {
+ $ext = getRequestParameter('ext');
+ } // END - if
// Convert the 'code' parameter from URL to a human-readable message
$message = getMessageFromErrorCode(getRequestParameter('code'));
@@ -1341,7 +1351,7 @@ function linenumberCode ($code) {
if ($count_lines == 1) {
$r .= 1;
} else {
- $r .= ($line == ($count_lines - 1)) ? '' : ($line+1);
+ $r .= ($line == ($count_lines - 1)) ? '' : ($line+1);
}
$r .= '|';
@@ -1588,11 +1598,11 @@ function sendModeMails ($mod, $modes) {
}
// Load template
- loadTemplate('admin_settings_saved', false, $content['message']);
+ displayMessage($content['message']);
}
// Generates a 'selection box' from given array
-function generateSelectionBoxFromArray ($options, $name, $optionValue, $optionContent = '', $extraName = '') {
+function generateSelectionBoxFromArray (array $options, $name, $optionValue, $optionContent = '', $extraName = '') {
// Start the output
$OUT = '