$ret = 'INVALID';
// By default nothing is new... ;-)
- $new = false;
+ $new = FALSE;
// Is the cache entry there?
if (isset($GLOBALS['cache_array']['revision'][$type][0])) {
// Check if 'check_revision_data' is setted (switch for manually rewrite the .revision-File)
if ((isGetRequestElementSet('check_revision_data')) && (getRequestElement('check_revision_data') == 'yes')) {
// Forced rebuild of .revision file
- $new = true;
+ $new = TRUE;
} else {
// Check for revision file
if (!isFileReadable($FQFN)) {
// Not found, so we need to create it
- $new = true;
+ $new = TRUE;
} else {
// Revision file found
- $ins_vers = explode(chr(10), readFromFile($FQFN));
+ $ins_vers = explode(PHP_EOL, readFromFile($FQFN));
// Get array for mapping information
$mapper = array_flip($GLOBALS['repository_search_for']);
- //* DEBUG: */ debugOutput('<pre>mapper='.print_r($mapper, true).'</pre>ins_vers=<pre>'.print_r($ins_vers, true).'</pre>');
+ //* DEBUG: */ debugOutput('<pre>mapper='.print_r($mapper, TRUE).'</pre>ins_vers=<pre>'.print_r($ins_vers, TRUE).'</pre>');
// Is the content valid?
if ((!is_array($ins_vers)) || (count($ins_vers) <= 0) || (!isset($ins_vers[$mapper[$type]])) || (trim($ins_vers[$mapper[$type]]) == '') || ($ins_vers[0]) == 'new') {
// File needs update!
- $new = true;
+ $new = TRUE;
} else {
// Generate fake cache entry
foreach ($mapper as $map => $idx) {
}
// Has it been updated?
- if ($new === true) {
+ if ($new === TRUE) {
// Write it
- writeToFile($FQFN, implode(chr(10), getArrayFromRepositoryData()));
+ writeToFile($FQFN, implode(PHP_EOL, getArrayFromRepositoryData()));
// ... and call recursive
$ret = getRepositoryData($type);
} else {
// No valid Data from the last modificated file so read the Revision from the Server. Fallback-solution!! Should not be removed I think.
- $version = sendGetRequest('check-updates3.php');
+ $version = sendHttpGetRequest('check-updates3.php');
// Invalid request reply?
if (!isset($version[11])) {