diff options
author | Bronco <bronco@warriordudimanche.net> | 2013-09-16 10:32:02 +0200 |
---|---|---|
committer | Bronco <bronco@warriordudimanche.net> | 2013-09-16 10:32:02 +0200 |
commit | 3057373a250648a081107eb3eab530b628a576f1 (patch) | |
tree | 15487bf041ba7d32244792899ce6e86afd0fa69b /index.php | |
parent | 002ef0e5c8ed2bab38e205a5d54617780f25c3a9 (diff) | |
download | Shaarli-3057373a250648a081107eb3eab530b628a576f1.tar.gz Shaarli-3057373a250648a081107eb3eab530b628a576f1.tar.zst Shaarli-3057373a250648a081107eb3eab530b628a576f1.zip |
Added the possibility to put a description in the bookmarklet's URL
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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') |
@@ -2440,4 +2441,4 @@ if (isset($_SERVER["QUERY_STRING"]) && startswith($_SERVER["QUERY_STRING"],'do=d | |||
2440 | if (isset($_SERVER["QUERY_STRING"]) && startswith($_SERVER["QUERY_STRING"],'ws=')) { processWS(); exit; } // Webservices (for jQuery/jQueryUI) | 2441 | if (isset($_SERVER["QUERY_STRING"]) && startswith($_SERVER["QUERY_STRING"],'ws=')) { processWS(); exit; } // Webservices (for jQuery/jQueryUI) |
2441 | if (!isset($_SESSION['LINKS_PER_PAGE'])) $_SESSION['LINKS_PER_PAGE']=$GLOBALS['config']['LINKS_PER_PAGE']; | 2442 | if (!isset($_SESSION['LINKS_PER_PAGE'])) $_SESSION['LINKS_PER_PAGE']=$GLOBALS['config']['LINKS_PER_PAGE']; |
2442 | renderPage(); | 2443 | renderPage(); |
2443 | ?> \ No newline at end of file | 2444 | ?> |