X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Frevision-functions.php;h=acfccbecc93dc9368da41fd11c313e3ddd08bf39;hb=ec3907de5b6c1ca85da82232707c85d22e197c11;hp=40ff69b3f650568580fb4985f77f4c27f385c64d;hpb=63f159414369b5ea19a8ca75d8cd8033c45d8341;p=mailer.git diff --git a/inc/revision-functions.php b/inc/revision-functions.php index 40ff69b3f6..acfccbecc9 100644 --- a/inc/revision-functions.php +++ b/inc/revision-functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2012 by Mailer Developer Team * + * Copyright (c) 2009 - 2013 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -73,7 +73,7 @@ function getRepositoryData ($type = 'Revision') { $ret = 'INVALID'; // By default nothing is new... ;-) - $new = false; + $new = FALSE; // Is the cache entry there? if (isset($GLOBALS['cache_array']['revision'][$type][0])) { @@ -90,24 +90,24 @@ function getRepositoryData ($type = 'Revision') { // 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('
mapper='.print_r($mapper, true).'
ins_vers=
'.print_r($ins_vers, true).'
'); + //* DEBUG: */ debugOutput('
mapper='.print_r($mapper, TRUE).'
ins_vers=
'.print_r($ins_vers, TRUE).'
'); // 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) { @@ -122,9 +122,9 @@ function getRepositoryData ($type = 'Revision') { } // 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); @@ -222,7 +222,7 @@ function getArrayFromRepositoryData () { } 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])) {