From 10c715cdae51fd7cb2c38d7da2da106ff69ec7b3 Mon Sep 17 00:00:00 2001 From: tomas Date: Wed, 27 Jul 2005 00:54:13 +0000 Subject: [PATCH] The readKeys method added. --- .../modules/storageServer/var/Prefs.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/livesupport/modules/storageServer/var/Prefs.php b/livesupport/modules/storageServer/var/Prefs.php index 69232f99d..294a37e4f 100644 --- a/livesupport/modules/storageServer/var/Prefs.php +++ b/livesupport/modules/storageServer/var/Prefs.php @@ -23,7 +23,7 @@ Author : $Author: tomas $ - Version : $Revision: 1.6 $ + Version : $Revision: 1.7 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/Prefs.php,v $ ------------------------------------------------------------------------------*/ @@ -267,6 +267,23 @@ class Prefs{ return $val; } + /** + * Read all keys of subject's preferences + * + * @param subjid int, local user/group id + * @return array, preference keys + */ + function readKeys($subjid) + { + $res = $this->dbc->getAll(" + SELECT keystr FROM {$this->prefTable} + WHERE subjid=$subjid + "); + if(PEAR::isError($res)) return $res; + if(is_null($res)) return FALSE; + return $res; + } + /** * Update value of preference record *