[icinga-checkins] icinga.org: icinga-web/master: * ICINGA ACTIVE check constants (fixes #1130 )

git at icinga.org git at icinga.org
Thu Jan 20 09:25:10 CET 2011


Module: icinga-web
Branch: master
Commit: 02699af47fffb83648f9d648dda57550801eb74c
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=02699af47fffb83648f9d648dda57550801eb74c

Author: Marius Hein <marius.hein at netways.de>
Date:   Thu Jan 20 09:22:27 2011 +0100

* ICINGA ACTIVE check constants (fixes #1130)
* Internal auth provider available fix (fixes #1131)

---

 .../models/Auth/Provider/DatabaseModel.class.php   |    2 +-
 .../lib/constants/IcingaConstantResolver.class.php |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/modules/AppKit/models/Auth/Provider/DatabaseModel.class.php b/app/modules/AppKit/models/Auth/Provider/DatabaseModel.class.php
index 1f64ee8..bd77417 100755
--- a/app/modules/AppKit/models/Auth/Provider/DatabaseModel.class.php
+++ b/app/modules/AppKit/models/Auth/Provider/DatabaseModel.class.php
@@ -32,7 +32,7 @@ class AppKit_Auth_Provider_DatabaseModel extends AppKitAuthProviderBaseModel imp
 		->where('u.user_name=? and user_disabled=?', array($uid, 0))
 		->execute(null, Doctrine::HYDRATE_ARRAY);
 		
-		if ($res[0]['cnt'] !== 0) {
+		if (isset($res[0]['cnt']) && $res[0]['cnt'] != "0" && (int)$res[0]['cnt'] === 1) {
 			return true;
 		}
 		
diff --git a/app/modules/Web/lib/constants/IcingaConstantResolver.class.php b/app/modules/Web/lib/constants/IcingaConstantResolver.class.php
index 35dd93e..5370f97 100755
--- a/app/modules/Web/lib/constants/IcingaConstantResolver.class.php
+++ b/app/modules/Web/lib/constants/IcingaConstantResolver.class.php
@@ -16,8 +16,8 @@ class IcingaConstantResolver {
 	);
 	
 	static private $active_check_type = array (
-		0	=> 'PASSIVE',
-		1	=> 'ACTIVE'
+		0	=> 'ACTIVE',
+		1	=> 'PASSIVE'
 	);
 	
 	static private $boolean_states = array (
@@ -112,4 +112,4 @@ class IcingaConstantResolver {
 	
 }
 
-?>
\ No newline at end of file
+?>





More information about the icinga-checkins mailing list