aboutsummaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-05-10 08:59:41 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-05-10 08:59:41 +0000
commit2756e3f85818346a478725b6dd94a966e0d92c07 (patch)
treeefad4c6566773670dc5f9a8b733f2a3ed3fe4a57 /services
parente273c0d367da161651324eca1b7e4177c670c91f (diff)
downloadsemanticscuttle-2756e3f85818346a478725b6dd94a966e0d92c07.tar.gz
semanticscuttle-2756e3f85818346a478725b6dd94a966e0d92c07.tar.bz2
Bug fixes: correct minor bugs appearing with 'notice' level in PHP
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@122 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'services')
-rw-r--r--services/bookmark2tagservice.php9
-rw-r--r--services/bookmarkservice.php5
-rw-r--r--services/tag2tagservice.php2
-rw-r--r--services/userservice.php2
4 files changed, 12 insertions, 6 deletions
diff --git a/services/bookmark2tagservice.php b/services/bookmark2tagservice.php
index 148ad3a..121ba8d 100644
--- a/services/bookmark2tagservice.php
+++ b/services/bookmark2tagservice.php
@@ -266,7 +266,8 @@ class Bookmark2TagService {
message_die(GENERAL_ERROR, 'Could not get related tags', '', __LINE__, __FILE__, $query, $this->db);
return false;
}
- return $this->db->sql_fetchrowset($dbresult);
+ $output = $this->db->sql_fetchrowset($dbresult);
+ return $output;
}
// Returns the most popular tags used for a particular bookmark hash
@@ -322,7 +323,8 @@ class Bookmark2TagService {
return false;
}
- return $this->db->sql_fetchrowset($dbresult);
+ $output = $this->db->sql_fetchrowset($dbresult);
+ return $output;
}
function hasTag($bookmarkid, $tag) {
@@ -366,7 +368,8 @@ class Bookmark2TagService {
function &tagCloud($tags = NULL, $steps = 5, $sizemin = 90, $sizemax = 225, $sortOrder = NULL) {
if (is_null($tags) || count($tags) < 1) {
- return false;
+ $output = false;
+ return $output;
}
$min = $tags[count($tags) - 1]['bCount'];
diff --git a/services/bookmarkservice.php b/services/bookmarkservice.php
index 5339004..2cd42e2 100644
--- a/services/bookmarkservice.php
+++ b/services/bookmarkservice.php
@@ -280,6 +280,7 @@ class BookmarkService {
$query_3 .= ' AND ('. $query_3_1 .') AND B.bStatus IN (0, 1)';
}
+ $query_5 = '';
if($hash == null) {
$query_5.= ' GROUP BY B.bHash';
}
@@ -389,7 +390,9 @@ class BookmarkService {
$row['tags'] = $b2tservice->getTagsForBookmark(intval($row['bId']));
$bookmarks[] = $row;
}
- return array ('bookmarks' => $bookmarks, 'total' => $total);
+
+ $output = array ('bookmarks' => $bookmarks, 'total' => $total);
+ return $output;
}
function deleteBookmark($bookmarkid) {
diff --git a/services/tag2tagservice.php b/services/tag2tagservice.php
index 8b2b731..bf4f866 100644
--- a/services/tag2tagservice.php
+++ b/services/tag2tagservice.php
@@ -62,7 +62,7 @@ class Tag2TagService {
$query.= " AND uId = '".$uId."'";
}
//die($query);
- if (! ($dbresult =& $this->db->sql_query_limit($query, $limit)) ){
+ if (! ($dbresult =& $this->db->sql_query($query)) ){
message_die(GENERAL_ERROR, 'Could not get related tags', '', __LINE__, __FILE__, $query, $this->db);
return false;
}
diff --git a/services/userservice.php b/services/userservice.php
index 9e3adca..3d2058f 100644
--- a/services/userservice.php
+++ b/services/userservice.php
@@ -127,7 +127,7 @@ class UserService {
if ($id = $this->getCurrentUserId())
$currentuser = $this->getUser($id);
else
- return;
+ return null;
}
return $currentuser;
}