]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Merge pull request #125 from broncowdd/master
authorSébastien SAUVAGE <sebsauvage@sebsauvage.net>
Tue, 24 Sep 2013 09:03:26 +0000 (02:03 -0700)
committerSébastien SAUVAGE <sebsauvage@sebsauvage.net>
Tue, 24 Sep 2013 09:03:26 +0000 (02:03 -0700)
Added the possibility to put a description in the bookmarklet's URL

index.php

index b402eba9b2f7f006441bd8b65bc19293bf778d70..d3e105f90997352e2c4291b1e409dfb58b07c113 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1538,7 +1538,8 @@ function renderPage()
             $link_is_new = true;  // This is a new link
             $linkdate = strval(date('Ymd_His'));
             $title = (empty($_GET['title']) ? '' : $_GET['title'] ); // Get title if it was provided in URL (by the bookmarklet).
-            $description=''; $tags=''; $private=0;
+            $description = (empty($_GET['description']) ? '' : $_GET['description'] )."\n"; // Get description if it was provided in URL (by the bookmarklet). [Bronco added that]
+            $tags=''; $private=0;
             if (($url!='') && parse_url($url,PHP_URL_SCHEME)=='') $url = 'http://'.$url;
             // If this is an HTTP link, we try go get the page to extact the title (otherwise we will to straight to the edit form.)
             if (empty($title) && parse_url($url,PHP_URL_SCHEME)=='http')