[icinga-checkins] icinga.org: icinga-web/master: * Privilege bugfix and Static content model bugfix (invalid offset...)

git at icinga.org git at icinga.org
Tue May 25 13:28:18 CEST 2010


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

Author: jmosshammer <jmosshammer at ws-jmosshammer.(none)>
Date:   Tue May 25 12:31:14 2010 +0200

* Privilege bugfix and Static content model bugfix (invalid offset...)

---

 .../models/System/StaticContentModel.class.php     |    5 ++++-
 .../lib/template/IcingaTemplateWorker.class.php    |    5 ++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/app/modules/Cronks/models/System/StaticContentModel.class.php b/app/modules/Cronks/models/System/StaticContentModel.class.php
index dc84a5d..a98c520 100755
--- a/app/modules/Cronks/models/System/StaticContentModel.class.php
+++ b/app/modules/Cronks/models/System/StaticContentModel.class.php
@@ -192,7 +192,10 @@ class Cronks_System_StaticContentModel extends CronksBaseModel
 		}
 
 		if (array_key_exists($dataSourceId, $this->content[$templateId]['data'])) {
-			$success = $this->content[$templateId]['data'][$dataSourceId]['data'][0][$column];
+			if(isset($this->content[$templateId]['data'][$dataSourceId]['data'][0]))
+				$success = $this->content[$templateId]['data'][$dataSourceId]['data'][0][$column];
+			else 
+				$success = false;
 		} else {
 			$success = false;
 		}
diff --git a/app/modules/Web/lib/template/IcingaTemplateWorker.class.php b/app/modules/Web/lib/template/IcingaTemplateWorker.class.php
index 0d6f42d..e9d9bd2 100755
--- a/app/modules/Web/lib/template/IcingaTemplateWorker.class.php
+++ b/app/modules/Web/lib/template/IcingaTemplateWorker.class.php
@@ -254,9 +254,8 @@ class IcingaTemplateWorker {
 	private function setPrivileges(IcingaApiSearchInterface &$search) {
 		$s = $this->getTemplate()->getSection('option');
 		
-		if (isset($s['security']) && is_array($s['security'])) {
-			IcingaPrincipalTargetTool::applyApiSecurityPrincipals($s['security'], $search);			
-		}
+		IcingaPrincipalTargetTool::applyApiSecurityPrincipals( $search);			
+
 	}
 	
 	private function buildDataSource() {





More information about the icinga-checkins mailing list