From 6ed90e647a0a513def828ec66f17df2b724c518e Mon Sep 17 00:00:00 2001 From: Mark Pemberton Date: Sat, 14 May 2011 21:46:35 -0400 Subject: [PATCH] Fixed sql commands where resources were not freed --- src/SemanticScuttle/Service/Bookmark.php | 1 + src/SemanticScuttle/Service/User.php | 9 ++--- www/ajaxGetNewPrivateKey.php | 42 ++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 4 deletions(-) create mode 100644 www/ajaxGetNewPrivateKey.php diff --git a/src/SemanticScuttle/Service/Bookmark.php b/src/SemanticScuttle/Service/Bookmark.php index e836cd8..57d0b2e 100644 --- a/src/SemanticScuttle/Service/Bookmark.php +++ b/src/SemanticScuttle/Service/Bookmark.php @@ -427,6 +427,7 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService $existence[$hashes[$row['bHash']]] = $row['count'] > 0; } + $this->db->sql_freeresult($dbresult); return $existence; } diff --git a/src/SemanticScuttle/Service/User.php b/src/SemanticScuttle/Service/User.php index c3633de..01945ca 100644 --- a/src/SemanticScuttle/Service/User.php +++ b/src/SemanticScuttle/Service/User.php @@ -674,11 +674,12 @@ class SemanticScuttle_Service_User extends SemanticScuttle_DbService return false; } - $arrWatch = array(); + $retval = true; if ($this->db->sql_numrows($dbresult) == 0) - return false; - else - return true; + $retval = false; + + $this->db->sql_freeresult($dbresult); + return $retval; } function setWatchStatus($subjectUserID) { diff --git a/www/ajaxGetNewPrivateKey.php b/www/ajaxGetNewPrivateKey.php new file mode 100644 index 0000000..59545a2 --- /dev/null +++ b/www/ajaxGetNewPrivateKey.php @@ -0,0 +1,42 @@ +'; +?> + + +getNewPrivateKey + + +getNewPrivateKey(); ?> + +