diff options
author | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2009-02-03 15:32:23 +0000 |
---|---|---|
committer | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2009-02-03 15:32:23 +0000 |
commit | c0e46287e41ac5be4c4832c915c8e2ba78b9a1d5 (patch) | |
tree | 98aef584a8d4b91c5a618bbbfa11953cba4ad9c2 /services/userservice.php | |
parent | 4aaef1823e5e37f02bc18078ccb67217b8cdbcb7 (diff) | |
download | semanticscuttle-c0e46287e41ac5be4c4832c915c8e2ba78b9a1d5.tar.gz semanticscuttle-c0e46287e41ac5be4c4832c915c8e2ba78b9a1d5.tar.bz2 |
Refactoring: free few sql results
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@247 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'services/userservice.php')
-rw-r--r-- | services/userservice.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/services/userservice.php b/services/userservice.php index 21b9136..7f0382d 100644 --- a/services/userservice.php +++ b/services/userservice.php @@ -73,6 +73,7 @@ class UserService { while ($row = & $this->db->sql_fetchrow($dbresult)) { $users[] = $row; } + $this->db->sql_freeresult($dbresult); return $users; } @@ -89,6 +90,7 @@ class UserService { while ($row = & $this->db->sql_fetchrow($dbresult)) { $users[] = new User($row[$this->getFieldName('primary')], $row[$this->getFieldName('username')]); } + $this->db->sql_freeresult($dbresult); return $users; } @@ -238,6 +240,7 @@ class UserService { if ($row = $this->db->sql_fetchrow($dbresult)) { $_SESSION[$this->getSessionKey()] = $row[$this->getFieldName('primary')]; + $this->db->sql_freeresult($dbresult); return $_SESSION[$this->getSessionKey()]; } } @@ -259,6 +262,7 @@ class UserService { $cookie = $id .':'. md5($username.$password); setcookie($this->cookiekey, $cookie, time() + $this->cookietime, '/'); } + $this->db->sql_freeresult($dbresult); return true; } else { return false; @@ -314,6 +318,7 @@ class UserService { while ($row =& $this->db->sql_fetchrow($dbresult)) { $arrWatch[] = $row[$this->getFieldName('username')]; } + $this->db->sql_freeresult($dbresult); return $arrWatch; } @@ -422,7 +427,7 @@ class UserService { while ( $row = $this->db->sql_fetchrow($dbresult) ) {
$rows[] = $row;
}
-
+ $this->db->sql_freeresult($dbresult);
return $rows;
}
|