]> git.mxchange.org Git - mailer.git/blobdiff - inc/functions.php
Noisy debug line commented out
[mailer.git] / inc / functions.php
index d0494e19e1c3354fa1d15f088880aa86be1dddd5..f3320812ecbc8abdb59fc0427895e803065060e0 100644 (file)
@@ -767,7 +767,7 @@ function createFancyTime ($stamp) {
        foreach ($data as $k => $v) {
                if ($v > 0) {
                        // Value is greater than 0 "eval" data to return string
-                       $ret .= ', ' . $v . ' {--_' . strtoupper($k) . '--}';
+                       $ret .= ', ' . $v . ' {%pipe,translateTimeUnit=' . $k . '%}';
                        break;
                } // END - if
        } // END - foreach
@@ -778,7 +778,7 @@ function createFancyTime ($stamp) {
                $ret = substr($ret, 2);
        } else {
                // Zero seconds
-               $ret = '0 {--_SECONDS--}';
+               $ret = '0 {--TIME_UNIT_SECOND--}';
        }
 
        // Return fancy time string
@@ -801,7 +801,7 @@ function isEmailValid ($email) {
 }
 
 // Function taken from user comments on www.php.net / function isInStringIgnoreCase()
-function isUrlValid ($url, $compile=true) {
+function isUrlValid ($url, $compile = true) {
        // Trim URL a little
        $url = trim(urldecode($url));
        //* DEBUG: */ debugOutput($url);
@@ -1440,7 +1440,7 @@ function convertSelectionsToEpocheTime (array &$postData, array &$content, &$id,
        if (in_array($test, array('_ye', '_mo', '_we', '_da', '_ho', '_mi', '_se'))) {
                // Found a multi-selection for timings?
                $test = substr($id, 0, -3);
-               if ((isset($postData[$test.'_ye'])) && (isset($postData[$test.'_mo'])) && (isset($postData[$test.'_we'])) && (isset($postData[$test.'_da'])) && (isset($postData[$test.'_ho'])) && (isset($postData[$test.'_mi'])) && (isset($postData[$test.'_se'])) && ($test != $test2)) {
+               if ((isset($postData[$test . '_ye'])) && (isset($postData[$test . '_mo'])) && (isset($postData[$test . '_we'])) && (isset($postData[$test . '_da'])) && (isset($postData[$test . '_ho'])) && (isset($postData[$test . '_mi'])) && (isset($postData[$test . '_se'])) && ($test != $test2)) {
                        // Generate timestamp
                        $postData[$test] = createEpocheTimeFromSelections($test, $postData);
                        $content[] = sprintf("`%s`='%s'", $test, $postData[$test]);