--- /dev/null
+<?php
+/*
+Export for Google Custom Search
+*/\r
+\r
+// Force HTTP authentication first!
+require_once('httpauth.inc.php');\r
+require_once('../header.inc.php');\r
+\r
+$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');\r
+$userservice =& ServiceFactory::getServiceInstance('UserService');
+
+/*
+// Restrict to admins?
+if(!$userservice->isAdmin($userservice->getCurrentUserId())) {
+ die(T_('You are not allowed to do this action (admin access)'));
+}*/
+
+\r
+\r
+// Check to see if a tag was specified.\r
+if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != ''))\r
+ $tag = trim($_REQUEST['tag']);\r
+else\r
+ $tag = NULL;\r
+\r
+// Get the posts relevant to the passed-in variables.\r
+$bookmarks =& $bookmarkservice->getBookmarks(0, NULL, NULL, $tag, NULL, getSortOrder());\r
+\r
+$currentuser = $userservice->getCurrentUser();\r
+$currentusername = $currentuser[$userservice->getFieldName('username')];\r
+\r
+// Set up the plain file and output all the posts.\r
+header('Content-Type: text/plain');\r\r
+foreach($bookmarks['bookmarks'] as $row) {\r
+ echo $row['bAddress']."\n";\r
+}\r
+\r
+\r\r
+?>\r