From 812f9af949827775d7b0b6500d9bbe1ab44b6de0 Mon Sep 17 00:00:00 2001
From: Johannes Meyer <johannes.meyer@netways.de>
Date: Mon, 17 Nov 2014 10:10:08 +0100
Subject: [PATCH] Change modulePath setting to module_path

fixes #7694
---
 application/forms/Config/General/ApplicationConfigForm.php | 2 +-
 application/forms/Config/GeneralConfigForm.php             | 2 +-
 library/Icinga/Application/ApplicationBootstrap.php        | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/application/forms/Config/General/ApplicationConfigForm.php b/application/forms/Config/General/ApplicationConfigForm.php
index df8531250..95ad22071 100644
--- a/application/forms/Config/General/ApplicationConfigForm.php
+++ b/application/forms/Config/General/ApplicationConfigForm.php
@@ -31,7 +31,7 @@ class ApplicationConfigForm extends Form
     {
         $this->addElement(
             'text',
-            'global_modulePath',
+            'global_module_path',
             array(
                 'label'         => t('Module Path'),
                 'required'      => true,
diff --git a/application/forms/Config/GeneralConfigForm.php b/application/forms/Config/GeneralConfigForm.php
index 2cb72e3a1..69fd0fc19 100644
--- a/application/forms/Config/GeneralConfigForm.php
+++ b/application/forms/Config/GeneralConfigForm.php
@@ -41,7 +41,7 @@ class GeneralConfigForm extends ConfigForm
     {
         $sections = array();
         foreach ($this->getValues() as $sectionAndPropertyName => $value) {
-            list($section, $property) = explode('_', $sectionAndPropertyName);
+            list($section, $property) = explode('_', $sectionAndPropertyName, 2);
             if (! isset($sections[$section])) {
                 $sections[$section] = array();
             }
diff --git a/library/Icinga/Application/ApplicationBootstrap.php b/library/Icinga/Application/ApplicationBootstrap.php
index 4710994b4..5e10072cf 100644
--- a/library/Icinga/Application/ApplicationBootstrap.php
+++ b/library/Icinga/Application/ApplicationBootstrap.php
@@ -372,7 +372,7 @@ abstract class ApplicationBootstrap
         $this->moduleManager = new ModuleManager(
             $this,
             $this->configDir . '/enabledModules',
-            explode(':', $this->config->fromSection('global', 'modulePath', $this->baseDir . '/modules'))
+            explode(':', $this->config->fromSection('global', 'module_path', $this->baseDir . '/modules'))
         );
         return $this;
     }