From 604c42c3247dfa3a8fc8f154e8bf4b1c20d46ec8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=85kre=20Solberg?= <andreas.solberg@uninett.no> Date: Tue, 23 Mar 2010 05:17:56 +0000 Subject: [PATCH] add new function to return value directly (without wrapper container) git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2231 44740490-163a-0410-bde0-09ae8108e29a --- modules/core/lib/Storage/SQLPermanentStorage.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/core/lib/Storage/SQLPermanentStorage.php b/modules/core/lib/Storage/SQLPermanentStorage.php index 4f4180b5f..c2dfa053d 100644 --- a/modules/core/lib/Storage/SQLPermanentStorage.php +++ b/modules/core/lib/Storage/SQLPermanentStorage.php @@ -120,6 +120,15 @@ class sspmod_core_Storage_SQLPermanentStorage { return $res; } + /* + * Return the value directly (not in a container) + */ + public function getValue($type = NULL, $key1 = NULL, $key2 = NULL) { + $res = $this->get($type, $key1, $key2); + if ($res === NULL) return NULL; + return $res['value']; + } + public function exists($type, $key1, $key2) { $query = "SELECT * FROM data WHERE " . "key1 = '" . sqlite_escape_string($key1) . "' AND " . -- GitLab