2) { $status = 0; } } else { switch ($status_str) { case 'private': $status = 2; break; case 'shared': $status = 1; break; default: $status = 0; break; } } } // Error out if there's no address or description if (is_null($url) || is_null($description)) { $added = FALSE; } else { // We're good with info; now insert it! if ($bookmarkservice->bookmarkExists($url, $userservice->getCurrentUserId())) $added = FALSE; else $added = $bookmarkservice->addBookmark($url, $description, $extended, $status, $tags, $dt, TRUE); } // Set up the XML file and output the result. header('Content-Type: text/xml'); echo '\r\n"; echo '';