From 1f0df27c7e2fef086bc1ead7386bc2df2832ad23 Mon Sep 17 00:00:00 2001 From: Bart Lantz Date: Sun, 4 Mar 2012 19:21:12 -0700 Subject: [PATCH 1/1] Added functionality to keep privacy settings when bookmarks exported via API. --- api/posts_all.php | 8 +++++++- api/posts_get.php | 8 +++++++- api/posts_recent.php | 9 ++++++++- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/api/posts_all.php b/api/posts_all.php index 0831d9f..747741a 100644 --- a/api/posts_all.php +++ b/api/posts_all.php @@ -45,8 +45,14 @@ foreach($bookmarks['bookmarks'] as $row) { } else { $taglist = 'system:unfiled'; } + // The privacy setting in scuttle is to set bStatus to 2 in the database. + if(trim($row['bStatus']) == '2') { + $shared = "no"; + } else { + $shared = "yes"; + } - echo "\t\r\n"; + echo "\t\r\n"; } echo ''; diff --git a/api/posts_get.php b/api/posts_get.php index d54f86a..2c875ec 100644 --- a/api/posts_get.php +++ b/api/posts_get.php @@ -54,8 +54,14 @@ foreach ($bookmarks['bookmarks'] as $row) { } else { $taglist = 'system:unfiled'; } + // The privacy setting in scuttle is to set bStatus to 2 in database. + if(trim($row['bStatus']) == '2') { + $shared = "no"; + } else { + $shared = "yes"; + } - echo "\t\r\n"; + echo "\t\r\n"; } echo ''; diff --git a/api/posts_recent.php b/api/posts_recent.php index 476eecb..38124d2 100644 --- a/api/posts_recent.php +++ b/api/posts_recent.php @@ -1,3 +1,4 @@ + \r\n"; + echo "\t\r\n"; } echo ''; -- 2.39.5