Move the include of the original and the local
configuration file into the settings file to reduce one
includes in each file, have all settings in one place
and remove unneccessary code from the config file
(which makes it easier to copy and change it).
define ('JIRAFEAU_ROOT', dirname (__FILE__) . '/');
define ('JIRAFEAU_ROOT', dirname (__FILE__) . '/');
-require (JIRAFEAU_ROOT . 'lib/config.original.php');
require (JIRAFEAU_ROOT . 'lib/settings.php');
require (JIRAFEAU_ROOT . 'lib/functions.php');
require (JIRAFEAU_ROOT . 'lib/lang.php');
require (JIRAFEAU_ROOT . 'lib/settings.php');
require (JIRAFEAU_ROOT . 'lib/functions.php');
require (JIRAFEAU_ROOT . 'lib/lang.php');
*/
define ('JIRAFEAU_ROOT', dirname (__FILE__) . '/');
*/
define ('JIRAFEAU_ROOT', dirname (__FILE__) . '/');
-require (JIRAFEAU_ROOT . 'lib/lang.php');
-require (JIRAFEAU_ROOT . 'lib/config.original.php');
require (JIRAFEAU_ROOT . 'lib/settings.php');
require (JIRAFEAU_ROOT . 'lib/functions.php');
require (JIRAFEAU_ROOT . 'lib/settings.php');
require (JIRAFEAU_ROOT . 'lib/functions.php');
+require (JIRAFEAU_ROOT . 'lib/lang.php');
if (!isset ($_GET['h']) || empty ($_GET['h']))
{
if (!isset ($_GET['h']) || empty ($_GET['h']))
{
*/
define ('JIRAFEAU_ROOT', dirname (__FILE__) . '/');
*/
define ('JIRAFEAU_ROOT', dirname (__FILE__) . '/');
-require (JIRAFEAU_ROOT . 'lib/config.original.php');
require (JIRAFEAU_ROOT . 'lib/settings.php');
require (JIRAFEAU_ROOT . 'lib/functions.php');
require (JIRAFEAU_ROOT . 'lib/lang.php');
require (JIRAFEAU_ROOT . 'lib/settings.php');
require (JIRAFEAU_ROOT . 'lib/functions.php');
require (JIRAFEAU_ROOT . 'lib/lang.php');
define ('JIRAFEAU_ROOT', dirname (__FILE__) . '/');
define ('NL', "\n");
define ('QUOTE', "'");
define ('JIRAFEAU_ROOT', dirname (__FILE__) . '/');
define ('NL', "\n");
define ('QUOTE', "'");
define ('JIRAFEAU_CFG', JIRAFEAU_ROOT.'lib/config.local.php');
define ('JIRAFEAU_VAR_RAND_LENGTH', 15);
define ('JIRAFEAU_CFG', JIRAFEAU_ROOT.'lib/config.local.php');
define ('JIRAFEAU_VAR_RAND_LENGTH', 15);
-require (JIRAFEAU_ROOT . 'lib/config.original.php');
require (JIRAFEAU_ROOT . 'lib/settings.php');
require (JIRAFEAU_ROOT . 'lib/functions.php');
require (JIRAFEAU_ROOT . 'lib/lang.php');
require (JIRAFEAU_ROOT . 'lib/settings.php');
require (JIRAFEAU_ROOT . 'lib/functions.php');
require (JIRAFEAU_ROOT . 'lib/lang.php');
* To overwrite these settings copy the file,
* rename it to »config.local.php« and adapt the parameters.
**/
* To overwrite these settings copy the file,
* rename it to »config.local.php« and adapt the parameters.
**/
/* URL of installation, with traling slash (eg. »https://exmaple.com/jirafeau/«)
*/
/* URL of installation, with traling slash (eg. »https://exmaple.com/jirafeau/«)
*/
*/
$cfg['installation_done'] = false;
*/
$cfg['installation_done'] = false;
-/* Try to include user's local configuration. */
-if ((basename (__FILE__) != 'config.local.php')
- && file_exists (JIRAFEAU_ROOT.'lib/config.local.php'))
-{
- require (JIRAFEAU_ROOT.'lib/config.local.php');
-}
-
-?>
+?>
\ No newline at end of file
header('Content-Type: text/javascript');
define ('JIRAFEAU_ROOT', dirname (__FILE__) . '/../');
header('Content-Type: text/javascript');
define ('JIRAFEAU_ROOT', dirname (__FILE__) . '/../');
-require (JIRAFEAU_ROOT . 'lib/config.original.php');
require (JIRAFEAU_ROOT . 'lib/settings.php');
require (JIRAFEAU_ROOT . 'lib/functions.php');
require (JIRAFEAU_ROOT . 'lib/lang.php');
require (JIRAFEAU_ROOT . 'lib/settings.php');
require (JIRAFEAU_ROOT . 'lib/functions.php');
require (JIRAFEAU_ROOT . 'lib/lang.php');
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
+global $cfg;
+
+// Read config files
+require (JIRAFEAU_ROOT . 'lib/config.original.php');
+
+if (file_exists(JIRAFEAU_ROOT . 'lib/config.local.php'))
+{
+ require (JIRAFEAU_ROOT . 'lib/config.local.php');
+}
+
/* Jirafeau constants */
define ('JIRAFEAU_PACKAGE', 'Jirafeau');
define ('JIRAFEAU_VERSION', '1.2.0');
/* Jirafeau constants */
define ('JIRAFEAU_PACKAGE', 'Jirafeau');
define ('JIRAFEAU_VERSION', '1.2.0');
define ('JIRAFEAU_QUARTER', 7257600); // JIRAFEAU_MONTH * 3
define ('JIRAFEAU_YEAR', 29030400); // JIRAFEAU_MONTH * 12
define ('JIRAFEAU_QUARTER', 7257600); // JIRAFEAU_MONTH * 3
define ('JIRAFEAU_YEAR', 29030400); // JIRAFEAU_MONTH * 12
* If you don't want this feature, you can simply delete this file from your
* web directory.
*/
* If you don't want this feature, you can simply delete this file from your
* web directory.
*/
define ('JIRAFEAU_ROOT', dirname (__FILE__) . '/');
define ('JIRAFEAU_ROOT', dirname (__FILE__) . '/');
-require (JIRAFEAU_ROOT . 'lib/config.original.php');
require (JIRAFEAU_ROOT . 'lib/settings.php');
require (JIRAFEAU_ROOT . 'lib/functions.php');
require (JIRAFEAU_ROOT . 'lib/lang.php');
require (JIRAFEAU_ROOT . 'lib/settings.php');
require (JIRAFEAU_ROOT . 'lib/functions.php');
require (JIRAFEAU_ROOT . 'lib/lang.php');
*/\r
\r
define ('JIRAFEAU_ROOT', dirname (__FILE__) . '/');\r
*/\r
\r
define ('JIRAFEAU_ROOT', dirname (__FILE__) . '/');\r
-require (JIRAFEAU_ROOT . 'lib/config.original.php');\r
require (JIRAFEAU_ROOT . 'lib/settings.php');\r
require (JIRAFEAU_ROOT . 'lib/functions.php');\r
require (JIRAFEAU_ROOT . 'lib/lang.php');\r
require (JIRAFEAU_ROOT . 'lib/settings.php');\r
require (JIRAFEAU_ROOT . 'lib/functions.php');\r
require (JIRAFEAU_ROOT . 'lib/lang.php');\r
require (JIRAFEAU_ROOT . 'lib/template/header.php');\r
\r
$url = $cfg['web_root'] . 'tos.php';\r
require (JIRAFEAU_ROOT . 'lib/template/header.php');\r
\r
$url = $cfg['web_root'] . 'tos.php';\r
echo '</textarea>';\r
echo '<p>This license text is under <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons - Attribution 3.0 Unported</a>.</p><p>It has been based on this work: <a href="http://opensource.org/ToS">http://opensource.org/ToS</a></p>';\r
echo '</div>';\r
echo '</textarea>';\r
echo '<p>This license text is under <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons - Attribution 3.0 Unported</a>.</p><p>It has been based on this work: <a href="http://opensource.org/ToS">http://opensource.org/ToS</a></p>';\r
echo '</div>';\r
require (JIRAFEAU_ROOT . 'lib/template/footer.php');\r
require (JIRAFEAU_ROOT . 'lib/template/footer.php');\r
+\r
+?>
\ No newline at end of file