]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Don't log every included config file
authorMikael Nordfeldth <mmn@hethane.se>
Sat, 28 Feb 2015 12:04:17 +0000 (13:04 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Sat, 28 Feb 2015 12:04:17 +0000 (13:04 +0100)
but let us retrieve the list by running GNUsocial::configFiles()

lib/gnusocial.php

index 5551f432040096d0c0fa1d4930ead29369d521c7..08ca6f37c4be3b869f72629d03787b06b0c33753 100644 (file)
@@ -27,6 +27,7 @@ global $config, $_server, $_path;
  */
 class GNUsocial
 {
+    protected static $config_files = array();
     protected static $have_config;
     protected static $is_api;
     protected static $is_ajax;
@@ -258,6 +259,15 @@ class GNUsocial
         return self::$have_config;
     }
 
+    /**
+     * Returns a list of configuration files that have
+     * been loaded for this instance of GNU social.
+     */
+    public static function configFiles()
+    {
+        return self::$config_files;
+    }
+
     public static function isApi()
     {
         return self::$is_api;
@@ -393,8 +403,8 @@ class GNUsocial
             if (@file_exists($_config_file)) {
                 // Ignore 0-byte config files
                 if (filesize($_config_file) > 0) {
-                    common_log(LOG_INFO, "Including config file: " . $_config_file);
                     include($_config_file);
+                    self::$config_files[] = $_config_file;
                     self::$have_config = true;
                 }
             }