Added tags+private in shaarli URL
Manually merged pull request https://github.com/sebsauvage/Shaarli/pull/99
This commit is contained in:
parent
85c0205876
commit
3fac0a5257
1 changed files with 3 additions and 2 deletions
|
@ -1541,7 +1541,8 @@ function renderPage()
|
||||||
$linkdate = strval(date('Ymd_His'));
|
$linkdate = strval(date('Ymd_His'));
|
||||||
$title = (empty($_GET['title']) ? '' : $_GET['title'] ); // Get title if it was provided in URL (by the bookmarklet).
|
$title = (empty($_GET['title']) ? '' : $_GET['title'] ); // Get title if it was provided in URL (by the bookmarklet).
|
||||||
$description = (empty($_GET['description']) ? '' : $_GET['description'] )."\n"; // Get description if it was provided in URL (by the bookmarklet). [Bronco added that]
|
$description = (empty($_GET['description']) ? '' : $_GET['description'] )."\n"; // Get description if it was provided in URL (by the bookmarklet). [Bronco added that]
|
||||||
$tags=''; $private=0;
|
$tags = (empty($_GET['tags']) ? '' : $_GET['tags'] ); // Get tags if it was provided in URL
|
||||||
|
$private = (!empty($_GET['private']) && $_GET['private'] === "1" ? 1 : 0); // Get private if it was provided in URL
|
||||||
if (($url!='') && parse_url($url,PHP_URL_SCHEME)=='') $url = 'http://'.$url;
|
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 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')
|
if (empty($title) && parse_url($url,PHP_URL_SCHEME)=='http')
|
||||||
|
@ -1573,7 +1574,7 @@ function renderPage()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($url=='') $url='?'.smallHash($linkdate); // In case of empty URL, this is just a text (with a link that point to itself)
|
if ($url=='') $url='?'.smallHash($linkdate); // In case of empty URL, this is just a text (with a link that point to itself)
|
||||||
$link = array('linkdate'=>$linkdate,'title'=>$title,'url'=>$url,'description'=>$description,'tags'=>$tags,'private'=>0);
|
$link = array('linkdate'=>$linkdate,'title'=>$title,'url'=>$url,'description'=>$description,'tags'=>$tags,'private'=>$private);
|
||||||
}
|
}
|
||||||
|
|
||||||
$PAGE = new pageBuilder;
|
$PAGE = new pageBuilder;
|
||||||
|
|
Loading…
Reference in a new issue