- Fix bug #3384416: Use URL with protocol in bookmarklet
- Fix bug: Invalid HTML when website thumbnails are activated
- Fix bug #3413459: Thumbnails not in one line
+- Fix bug #3468293: Delicious import does not preserve private links
- Implement request #3403609: fr_CA translation update
- Implement patch #3476011: PostgreSQL tables can not be initialized
(Frédéric Fauberteau [triaxx])
/* Managing all possible inputs */
// First input is $_FILES
// Other inputs
-isset($_POST['status']) ? define('POST_STATUS', $_POST['status']): define('POST_STATUS', $GLOBALS['defaults']['privacy']);
+isset($_POST['status'])
+ ? define('POST_STATUS', $_POST['status'])
+ : define('POST_STATUS', $GLOBALS['defaults']['privacy']);
if ($userservice->isLoggedOn() && sizeof($_FILES) > 0 && $_FILES['userfile']['size'] > 0) {
}
}
xml_parser_free($xml_parser);
+ //FIXME: show errors and warnings
header('Location: '. createURL('bookmarks', $userinfo->getUsername()));
} else {
$templatename = 'importDelicious.tpl';
$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
if ($name == 'POST') {
- while(list($attrTitle, $attrVal) = each($attrs)) {
+ $newstatus = $status;
+ while (list($attrTitle, $attrVal) = each($attrs)) {
switch ($attrTitle) {
case 'HREF':
$bAddress = $attrVal;
case 'TAG':
$tags = strtolower($attrVal);
break;
+ case 'PRIVATE':
+ if ($attrVal == 'yes') {
+ $newstatus = 2;
+ }
+ break;
}
}
if ($bookmarkservice->bookmarkExists($bAddress, $userservice->getCurrentUserId())) {
$bDatetime = gmdate('Y-m-d H:i:s');
}
- if ($bookmarkservice->addBookmark($bAddress, $bTitle, $bDescription, '', $status, $tags, null, $bDatetime, true, true))
- $tplVars['msg'] = T_('Bookmark imported.');
- else
- $tplVars['error'] = T_('There was an error saving your bookmark. Please try again or contact the administrator.');
+ $res = $bookmarkservice->addBookmark(
+ $bAddress, $bTitle, $bDescription, '', $newstatus, $tags,
+ null, $bDatetime, true, true
+ );
+ if ($res) {
+ $tplVars['msg'] = T_('Bookmark imported.');
+ } else {
+ $tplVars['error'] = T_('There was an error saving your bookmark. Please try again or contact the administrator.');
+ }
}
}
+ if (!isset($depth[$parser])) {
+ $depth[$parser] = 0;
+ }
$depth[$parser]++;
}