while ($row =& $this->db->sql_fetchrow($dbresult)) {
$tags[] = $row['tag'];
}
-
+ $this->db->sql_freeresult($dbresult);
return $tags;
}
}
$output = $this->db->sql_fetchrowset($dbresult);
+ $this->db->sql_freeresult($dbresult);
return $output;
}
return false;
}
$output = $this->db->sql_fetchrowset($dbresult);
+ $this->db->sql_freeresult($dbresult);
return $output;
}
return false;
}
$output = $this->db->sql_fetchrowset($dbresult);
+ $this->db->sql_freeresult($dbresult);
return $output;
}
}
$output = $this->db->sql_fetchrowset($dbresult);
+ $this->db->sql_freeresult($dbresult);
return $output;
}
if ($row =& $this->db->sql_fetchrow($dbresult)) {
if ($row['tCount'] > 0) {
- return true;
+ $output = true;
}
}
- return false;
+ $output = false;
+ $this->db->sql_freeresult($dbresult);
+ return $output;
}
function renameTag($userid, $old, $new, $fromApi = false) {
}
if ($row =& $this->db->sql_fetchrow($dbresult)) {
- return $row;
+ $output = $row;
} else {
- return false;
+ $output = false;
}
+ $this->db->sql_freeresult($dbresult);
+ return $output;
}
function & getBookmark($bid, $include_tags = false) {
$b2tservice = & ServiceFactory :: getServiceInstance('Bookmark2TagService');
$row['tags'] = $b2tservice->getTagsForBookmark($bid);
}
- return $row;
+ $output = $row;
} else {
- return false;
+ $output = false;
}
+ $this->db->sql_freeresult($dbresult);
+ return $output;
}
function getBookmarkByAddress($address) {
if (!($dbresult = & $this->db->sql_query($sql))) {
message_die(GENERAL_ERROR, 'Could not get vars', '', __LINE__, __FILE__, $sql, $this->db);
}
- return ($this->db->sql_fetchfield(0, 0) > 0);
+ $ouput = ($this->db->sql_fetchfield(0, 0) > 0);
+ $this->db->sql_freeresult($dbresult);
+ return $output;
}
// Adds a bookmark to the database.
$bookmarks[] = $row;
}
+ $this->db->sql_freeresult($dbresult);
$output = array ('bookmarks' => $bookmarks, 'total' => $total);
return $output;
}
if (!($dbresult = & $this->db->sql_query($sql))) {
message_die(GENERAL_ERROR, 'Could not get vars', '', __LINE__, __FILE__, $sql, $this->db);
}
- return $this->db->sql_fetchfield(0, 0) - 1;
+
+ $output = $this->db->sql_fetchfield(0, 0) - 1;
+ $this->db->sql_freeresult($dbresult);
+ return $output;
}
function normalize($address) {
while ($row = & $this->db->sql_fetchrow($dbresult)) {
$searches[] = $row;
}
+ $this->db->sql_freeresult($dbresult);
return $searches;
}
function countSearches() {
$sql = 'SELECT COUNT(*) AS `total` FROM '. $this->getTableName();
- if (!($result = & $this->db->sql_query($sql)) || (!($row = & $this->db->sql_fetchrow($result)))) {
+ if (!($dbresult = & $this->db->sql_query($sql)) || (!($row = & $this->db->sql_fetchrow($dbresult)))) {
message_die(GENERAL_ERROR, 'Could not get total searches', '', __LINE__, __FILE__, $sql, $this->db);
return false;
}
-
+ $this->db->sql_freeresult($dbresult);
return $row['total'];
}
//$output = array_unique($output); // remove duplication
}
+ $this->db->sql_freeresult($dbresult);
return $output;
}
message_die(GENERAL_ERROR, 'Could not get linked tags', '', __LINE__, __FILE__, $query, $this->db);
return false;
}
- return $this->db->sql_fetchrowset($dbresult);
+ $output = $this->db->sql_fetchrowset($dbresult);
+ $this->db->sql_freeresult($dbresult);
+ return $output;
}
function getMenuTags($uId) {
message_die(GENERAL_ERROR, 'Could not get linked tags', '', __LINE__, __FILE__, $query, $this->db);
return false;
}
- return $this->db->sql_fetchrowset($dbresult);
+ $output = $this->db->sql_fetchrowset($dbresult);
+ $this->db->sql_freeresult($dbresult);
+ return $output;
}
}
// Update stats and cache
$this->update($tag1, $tag2, $relationType, $uId);
-
+
+ $this->db->sql_freeresult($dbresult);
return true;
}
$output[] = $row['tag'];
}
+ $this->db->sql_freeresult($dbresult);
return $output;
}
}
$row = $this->db->sql_fetchrow($dbresult);
+ $this->db->sql_freeresult($dbresult);
return $row['tag'];
}
foreach($rowset as $row) {
$output[] = $row['tag'];
}
+
+ $this->db->sql_freeresult($dbresult);
return $output;
}
while ($row = & $this->db->sql_fetchrow($dbresult)) {
$users[] = $row;
}
+ $this->db->sql_freeresult($dbresult);
return $users;
}
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;
}
if ($row = $this->db->sql_fetchrow($dbresult)) {
$_SESSION[$this->getSessionKey()] = $row[$this->getFieldName('primary')];
+ $this->db->sql_freeresult($dbresult);
return $_SESSION[$this->getSessionKey()];
}
}
$cookie = $id .':'. md5($username.$password);
setcookie($this->cookiekey, $cookie, time() + $this->cookietime, '/');
}
+ $this->db->sql_freeresult($dbresult);
return true;
} else {
return false;
while ($row =& $this->db->sql_fetchrow($dbresult)) {
$arrWatch[] = $row[$this->getFieldName('username')];
}
+ $this->db->sql_freeresult($dbresult);
return $arrWatch;
}
while ( $row = $this->db->sql_fetchrow($dbresult) ) {\r
$rows[] = $row;\r
}\r
-\r
+ $this->db->sql_freeresult($dbresult);\r
return $rows;\r
}\r
\r