* $Author:: $ *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team *
- * For more information visit: http://www.mxchange.org *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team *
+ * For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
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;
- // Do we have entries?
+ // Are there entries?
if (is_array($keys_array) && ($value > 0)) {
// Is an array so we can run it through
foreach ($keys_array as $key) {
// 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
$result = SQL_QUERY_ESC("SELECT `media_value` FROM `{?_MYSQL_PREFIX?}_mediadata` WHERE `media_key`='%s' LIMIT 1",
array($key), __FUNCTION__, __LINE__);
- // Do we have one?
+ // Is there one?
if (SQL_NUMROWS($result) == 1) {
// Load data
list($value) = SQL_FETCHROW($result);
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]
?>