Merge pull request #919 from annando/master

plink, disabling features, triming the content of parsed urls
This commit is contained in:
tobiasd 2014-03-02 08:31:03 +01:00
commit d29c981aa2
10 changed files with 121 additions and 78 deletions

View file

@ -1612,16 +1612,19 @@ if(! function_exists('get_plink')) {
* @return boolean|array False if item has not plink, otherwise array('href'=>plink url, 'title'=>translated title)
*/
function get_plink($item) {
$a = get_app();
if (x($item,'plink') && ($item['private'] != 1)) {
return array(
'href' => $item['plink'],
$a = get_app();
$ret = array(
'href' => $a->get_baseurl()."/display/".$a->user['nickname']."/".$item['id'],
'title' => t('link to source'),
);
}
else {
return false;
}
$ret["orig"] = $ret["href"];
//if (x($item,'plink') && ($item['private'] != 1))
if (x($item,'plink'))
$ret["href"] = $item['plink'];
return($ret);
}}
if(! function_exists('unamp')) {