Skip to content
Snippets Groups Projects
Commit 45b320d6 authored by Georg Ehrke's avatar Georg Ehrke
Browse files

use unnamed as title for a bookmark if no title was entered and curl fails

parent 7cad6ccc
No related branches found
No related tags found
No related merge requests found
......@@ -71,7 +71,7 @@ function getURLMetadata($url) {
return $metadata;
}
function addBookmark($url, $title='', $tags='') {
function addBookmark($url, $title, $tags='') {
$CONFIG_DBTYPE = OC_Config::getValue( "dbtype", "sqlite" );
if( $CONFIG_DBTYPE == 'sqlite' or $CONFIG_DBTYPE == 'sqlite3' ){
$_ut = "strftime('%s','now')";
......@@ -93,6 +93,11 @@ function addBookmark($url, $title='', $tags='') {
$title = $metadata['title'];
}
if(empty($title)) {
$l = new OC_L10N('bookmarks');
$title = $l->t('unnamed');
}
$params=array(
htmlspecialchars_decode($url),
htmlspecialchars_decode($title),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment