Preparation for a new variable that points to the post on the own friendica server

This commit is contained in:
Michael Vogel 2014-03-02 00:47:22 +01:00
parent f78bdf663a
commit 9c87e00dd3
1 changed files with 11 additions and 8 deletions

View File

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