From 5c237b6385b482d4f6ae2dcd6cb2781e632cd2dd Mon Sep 17 00:00:00 2001
From: robocoder <anthon.pang@gmail.com>
Date: Mon, 5 Sep 2011 11:59:23 +0000
Subject: [PATCH] also remove the Inspekt wrapper stub

git-svn-id: http://dev.piwik.org/svn/trunk@5128 59fd770c-687e-43c8-a1e3-f5a4ff64c105
---
 core/Access.php | 12 ++++++++----
 core/Cage.php   | 28 ----------------------------
 2 files changed, 8 insertions(+), 32 deletions(-)
 delete mode 100644 core/Cage.php

diff --git a/core/Access.php b/core/Access.php
index 93f35ad625..ef208a6f2b 100644
--- a/core/Access.php
+++ b/core/Access.php
@@ -344,11 +344,13 @@ class Piwik_Access
 		$idSitesAccessible = $this->getSitesIdWithAdminAccess();
 		foreach($idSites as $idsite)
 		{
-			if(!in_array($idsite, $idSitesAccessible))
+			if(in_array($idsite, $idSitesAccessible))
 			{
-				throw new Piwik_Access_NoAccessException(Piwik_TranslateException('General_ExceptionPrivilegeAccessWebsite', array("'admin'", $idsite)));
+				return;
 			}
 		}
+
+		throw new Piwik_Access_NoAccessException(Piwik_TranslateException('General_ExceptionPrivilegeAtLeastOneWebsite', array('admin')));
 	}
 
 	/**
@@ -377,11 +379,13 @@ class Piwik_Access
 
 		foreach($idSites as $idsite)
 		{
-			if(!in_array($idsite, $idSitesAccessible))
+			if(in_array($idsite, $idSitesAccessible))
 			{
-				throw new Piwik_Access_NoAccessException(Piwik_TranslateException('General_ExceptionPrivilegeAccessWebsite', array("'view'", $idsite)));
+				return;
 			}
 		}
+
+		throw new Piwik_Access_NoAccessException(Piwik_TranslateException('General_ExceptionPrivilegeAtLeastOneWebsite', array('view')));
 	}
 }
 
diff --git a/core/Cage.php b/core/Cage.php
deleted file mode 100644
index b9b43893a8..0000000000
--- a/core/Cage.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-/**
- * Piwik - Open source web analytics
- *
- * @link http://piwik.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- * @version $Id$
- *
- * @category Piwik
- * @package Piwik
- */
-
-/**
- * Class to quarantine (inherently) untrusted user input, and
- * provide filtering, sanitization, and validation.
- *
- * The current implementation is a wrapper around Inspekt.
- *
- * @package Piwik
- * @subpackage Piwik_Access
- */
-class Piwik_Cage
-{	
-	//private 
-	function __construct()
-	{
-	}
-}
-- 
GitLab