X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fprofile.php;h=cc0debd992324ec59bc55cbb7b4c24c1e6c9ee1e;hb=bf60ec070bb5af0eb1d37772cfdacda4f9c39a19;hp=a5f440f434356bf0940f2e494d0947c65e558443;hpb=68868fd74bbc6a6f2268b6c5467ccf9e025af011;p=friendica.git
diff --git a/mod/profile.php b/mod/profile.php
index a5f440f434..cc0debd992 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -18,38 +18,19 @@ function profile_init(&$a) {
profile_load($a,$which,$profile);
- if (!get_config('system','no_openid') && $a->profile['openid']!=""){
- if (!isset($a->profile['openidserver'])){
- logger('friendika user table must be updated. `openidserver` field is missing');
- } else {
- if ($a->profile['openidserver']==''){
- require_once('library/openid.php');
- $openid = new LightOpenID;
- $openid->identity = $a->profile['openid'];
- $a->profile['openidserver'] = $openid->discover($openid->identity);
-
- q("UPDATE `user` SET `openidserver` = '%s' WHERE `uid` = %d LIMIT 1",
- dbesc($a->profile['openidserver']),
- intval($a->profile['uid'])
- );
- }
-
-
- $a->page['htmlhead'] .= ''. "\r\n";
- $a->page['htmlhead'] .= ''. "\r\n";
- }
-
+ if(x($a->profile,'openidserver'))
+ $a->page['htmlhead'] .= '' . "\r\n";
+ if(x($a->profile,'openid')) {
+ $delegate = ((strstr($a->profile['openid'],'://')) ? $a->profile['openid'] : 'http://' . $a->profile['openid']);
+ $a->page['htmlhead'] .= '' . "\r\n";
}
-
-
$a->page['htmlhead'] .= '' . "\r\n" ;
$a->page['htmlhead'] .= '' . "\r\n" ;
$uri = urlencode('acct:' . $a->profile['nickname'] . '@' . $a->get_hostname() . (($a->path) ? '/' . $a->path : ''));
$a->page['htmlhead'] .= '' . "\r\n";
header('Link: <' . $a->get_baseurl() . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false);
-
-
+
$dfrn_pages = array('request', 'confirm', 'notify', 'poll');
foreach($dfrn_pages as $dfrn)
$a->page['htmlhead'] .= "get_baseurl()."/dfrn_{$dfrn}/{$which}\" />\r\n";
@@ -361,7 +342,7 @@ function profile_content(&$a, $update = 0) {
if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0)
$indent .= ' shiny';
- $o .= replace_macros($template,array(
+ $tmp_item = replace_macros($template,array(
'$id' => $item['item_id'],
'$profile_url' => $profile_link,
'$name' => $profile_name,
@@ -379,6 +360,11 @@ function profile_content(&$a, $update = 0) {
'$dislike' => $dislike,
'$comment' => $comment
));
+
+ $arr = array('item' => $item, 'output' => $tmp_item);
+ call_hooks('display_item', $arr);
+
+ $o .= $arr['output'];
}
}