A lot has been rewritten, ext-teams added, ext-forced continued:
[mailer.git] / inc / wrapper-functions.php
index 01a4fe9c346765d2b0a636df910e0d96283a5865..cf55c4e282b027f5046bc884212c9988bcbd10e2 100644 (file)
@@ -571,7 +571,7 @@ function isNicknameUsed ($userid) {
 // Getter for 'what' value
 function getWhat () {
        // Default is null
-       $what = null;
+       $what = NULL;
 
        // Is the value set?
        if (isWhatSet(true)) {
@@ -615,7 +615,7 @@ function isWhatSet ($strict =  false) {
 // Getter for 'action' value
 function getAction ($strict = true) {
        // Default is null
-       $action = null;
+       $action = NULL;
 
        // Is the value set?
        if (isActionSet(($strict) && (isHtmlOutputMode()))) {
@@ -650,7 +650,7 @@ function isActionSet ($strict =  false) {
 // Getter for 'module' value
 function getModule ($strict = true) {
        // Default is null
-       $module = null;
+       $module = NULL;
 
        // Is the value set?
        if (isModuleSet($strict)) {
@@ -688,7 +688,7 @@ function getScriptOutputMode () {
        // Do we have cache?
        if (!isset($GLOBALS[__FUNCTION__])) {
                // Default is null
-               $output_mode = null;
+               $output_mode = NULL;
 
                // Is the value set?
                if (isOutputModeSet(true)) {
@@ -962,7 +962,7 @@ function getUserData ($column) {
        } // END - if
 
        // Default is empty
-       $data = null;
+       $data = NULL;
 
        if (isset($GLOBALS['user_data'][getCurrentUserId()][$column])) {
                // Return the value
@@ -1297,7 +1297,7 @@ function getDateTimeFromRepository () {
 }
 
 // Getter for current year (default)
-function getYear ($timestamp = null) {
+function getYear ($timestamp = NULL) {
        // Is it cached?
        if (!isset($GLOBALS[__FUNCTION__][$timestamp])) {
                // null is time()
@@ -1314,7 +1314,7 @@ function getYear ($timestamp = null) {
 }
 
 // Getter for current month (default)
-function getMonth ($timestamp = null) {
+function getMonth ($timestamp = NULL) {
        // Is it cached?
        if (!isset($GLOBALS[__FUNCTION__][$timestamp])) {
                // If null is set, use time()
@@ -1332,7 +1332,7 @@ function getMonth ($timestamp = null) {
 }
 
 // Getter for current hour (default)
-function getHour ($timestamp = null) {
+function getHour ($timestamp = NULL) {
        // Is it cached?
        if (!isset($GLOBALS[__FUNCTION__][$timestamp])) {
                // null is time()
@@ -1349,7 +1349,7 @@ function getHour ($timestamp = null) {
 }
 
 // Getter for current day (default)
-function getDay ($timestamp = null) {
+function getDay ($timestamp = NULL) {
        // Is it cached?
        if (!isset($GLOBALS[__FUNCTION__][$timestamp])) {
                // null is time()
@@ -1366,7 +1366,7 @@ function getDay ($timestamp = null) {
 }
 
 // Getter for current week (default)
-function getWeek ($timestamp = null) {
+function getWeek ($timestamp = NULL) {
        // Is it cached?
        if (!isset($GLOBALS[__FUNCTION__][$timestamp])) {
                // null is time()
@@ -1381,7 +1381,7 @@ function getWeek ($timestamp = null) {
 }
 
 // Getter for current short_hour (default)
-function getShortHour ($timestamp = null) {
+function getShortHour ($timestamp = NULL) {
        // Is it cached?
        if (!isset($GLOBALS[__FUNCTION__][$timestamp])) {
                // null is time()
@@ -1396,7 +1396,7 @@ function getShortHour ($timestamp = null) {
 }
 
 // Getter for current long_hour (default)
-function getLongHour ($timestamp = null) {
+function getLongHour ($timestamp = NULL) {
        // Is it cached?
        if (!isset($GLOBALS[__FUNCTION__][$timestamp])) {
                // null is time()
@@ -1411,7 +1411,7 @@ function getLongHour ($timestamp = null) {
 }
 
 // Getter for current second (default)
-function getSecond ($timestamp = null) {
+function getSecond ($timestamp = NULL) {
        // Is it cached?
        if (!isset($GLOBALS[__FUNCTION__][$timestamp])) {
                // null is time()
@@ -1426,7 +1426,7 @@ function getSecond ($timestamp = null) {
 }
 
 // Getter for current minute (default)
-function getMinute ($timestamp = null) {
+function getMinute ($timestamp = NULL) {
        // Is it cached?
        if (!isset($GLOBALS[__FUNCTION__][$timestamp])) {
                // null is time()
@@ -2376,6 +2376,54 @@ function getUrlTlock () {
        return $GLOBALS[__FUNCTION__];
 }
 
+// Getter for 'check_double_email'
+function getCheckDoubleEmail () {
+       // Is the cache entry set?
+       if (!isset($GLOBALS[__FUNCTION__])) {
+               // No, so determine it
+               $GLOBALS[__FUNCTION__] = getConfig('check_double_email');
+       } // END - if
+
+       // Return cached entry
+       return $GLOBALS[__FUNCTION__];
+}
+
+// Checks wether 'check_double_email' is 'Y'
+function isCheckDoubleEmailEnabled () {
+       // Is the cache entry set?
+       if (!isset($GLOBALS[__FUNCTION__])) {
+               // No, so determine it
+               $GLOBALS[__FUNCTION__] = (getCheckDoubleEmail() == 'Y');
+       } // END - if
+
+       // Return cached entry
+       return $GLOBALS[__FUNCTION__];
+}
+
+// Getter for 'display_home_in_index'
+function getDisplayHomeInIndex () {
+       // Is the cache entry set?
+       if (!isset($GLOBALS[__FUNCTION__])) {
+               // No, so determine it
+               $GLOBALS[__FUNCTION__] = getConfig('display_home_in_index');
+       } // END - if
+
+       // Return cached entry
+       return $GLOBALS[__FUNCTION__];
+}
+
+// Checks wether 'display_home_in_index' is 'Y'
+function isDisplayHomeInIndexEnabled () {
+       // Is the cache entry set?
+       if (!isset($GLOBALS[__FUNCTION__])) {
+               // No, so determine it
+               $GLOBALS[__FUNCTION__] = (getDisplayHomeInIndex() == 'Y');
+       } // END - if
+
+       // Return cached entry
+       return $GLOBALS[__FUNCTION__];
+}
+
 // Checks wether proxy configuration is used
 function isProxyUsed () {
        // Do we have cache?
@@ -2541,7 +2589,7 @@ function createConfigurationTimeSelections ($configEntry, $stamps, $align = 'cen
        $configValue = getConfig($configEntry);
 
        // Call inner method
-       return createTimeSelections($configValue, $configEntry, $stamps, $align);
+       return createTimeSelections($configValue, $configEntry, $stamps, $align, true);
 }
 
 // Shortens converting of German comma to Computer's version in POST data
@@ -2608,33 +2656,5 @@ function getTotalUnconfirmedMails ($userid) {
        return $GLOBALS[__FUNCTION__][$userid];
 }
 
-//-----------------------------------------------------------------------------
-//                        Configuration wrapper
-//-----------------------------------------------------------------------------
-
-// Getter for 'check_double_email'
-function getCheckDoubleEmail () {
-       // Is the cache entry set?
-       if (!isset($GLOBALS[__FUNCTION__])) {
-               // No, so determine it
-               $GLOBALS[__FUNCTION__] = getConfig('check_double_email');
-       } // END - if
-
-       // Return cached entry
-       return $GLOBALS[__FUNCTION__];
-}
-
-// Checks wether 'check_double_email' is 'Y'
-function isCheckDoubleEmailEnabled () {
-       // Is the cache entry set?
-       if (!isset($GLOBALS[__FUNCTION__])) {
-               // No, so determine it
-               $GLOBALS[__FUNCTION__] = (getCheckDoubleEmail() == 'Y');
-       } // END - if
-
-       // Return cached entry
-       return $GLOBALS[__FUNCTION__];
-}
-
 // [EOF]
 ?>