]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/mediadata_functions.php
Theoretical working merge of mailid.php and mailid_top.php into mailid.php + a couple...
[mailer.git] / inc / libs / mediadata_functions.php
index 8f9d2203050a2109cfb2f3af8e430b646f4f3fef..55ff7d7fbb309e538a29116c072501129a6c0fd4 100644 (file)
@@ -44,7 +44,7 @@ if (!defined('__SECURITY')) {
 function updateMediadataEntry ($keys_array, $mode, $value) {
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'keys_array[]=' . gettype($keys_array) . ',mode=' . $mode . ',value=' . $value . ' - ENTERED!');
        // Default is nothing added/updated
-       $added = false;
+       $added = FALSE;
 
        // Are there entries?
        if (is_array($keys_array) && ($value > 0)) {
@@ -61,7 +61,7 @@ LIMIT 1", array($key), __FUNCTION__, __LINE__);
                        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'key=' . $key . ',SQL_NUMROWS()=' . SQL_NUMROWS($result_media));
                        if (SQL_NUMROWS($result_media) == 0) {
                                // Not found so we create it (mode will be ignored here!)
-                               SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_mediadata` (`media_key`,`media_value`) VALUES ('%s', '%s')",
+                               SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_mediadata` (`media_key`, `media_value`) VALUES ('%s', '%s')",
                                        array($key, $value), __FUNCTION__, __LINE__);
                        } else {
                                // Update entry
@@ -90,7 +90,7 @@ LIMIT 1", array($key), __FUNCTION__, __LINE__);
        // Zero entries are always added
        if ($value == 0) {
                // Is zero value, so we need to set $added here to avoid wrong false result
-               $added = true;
+               $added = TRUE;
        } // END - if
 
        // Return result
@@ -117,5 +117,33 @@ function getMediadataEntry ($key) {
        return $value;
 }
 
+// ----------------------------------------------------------------------------
+//                 Wrapper functions for configuration entries
+// ----------------------------------------------------------------------------
+
+// Getter for 'mt_start'
+function getMtStart () {
+       // Is the cache entry set?
+       if (!isset($GLOBALS[__FUNCTION__])) {
+               // No, so determine it
+               $GLOBALS[__FUNCTION__] = getConfig('mt_start');
+       } // END - if
+
+       // Return cached entry
+       return $GLOBALS[__FUNCTION__];
+}
+
+// Getter for 'mt_stage'
+function getMtStage () {
+       // Is the cache entry set?
+       if (!isset($GLOBALS[__FUNCTION__])) {
+               // No, so determine it
+               $GLOBALS[__FUNCTION__] = getConfig('mt_stage');
+       } // END - if
+
+       // Return cached entry
+       return $GLOBALS[__FUNCTION__];
+}
+
 // [EOF]
 ?>