]> git.mxchange.org Git - mailer.git/blobdiff - inc/inc-functions.php
Added update_year.sh (still not fully flexible) and updated all years with it.
[mailer.git] / inc / inc-functions.php
index 7b33f373227ce3ff16b2a07f97855519803da402..4d778abdd0443ad2922cfa921ba37241ab65d9eb 100644 (file)
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Spezielle Funktionen fuer Include-Dateien        *
  * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2015 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -93,7 +88,7 @@ function removeIncludeFromPool ($pool, $inc) {
        $key = array_search($inc, getIncludePool($pool));
 
        // Is it valid?
-       if ($key !== false) {
+       if ($key !== FALSE) {
                // Then remove it
                unset($GLOBALS['inc_pool'][$pool][$key]);
 
@@ -117,12 +112,12 @@ function loadIncludePool ($pool) {
 
 // Loads an include file and logs any missing files for debug purposes
 function loadInclude ($inc) {
-       // Do we have cache?
+       // Is there cache?
        if (!isset($GLOBALS['inc_loaded'][$inc])) {
                // Is the include file there?
                if (!isIncludeReadable($inc)) {
                        // Not there so log it
-                       reportBug(__FUNCTION__, __LINE__, sprintf("Include file %s not found or deprecated.", $inc));
+                       reportBug(__FUNCTION__, __LINE__, sprintf('Include file %s not found or deprecated.', $inc));
                } // END - if
 
                // Add the path. This is why we need a trailing slash in config.php
@@ -136,10 +131,7 @@ function loadInclude ($inc) {
 // Loads an include file once
 function loadIncludeOnce ($inc) {
        // Is it not loaded?
-       if (!isset($GLOBALS['load_once'][$inc])) {
-               // Mark it as loaded
-               $GLOBALS['load_once'][$inc] = 'loaded';
-
+       if (!isset($GLOBALS['inc_loaded'][$inc])) {
                // Then try to load it
                loadInclude($inc);
        } // END - if
@@ -147,7 +139,7 @@ function loadIncludeOnce ($inc) {
 
 // Checks whether an include file (non-FQFN better) is readable
 function isIncludeReadable ($inc) {
-       // Do we have cache?
+       // Is there cache?
        if (!isset($GLOBALS['inc_readable'][$inc])) {
                // Construct FQFN
                $FQFN = getPath() . $inc;