X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Ffunctions.php;h=60e7da54cba9d06801063315da892061956032f3;hb=b4c80165024acf8963971a72e5c3ca970b3e646d;hp=ada3d77a07fd812974e57ee25fbb13534c84a71b;hpb=5d89789720c77e954b2eba28c00ec710dd28900d;p=mailer.git diff --git a/inc/functions.php b/inc/functions.php index ada3d77a07..60e7da54cb 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -775,7 +775,7 @@ function createFancyTime ($stamp) { // Get data array with years/months/weeks/days/... $data = createTimeSelections($stamp, '', '', '', true); $ret = ''; - foreach($data as $k => $v) { + foreach ($data as $k => $v) { if ($v > 0) { // Value is greater than 0 "eval" data to return string $ret .= ', ' . $v . ' {--_' . strtoupper($k) . '--}'; @@ -1685,13 +1685,16 @@ function changeDataInFile ($FQFN, $comment, $prefix, $suffix, $DATA, $seek=0) { // An error was detected! return false; } + // Send notification to admin -function sendAdminNotification ($subject, $templateName, $content=array(), $userid = '0') { +function sendAdminNotification ($subject, $templateName, $content = array(), $userid = '0') { if ((isExtensionInstalledAndNewer('admins', '0.4.1')) && (function_exists('sendAdminsEmails'))) { // Send new way + /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'admins=Y,subject=' . $subject . ',templateName=' . $templateName); sendAdminsEmails($subject, $templateName, $content, $userid); } else { - // Send out out-dated way + // Send out-dated way + /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'admins=N,subject=' . $subject . ',templateName=' . $templateName); $message = loadEmailTemplate($templateName, $content, $userid); sendAdminEmails($subject, $message); } @@ -1705,7 +1708,7 @@ function logDebugMessage ($funcFile, $line, $message, $force=true) { $message = str_replace("\r", '', str_replace("\n", '', $message)); // Log this message away - appendLineToFile(getCachePath() . 'debug.log', generateDateTime(time(), '4') . '|' . getModule(false) . '|' . basename($funcFile) . '|' . $line . '|' . $message); + appendLineToFile(getPath() . getCachePath() . 'debug.log', generateDateTime(time(), '4') . '|' . getModule(false) . '|' . basename($funcFile) . '|' . $line . '|' . $message); } // END - if } @@ -1844,7 +1847,7 @@ function rebuildCache ($cache, $inc = '', $force = false) { // Include file given? if (!empty($inc)) { // Construct FQFN - $inc = sprintf("inc/loader/load_cache-%s.php", $inc); + $inc = sprintf("inc/loader/load-%s.php", $inc); // Is the include there? if (isIncludeReadable($inc)) {