return $GLOBALS[__FUNCTION__][$yn];
}
-// Translates the "pool type" into human-readable
-function translatePoolType ($type) {
- // Return "translation"
- return sprintf("{--POOL_TYPE_%s--}", $type);
-}
-
// Translates the american decimal dot into a german comma
function translateComma ($dotted, $cut = true, $max = '0') {
// First, cast all to double, due to PHP changes
//
-// Deprecated : $length
+// Deprecated : $length (still has one reference in this function)
// Optional : $DATA
//
function generateRandomCode ($length, $code, $userid, $DATA = '') {
// Initializes the cache instance
function initCacheInstance () {
+ // Check for double-initialization
+ if (isset($GLOBALS['cache_instance'])) {
+ // This should not happen and must be fixed
+ debug_report_bug(__FUNCTION__, __LINE__, 'Double initialization of cache system detected. cache_instance[]=' . gettype($GLOBALS['cache_instance']));
+ } // END - if
+
// Load include for CacheSystem class
loadIncludeOnce('inc/classes/cachesystem.class.php');
// Initialize cache system only when it's needed
$GLOBALS['cache_instance'] = new CacheSystem();
+
+ // Did it work?
if ($GLOBALS['cache_instance']->getStatus() != 'done') {
// Failed to initialize cache sustem
addFatalMessage(__FUNCTION__, __LINE__, '(<font color="#0000aa">' . __LINE__ . '</font>): {--CACHE_CANNOT_INITIALIZE--}');