var $fqfn = '';
// Resource to cache file
- var $pointer = false;
+ var $pointer = FALSE;
// Data array from cache
var $data = array();
// Filter
$GLOBALS['cache_array']['filter']['chains'][$data['filter_name']][$data['filter_function']] = $data['filter_active'];
$GLOBALS['cache_array']['filter']['counter'][$data['filter_name']][$data['filter_function']] = $data['filter_counter'];
- $GLOBALS['cache_array']['filter']['loaded'][$data['filter_name']][$data['filter_function']] = true;
+ $GLOBALS['cache_array']['filter']['loaded'][$data['filter_name']][$data['filter_function']] = TRUE;
} elseif ($this->name == 'modules') {
// Modules
$GLOBALS['cache_array']['modules'][$k][$data['module']] = $v;
$this->finalize();
// Remove cache
- $this->removeCacheFile(true);
+ $this->removeCacheFile(TRUE);
// Unsupported/unhandled cache detected
- reportBug(__METHOD__, __LINE__, 'Unsupported cache ' . $this->name . ' detected, data=' . print_r($data, true) . ',k=' . $k . ',v=' . $v);
+ reportBug(__METHOD__, __LINE__, 'Unsupported cache ' . $this->name . ' detected, data=' . print_r($data, TRUE) . ',k=' . $k . ',v=' . $v);
}
// Write cache line to file
// Remove pointer and status
unset($this->status[$this->name]);
- $this->pointer = false;
+ $this->pointer = FALSE;
//* DEBUG: */ logDebugMessage(__METHOD__, __LINE__, 'name=' . $this->name . ' - FINALIZED!');
} // END - if
}
}
// Destroy an existing cache file
- function removeCacheFile ($force = false) {
+ function removeCacheFile ($force = FALSE) {
// Reset read status
$this->resetCacheReadStatus();
// Is the cache file not yet rebuilt?
if ((!isset($this->rebuilt[$this->name])) && ($this->isCacheReadable())) {
// Only run in regular output mode
- if ((!isHtmlOutputMode()) && ($force === false)) {
+ if ((!isHtmlOutputMode()) && ($force === FALSE)) {
// Debug message if allowed
if (isDebugModeEnabled()) {
// Debug message
// The cache does no longer exist so kill the content
unset($this->data[$this->name]);
unset($this->version[$this->name]);
- $this->rebuilt[$this->name] = true;
+ $this->rebuilt[$this->name] = TRUE;
} else {
// Not removed!
reportBug(__METHOD__, __LINE__, '{%message,CACHE_CANNOT_UNLINK=' . $this->name . '%}');
if ((is_array($dummy)) && (isset($dummy[$search])) && (is_array($dummy[$search]))) {
// Search for key in array
$key_found = array_key_exists($search_key, $dummy[$search]);
- if ($key_found == true) {
+ if ($key_found == TRUE) {
$key = $search_key;
// Key (hopefully) found?
foreach ($dummy as $a => $v) {
$this->version[$this->name][$ext_name] = $ext_ver;
// Write cache line to file
- $this->writeLine($this->rewriteEntry($ext_name, $ext_ver, 'version', true));
+ $this->writeLine($this->rewriteEntry($ext_name, $ext_ver, 'version', TRUE));
} // END - if
//* DEBUG: */ logDebugMessage(__METHOD__, __LINE__, 'name=' . $this->name . ',ext_name=' . $ext_name . ',ext_ver=' . $ext_ver);
} else {
// Check cache
if (!isset($GLOBALS[__METHOD__][$ext_name])) {
// Does never match by default
- $GLOBALS[__METHOD__][$ext_name] = false;
+ $GLOBALS[__METHOD__][$ext_name] = FALSE;
// Compare only if installed
if (isExtensionInstalled($ext_name)) {
logDebugMessage(__METHOD__, __LINE__, 'Cache ' . $this->name . ' has missing version entry for extension ' . $ext_name . '! Purging cache...');
// Remove the cache file
- $this->removeCacheFile(true);
+ $this->removeCacheFile(TRUE);
}
} else {
// Not installed, does always match
- $GLOBALS[__METHOD__][$ext_name] = true;
+ $GLOBALS[__METHOD__][$ext_name] = TRUE;
}
} else {
// Cache entry found, log debug message
// Rewrit the entry so it can be stored in cache file
// @TODO Add support for more types which break in last else-block
- function rewriteEntry ($key, $value, $prefix = 'data', $single = false) {
+ function rewriteEntry ($key, $value, $prefix = 'data', $single = FALSE) {
// Default is not single entry
$extender = '[]';
// Add only for single array entry?
- if ($single === true) {
+ if ($single === TRUE) {
$extender = '';
} // END - if
$line = '$this->' . $prefix . "['" . $this->name . "']['" . $key . "']" . $extender . ' = NULL;';
} elseif (is_bool($value)) {
// Boolean value
- if ($value === true) {
+ if ($value === TRUE) {
// True
- $line = '$this->' . $prefix . "['" . $this->name . "']['" . $key . "']" . $extender . ' = true;';
+ $line = '$this->' . $prefix . "['" . $this->name . "']['" . $key . "']" . $extender . ' = TRUE;';
} else {
// False
- $line = '$this->' . $prefix . "['" . $this->name . "']['" . $key . "']" . $extender . ' = false;';
+ $line = '$this->' . $prefix . "['" . $this->name . "']['" . $key . "']" . $extender . ' = FALSE;';
}
} elseif (isset($value[0])) {
// These lines needs fixing