From 1dbbf8cc5f7a167559b23d41ffa3bab8e8ebf5e1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 31 Jan 2013 23:51:13 +0000 Subject: [PATCH] Added example local configuration file --- .gitattributes | 1 + inc/config/config-local.php-dist | 31 +++++++++++++++++++++++++++++++ inc/includes.php | 6 ++++-- inc/loader/class_ClassLoader.php | 2 +- 4 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 inc/config/config-local.php-dist diff --git a/.gitattributes b/.gitattributes index c43824e7..dacedbf6 100644 --- a/.gitattributes +++ b/.gitattributes @@ -623,6 +623,7 @@ inc/config.php svneol=native#text/plain inc/config/.htaccess svneol=native#text/plain inc/config/class_FrameworkConfiguration.php svneol=native#text/plain inc/config/config-hubmaster.php svneol=native#text/plain +inc/config/config-local.php-dist -text inc/database.php svneol=native#text/plain inc/database/.htaccess svneol=native#text/plain inc/database/lib-local.php svneol=native#text/plain diff --git a/inc/config/config-local.php-dist b/inc/config/config-local.php-dist new file mode 100644 index 00000000..7c1d5494 --- /dev/null +++ b/inc/config/config-local.php-dist @@ -0,0 +1,31 @@ + + * @version 0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team + * @license GNU GPL 3.0 or any newer version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// Get the configuration instance +$cfg = FrameworkConfiguration::getSelfInstance(); + +// CFG: FOO-BAR +//$cfg->setConfigEntry('foo_bar', 12345); + +// [EOF] +?> diff --git a/inc/includes.php b/inc/includes.php index 122ce180..201f2de3 100644 --- a/inc/includes.php +++ b/inc/includes.php @@ -27,8 +27,10 @@ // Include the class loader function require(FrameworkConfiguration::getSelfInstance()->getConfigEntry('base_path') . 'inc/loader/class_ClassLoader.php'); -// Shall we include additional configs where you can configure some things? Then -// Load matching config +/* + * Shall we include additional configs where you can configure some things? + * Then load matching config file. + */ ClassLoader::getSelfInstance()->loadExtraConfigs(); // Register auto-load function with the SPL diff --git a/inc/loader/class_ClassLoader.php b/inc/loader/class_ClassLoader.php index 2de06ca2..7c9afa93 100644 --- a/inc/loader/class_ClassLoader.php +++ b/inc/loader/class_ClassLoader.php @@ -396,7 +396,7 @@ class ClassLoader { // Prepare the list $includeList = ''; foreach ($this->loadedClasses as $classFile) { - $includeList .= basename($classFile)."
\n"; + $includeList .= basename($classFile) . '
' . PHP_EOL; } // END - foreach // And return it -- 2.39.5