aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorSébastien SAUVAGE <sebsauvage@sebsauvage.net>2013-09-24 11:17:22 +0200
committerSébastien SAUVAGE <sebsauvage@sebsauvage.net>2013-09-24 11:17:22 +0200
commit3fac0a52577ac0d1ac0a78fde5f5dba154a70e35 (patch)
treeabc4bd170e3d87c65d6b5bf6793120197f19db0a /index.php
parent85c02058768eb779e33524c5530d842e0513f9ce (diff)
downloadShaarli-3fac0a52577ac0d1ac0a78fde5f5dba154a70e35.tar.gz
Shaarli-3fac0a52577ac0d1ac0a78fde5f5dba154a70e35.tar.zst
Shaarli-3fac0a52577ac0d1ac0a78fde5f5dba154a70e35.zip
Added tags+private in shaarli URL
Manually merged pull request https://github.com/sebsauvage/Shaarli/pull/99
Diffstat (limited to 'index.php')
-rw-r--r--index.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/index.php b/index.php
index 9446c660..327109f0 100644
--- a/index.php
+++ b/index.php
@@ -1541,7 +1541,8 @@ function renderPage()
1541 $linkdate = strval(date('Ymd_His')); 1541 $linkdate = strval(date('Ymd_His'));
1542 $title = (empty($_GET['title']) ? '' : $_GET['title'] ); // Get title if it was provided in URL (by the bookmarklet). 1542 $title = (empty($_GET['title']) ? '' : $_GET['title'] ); // Get title if it was provided in URL (by the bookmarklet).
1543 $description = (empty($_GET['description']) ? '' : $_GET['description'] )."\n"; // Get description if it was provided in URL (by the bookmarklet). [Bronco added that] 1543 $description = (empty($_GET['description']) ? '' : $_GET['description'] )."\n"; // Get description if it was provided in URL (by the bookmarklet). [Bronco added that]
1544 $tags=''; $private=0; 1544 $tags = (empty($_GET['tags']) ? '' : $_GET['tags'] ); // Get tags if it was provided in URL
1545 $private = (!empty($_GET['private']) && $_GET['private'] === "1" ? 1 : 0); // Get private if it was provided in URL
1545 if (($url!='') && parse_url($url,PHP_URL_SCHEME)=='') $url = 'http://'.$url; 1546 if (($url!='') && parse_url($url,PHP_URL_SCHEME)=='') $url = 'http://'.$url;
1546 // 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.) 1547 // 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.)
1547 if (empty($title) && parse_url($url,PHP_URL_SCHEME)=='http') 1548 if (empty($title) && parse_url($url,PHP_URL_SCHEME)=='http')
@@ -1573,7 +1574,7 @@ function renderPage()
1573 } 1574 }
1574 } 1575 }
1575 if ($url=='') $url='?'.smallHash($linkdate); // In case of empty URL, this is just a text (with a link that point to itself) 1576 if ($url=='') $url='?'.smallHash($linkdate); // In case of empty URL, this is just a text (with a link that point to itself)
1576 $link = array('linkdate'=>$linkdate,'title'=>$title,'url'=>$url,'description'=>$description,'tags'=>$tags,'private'=>0); 1577 $link = array('linkdate'=>$linkdate,'title'=>$title,'url'=>$url,'description'=>$description,'tags'=>$tags,'private'=>$private);
1577 } 1578 }
1578 1579
1579 $PAGE = new pageBuilder; 1580 $PAGE = new pageBuilder;