]> git.mxchange.org Git - friendica.git/commitdiff
Preparation for a new variable that points to the post on the own friendica server
authorMichael Vogel <icarus@dabo.de>
Sat, 1 Mar 2014 23:47:22 +0000 (00:47 +0100)
committerMichael Vogel <icarus@dabo.de>
Sat, 1 Mar 2014 23:47:22 +0000 (00:47 +0100)
include/text.php

index 0638f9e241f3a3936b9d1f72f09407498361d5cc..9761e5fc93d60a9e39765d697e89b8df484700bf 100644 (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)
  */
 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')) {