summaryrefslogtreecommitdiff
path: root/services/bookmarkservice.php
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-01-12 16:40:39 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-01-12 16:40:39 +0000
commita70b6e9dacbb2c5c57425df6ef30802115509645 (patch)
treea7420f5a4b8b7d85f05782c93a1ad64eecf37a02 /services/bookmarkservice.php
parent78b493f41c9490d3ef1c8c9f57c486ad40f9d152 (diff)
downloadsemanticscuttle-a70b6e9dacbb2c5c57425df6ef30802115509645.tar.gz
semanticscuttle-a70b6e9dacbb2c5c57425df6ef30802115509645.tar.bz2
New Feature: adding private note to describe a bookmark. Just visible by the author and friends. (Useful for collaborative work)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@231 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'services/bookmarkservice.php')
-rw-r--r--services/bookmarkservice.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/services/bookmarkservice.php b/services/bookmarkservice.php
index ecd93f2..4b000b4 100644
--- a/services/bookmarkservice.php
+++ b/services/bookmarkservice.php
@@ -108,7 +108,7 @@ class BookmarkService {
// Adds a bookmark to the database.
// Note that date is expected to be a string that's interpretable by strtotime().
- function addBookmark($address, $title, $description, $status, $categories, $date = NULL, $fromApi = false, $fromImport = false, $sId = -1) {
+ function addBookmark($address, $title, $description, $privateNote, $status, $categories, $date = NULL, $fromApi = false, $fromImport = false, $sId = -1) {
if($sId == -1) {
$userservice = & ServiceFactory :: getServiceInstance('UserService');
$sId = $userservice->getCurrentUserId();
@@ -134,7 +134,7 @@ class BookmarkService {
$datetime = gmdate('Y-m-d H:i:s', $time);
// Set up the SQL insert statement and execute it.
- $values = array('uId' => intval($sId), 'bIp' => $ip, 'bDatetime' => $datetime, 'bModified' => $datetime, 'bTitle' => $title, 'bAddress' => $address, 'bDescription' => $description, 'bStatus' => intval($status), 'bHash' => md5($address));
+ $values = array('uId' => intval($sId), 'bIp' => $ip, 'bDatetime' => $datetime, 'bModified' => $datetime, 'bTitle' => $title, 'bAddress' => $address, 'bDescription' => $description, 'bPrivateNote' => $privateNote, 'bStatus' => intval($status), 'bHash' => md5($address));
$sql = 'INSERT INTO '. $this->getTableName() .' '. $this->db->sql_build_array('INSERT', $values);
$this->db->sql_transaction('begin');
if (!($dbresult = & $this->db->sql_query($sql))) {
@@ -153,8 +153,6 @@ class BookmarkService {
$uriparts = explode('.', $address);
$extension = end($uriparts);
unset($uriparts);
-
- trigger_error($GLOBALS['filetypes'].'aaaaaaaaaaaaaaaaaaaaa');
$b2tservice = & ServiceFactory :: getServiceInstance('Bookmark2TagService');
if (!$b2tservice->attachTags($bId, $categories, $fromApi, $extension, false, $fromImport)) {
@@ -167,7 +165,7 @@ class BookmarkService {
return $bId;
}
- function updateBookmark($bId, $address, $title, $description, $status, $categories, $date = NULL, $fromApi = false) {
+ function updateBookmark($bId, $address, $title, $description, $privateNote, $status, $categories, $date = NULL, $fromApi = false) {
if (!is_numeric($bId))
return false;
@@ -183,7 +181,7 @@ class BookmarkService {
$moddatetime = gmdate('Y-m-d H:i:s', time());
// Set up the SQL update statement and execute it.
- $updates = array('bModified' => $moddatetime, 'bTitle' => $title, 'bAddress' => $address, 'bDescription' => $description, 'bStatus' => $status, 'bHash' => md5($address));
+ $updates = array('bModified' => $moddatetime, 'bTitle' => $title, 'bAddress' => $address, 'bDescription' => $description, 'bPrivateNote' => $privateNote, 'bStatus' => $status, 'bHash' => md5($address));
if (!is_null($date)) {
$datetime = gmdate('Y-m-d H:i:s', strtotime($date));