X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fprofile.php;h=5dd8293c7fd0613d083f6b93dfcbb5a5f4df502e;hb=da30538a980264da72a7c370013e60b2cb55aafa;hp=28b508dc0e7b25ee0e9f90a4e6cf72041d022c05;hpb=9b6ad2fc4754185708d00d3be4c4a2aebcb73e7e;p=friendica.git
diff --git a/mod/profile.php b/mod/profile.php
index 28b508dc0e..5dd8293c7f 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -4,7 +4,7 @@ require_once('include/contact_widgets.php');
require_once('include/redir.php');
-function profile_init(App &$a) {
+function profile_init(App $a) {
if(! x($a->page,'aside'))
$a->page['aside'] = '';
@@ -41,14 +41,15 @@ function profile_init(App &$a) {
if((x($a->profile,'page-flags')) && ($a->profile['page-flags'] == PAGE_COMMUNITY)) {
$a->page['htmlhead'] .= '';
}
- if(x($a->profile,'openidserver'))
+ if (x($a->profile,'openidserver')) {
$a->page['htmlhead'] .= '' . "\r\n";
- if(x($a->profile,'openid')) {
+ }
+ if (x($a->profile,'openid')) {
$delegate = ((strstr($a->profile['openid'],'://')) ? $a->profile['openid'] : 'https://' . $a->profile['openid']);
$a->page['htmlhead'] .= '' . "\r\n";
}
// site block
- if((! $blocked) && (! $userblock)) {
+ if ((! $blocked) && (! $userblock)) {
$keywords = ((x($a->profile,'pub_keywords')) ? $a->profile['pub_keywords'] : '');
$keywords = str_replace(array('#',',',' ',',,'),array('',' ',',',','),$keywords);
if(strlen($keywords))
@@ -62,11 +63,7 @@ function profile_init(App &$a) {
header('Link: <' . App::get_baseurl() . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false);
$dfrn_pages = array('request', 'confirm', 'notify', 'poll');
-<<<<<<< upstream/develop
foreach ($dfrn_pages as $dfrn) {
-=======
- foreach($dfrn_pages as $dfrn) {
->>>>>>> HEAD~65
$a->page['htmlhead'] .= "\r\n";
}
$a->page['htmlhead'] .= "\r\n";
@@ -74,7 +71,7 @@ function profile_init(App &$a) {
}
-function profile_content(&$a, $update = 0) {
+function profile_content(App $a, $update = 0) {
$category = $datequery = $datequery2 = '';
@@ -85,6 +82,7 @@ function profile_content(&$a, $update = 0) {
$datequery2 = escape_tags($a->argv[$x]);
} else {
$datequery = escape_tags($a->argv[$x]);
+ }
} else {
$category = $a->argv[$x];
}
@@ -113,10 +111,8 @@ function profile_content(&$a, $update = 0) {
if ($update) {
// Ensure we've got a profile owner if updating.
$a->profile['profile_uid'] = $update;
- } else {
- if ($a->profile['profile_uid'] == local_user()) {
- nav_set_selected('home');
- }
+ } elseif ($a->profile['profile_uid'] == local_user()) {
+ nav_set_selected('home');
}
$contact = null;
@@ -160,12 +156,12 @@ function profile_content(&$a, $update = 0) {
}
if (! $update) {
- if (x($_GET,'tab'))
+ if (x($_GET,'tab')) {
$tab = notags(trim($_GET['tab']));
+ }
$o.=profile_tabs($a, $is_owner, $a->profile['nickname']);
-
if ($tab === 'profile') {
$o .= advanced_profile($a);
call_hooks('profile_advanced',$o);
@@ -203,14 +199,12 @@ function profile_content(&$a, $update = 0) {
$o .= status_editor($a,$x);
}
-
}
/**
* Get permissions SQL - if $remote_contact is true, our remote user has been pre-verified and we already have fetched his/her groups
*/
-
$sql_extra = item_permissions_sql($a->profile['profile_uid'],$remote_contact,$groups);