]> git.mxchange.org Git - mailer.git/blobdiff - inc/revision-functions.php
Better check if it is not empty (means set, too). This will speed-up the code again...
[mailer.git] / inc / revision-functions.php
index e61d9788751d69dfd852a1cf351cab7a2d47c615..6e8da9535bd80840840ddcb637511ca6da02c1d4 100644 (file)
@@ -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 *
@@ -85,7 +85,7 @@ function getRepositoryData ($type = 'Revision') {
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ret[' . $type . ']=' . $ret);
        } else {
                // FQFN of revision file
-               $FQFN = sprintf("%s/.revision", getCachePath());
+               $FQFN = sprintf('%s/.revision', getCachePath());
 
                // Check if 'check_revision_data' is setted (switch for manually rewrite the .revision-File)
                if ((isGetRequestElementSet('check_revision_data')) && (getRequestElement('check_revision_data') == 'yes')) {
@@ -98,7 +98,7 @@ function getRepositoryData ($type = 'Revision') {
                                $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']);
@@ -124,7 +124,7 @@ function getRepositoryData ($type = 'Revision') {
                // Has it been updated?
                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])) {