projects
/
scuttle
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
7949a20
)
fixed post_all API to allow export of private data
author
Benjamin Mako Hill
<mako@atdot.cc>
Tue, 8 Nov 2011 19:27:13 +0000
(14:27 -0500)
committer
Benjamin Mako Hill
<mako@atdot.cc>
Tue, 8 Nov 2011 19:52:55 +0000
(14:52 -0500)
api/posts_all.php
patch
|
blob
|
history
diff --git
a/api/posts_all.php
b/api/posts_all.php
index 4f05d39e94e7f66069000d45a5fd60ca39395994..0831d9fa12c55f351d39b70dce1b897ab20b96bf 100644
(file)
--- a/
api/posts_all.php
+++ b/
api/posts_all.php
@@
-8,6
+8,9
@@
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');
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
$userservice =& ServiceFactory::getServiceInstance('UserService');
@@
-43,7
+46,7
@@
foreach($bookmarks['bookmarks'] as $row) {
$taglist = 'system:unfiled';
}
$taglist = 'system:unfiled';
}
- echo "\t<post href=\"". filter($row['bAddress'], 'xml') .'" description="'. filter($row['bTitle'], 'xml') .'" '. $description .'hash="'. md5($row['bAddress']) .'" tag="'. filter($taglist, 'xml') .'" time="'. gmdate('Y-m-d\TH:i:s\Z', strtotime($row['bDatetime'])) ."\" />\r\n";
+ echo "\t<post href=\"". filter($row['bAddress'], 'xml') .'" description="'. filter($row['bTitle'], 'xml') .'" '. $description .'hash="'. md5($row['bAddress']) .
($row['bStatus'] ? '" shared="no' : '') .
'" tag="'. filter($taglist, 'xml') .'" time="'. gmdate('Y-m-d\TH:i:s\Z', strtotime($row['bDatetime'])) ."\" />\r\n";
}
echo '</posts>';
}
echo '</posts>';
Benjamin Mako Hill
||
Want to submit a patch?