X-Git-Url: https://projects.mako.cc/source/scuttle/blobdiff_plain/c20b44263a89d8bf1a78bfa632daaae3cb4f1da2..0b769a1388b7a5daf1829e0f92fa928b007e1ef6:/api/posts_all.php diff --git a/api/posts_all.php b/api/posts_all.php index 03026c4..747741a 100644 --- a/api/posts_all.php +++ b/api/posts_all.php @@ -5,11 +5,14 @@ // - doesn't include the filtered tag as an attribute on the root element (we do) // Force HTTP authentication first! -require_once('httpauth.inc.php'); -require_once('../header.inc.php'); +require_once 'httpauth.inc.php'; +require_once '../header.inc.php'; + +// set user as logged in so private bookmarks are exported +$loggedon = true; $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); -$userservice =& ServiceFactory::getServiceInstance('UserService'); +$userservice =& ServiceFactory::getServiceInstance('UserService'); // Check to see if a tag was specified. if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != '')) @@ -42,9 +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 ''; -?> \ No newline at end of file