- Enforce minimum elapsed time on registration form
[scuttle] / api / posts_add.php
index 77c3288179bd02a029ee89276ea385c26d0f2c89..f9e060e5806b87b728470e1065bde98c7354dfe4 100644 (file)
 // - No support for 'replace' variable
 
 // Force HTTP authentication
-require_once('httpauth.inc.php');
-require_once('../header.inc.php');
+require_once 'httpauth.inc.php';
+require_once '../header.inc.php';
 
 $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
-$userservice =& ServiceFactory::getServiceInstance('UserService');
+$userservice     =& ServiceFactory::getServiceInstance('UserService');
 
 // Get all the bookmark's passed-in information
 if (isset($_REQUEST['url']) && (trim($_REQUEST['url']) != ''))
@@ -67,17 +67,16 @@ if (isset($_REQUEST['status'])) {
 
 // Error out if there's no address or description
 if (is_null($url) || is_null($description)) {
-    $added = false;
+    $added = FALSE;
 } else {
 // We're good with info; now insert it!
     if ($bookmarkservice->bookmarkExists($url, $userservice->getCurrentUserId()))
-        $added = false;
+        $added = FALSE;
     else
-        $added = $bookmarkservice->addBookmark($url, $description, $extended, $status, $tags, $dt, true);
+        $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 '<?xml version="1.0" standalone="yes" ?'.">\r\n";
 echo '<result code="'. ($added ? 'done' : 'something went wrong') .'" />';
-?>
\ No newline at end of file

Benjamin Mako Hill || Want to submit a patch?