From 5bc17b0acd2de5069089686563abbcc2c91ec65b Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 17 Mar 2010 20:20:33 +1300 Subject: [PATCH] Switch to AwlQuery library. --- inc/HTTPAuthSession.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/inc/HTTPAuthSession.php b/inc/HTTPAuthSession.php index 4e8c6a22..c4d234e7 100644 --- a/inc/HTTPAuthSession.php +++ b/inc/HTTPAuthSession.php @@ -9,8 +9,6 @@ * @license http://gnu.org/copyleft/gpl.html GNU GPL v2 */ -require_once('PgQuery.php'); - /** * A Class for handling a session using HTTP Basic Authentication * @@ -261,8 +259,9 @@ class HTTPAuthSession { */ function GetRoles () { $this->roles = array(); - $qry = new PgQuery( 'SELECT role_name FROM role_member m join roles r ON r.role_no = m.role_no WHERE user_no = ? ', $this->user_no ); - if ( $qry->Exec('BasicAuth') && $qry->rows > 0 ) { + $qry = new AwlQuery( 'SELECT role_name FROM role_member m join roles r ON r.role_no = m.role_no WHERE user_no = :user_no ', + array( ':user_no' => $this->user_no) ); + if ( $qry->Exec('BasicAuth') && $qry->rows() > 0 ) { while( $role = $qry->Fetch() ) { $this->roles[$role->role_name] = true; }