]> source.dussan.org Git - nextcloud-server.git/commitdiff
Prevent errors and mini enhancement of saved window in bookmarks
authorBrice Maron <brice@bmaron.net>
Sun, 24 Jun 2012 21:30:14 +0000 (21:30 +0000)
committerBrice Maron <brice@bmaron.net>
Sun, 24 Jun 2012 21:30:14 +0000 (21:30 +0000)
apps/bookmarks/bookmarksHelper.php
apps/bookmarks/templates/addBm.php

index 01b551111e0b8e5a50f6101b4908e0e7286ce607..92baac2f5114ba3d3d32e8d239b9e48dd74031af 100644 (file)
@@ -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)) {
index 534bafe58859d38e1870d050abc0c1ef2a069813..357e0a18f25f35514abab914f87910c8f37e5e78 100644 (file)
@@ -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