]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Added the possibility to put a description in the bookmarklet's URL
authorBronco <bronco@warriordudimanche.net>
Mon, 16 Sep 2013 08:32:02 +0000 (10:32 +0200)
committerBronco <bronco@warriordudimanche.net>
Mon, 16 Sep 2013 08:32:02 +0000 (10:32 +0200)
index.php

index d88f471c80512583601b1d7b711ff2158ca19314..04288ace5676fc5b98c202c05256bb2b3c73d381 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')
@@ -2440,4 +2441,4 @@ if (isset($_SERVER["QUERY_STRING"]) && startswith($_SERVER["QUERY_STRING"],'do=d
 if (isset($_SERVER["QUERY_STRING"]) && startswith($_SERVER["QUERY_STRING"],'ws=')) { processWS(); exit; } // Webservices (for jQuery/jQueryUI)
 if (!isset($_SESSION['LINKS_PER_PAGE'])) $_SESSION['LINKS_PER_PAGE']=$GLOBALS['config']['LINKS_PER_PAGE'];
 renderPage();
-?>
\ No newline at end of file
+?>