aboutsummaryrefslogtreecommitdiffstats
path: root/apps/bookmarks
diff options
context:
space:
mode:
authorBrice Maron <brice@bmaron.net>2012-06-24 21:30:14 +0000
committerBrice Maron <brice@bmaron.net>2012-06-24 21:30:14 +0000
commit51d33768b84fe8467258bfe67a1f9cd7e0f0913a (patch)
treeb4a84e53ad68c1c8876f9e2c7e97186c6748b163 /apps/bookmarks
parent0fb9d0bf29a18c6fd463a4a62fcada2f473685d2 (diff)
downloadnextcloud-server-51d33768b84fe8467258bfe67a1f9cd7e0f0913a.tar.gz
nextcloud-server-51d33768b84fe8467258bfe67a1f9cd7e0f0913a.zip
Prevent errors and mini enhancement of saved window in bookmarks
Diffstat (limited to 'apps/bookmarks')
-rw-r--r--apps/bookmarks/bookmarksHelper.php3
-rw-r--r--apps/bookmarks/templates/addBm.php1
2 files changed, 3 insertions, 1 deletions
diff --git a/apps/bookmarks/bookmarksHelper.php b/apps/bookmarks/bookmarksHelper.php
index 01b551111e0..92baac2f511 100644
--- a/apps/bookmarks/bookmarksHelper.php
+++ b/apps/bookmarks/bookmarksHelper.php
@@ -90,7 +90,8 @@ function addBookmark($url, $title, $tags='') {
if(empty($title)) {
$metadata = getURLMetadata($url);
- $title = $metadata['title'];
+ if(isset($metadata['title'])) // Check for problems fetching the title
+ $title = $metadata['title'];
}
if(empty($title)) {
diff --git a/apps/bookmarks/templates/addBm.php b/apps/bookmarks/templates/addBm.php
index 534bafe5885..357e0a18f25 100644
--- a/apps/bookmarks/templates/addBm.php
+++ b/apps/bookmarks/templates/addBm.php
@@ -6,5 +6,6 @@
</head>
<body>
<div class="message"><h1>Saved!</h1></div>
+ <a href="javascript:self.close()" >Close the window</a>
</body>
</html> \ No newline at end of file