aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSébastien SAUVAGE <sebsauvage@sebsauvage.net>2013-09-24 02:03:26 -0700
committerSébastien SAUVAGE <sebsauvage@sebsauvage.net>2013-09-24 02:03:26 -0700
commitc4bbb010643c265131f9b0c1aba76f3b12561c06 (patch)
tree17aec89ed8e79ab9f15a0f029365e1f6ae74d0bc
parentfdc3c114d1617578e388147af138e8470d7b20b3 (diff)
parent3057373a250648a081107eb3eab530b628a576f1 (diff)
downloadShaarli-c4bbb010643c265131f9b0c1aba76f3b12561c06.tar.gz
Shaarli-c4bbb010643c265131f9b0c1aba76f3b12561c06.tar.zst
Shaarli-c4bbb010643c265131f9b0c1aba76f3b12561c06.zip
Merge pull request #125 from broncowdd/master
Added the possibility to put a description in the bookmarklet's URL
-rw-r--r--index.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/index.php b/index.php
index b402eba9..d3e105f9 100644
--- a/index.php
+++ b/index.php
@@ -1538,7 +1538,8 @@ function renderPage()
1538 $link_is_new = true; // This is a new link 1538 $link_is_new = true; // This is a new link
1539 $linkdate = strval(date('Ymd_His')); 1539 $linkdate = strval(date('Ymd_His'));
1540 $title = (empty($_GET['title']) ? '' : $_GET['title'] ); // Get title if it was provided in URL (by the bookmarklet). 1540 $title = (empty($_GET['title']) ? '' : $_GET['title'] ); // Get title if it was provided in URL (by the bookmarklet).
1541 $description=''; $tags=''; $private=0; 1541 $description = (empty($_GET['description']) ? '' : $_GET['description'] )."\n"; // Get description if it was provided in URL (by the bookmarklet). [Bronco added that]
1542 $tags=''; $private=0;
1542 if (($url!='') && parse_url($url,PHP_URL_SCHEME)=='') $url = 'http://'.$url; 1543 if (($url!='') && parse_url($url,PHP_URL_SCHEME)=='') $url = 'http://'.$url;
1543 // 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.) 1544 // 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.)
1544 if (empty($title) && parse_url($url,PHP_URL_SCHEME)=='http') 1545 if (empty($title) && parse_url($url,PHP_URL_SCHEME)=='http')