]> git.mxchange.org Git - mailer.git/blobdiff - inc/revision-functions.php
Updated copyright notice as there are changes in this year
[mailer.git] / inc / revision-functions.php
index 40ff69b3f650568580fb4985f77f4c27f385c64d..acfccbecc93dc9368da41fd11c313e3ddd08bf39 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 *
@@ -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('<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) {
@@ -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])) {