Fix unused code in include

- Fix local formatting
- Remove unused variable
- Fix unreached breaks
- Remove commented out code
- Add some documentation
This commit is contained in:
Hypolite Petovan 2018-01-03 21:12:19 -05:00
parent 722782d553
commit 3b23f89ca2
24 changed files with 379 additions and 419 deletions

View file

@ -230,7 +230,6 @@ function profile_sidebar($profile, $block = 0, $show_connect = true)
$o = '';
$location = false;
$address = false;
// This function can also use contact information in $profile
$is_contact = x($profile, 'cid');
@ -381,7 +380,7 @@ function profile_sidebar($profile, $block = 0, $show_connect = true)
$xmpp = x($profile, 'xmpp') ? t('XMPP:') : false;
if ((x($profile, 'hidewall') || $block) && !local_user() && !remote_user()) {
$location = $pdesc = $gender = $marital = $homepage = $about = false;
$location = $gender = $marital = $homepage = $about = false;
}
$split_name = Diaspora::splitName($profile['name']);
@ -551,10 +550,8 @@ function get_birthdays()
$cids[] = $rr['cid'];
$today = (((strtotime($rr['start'] . ' +00:00') < $now) && (strtotime($rr['finish'] . ' +00:00') > $now)) ? true : false);
$sparkle = '';
$url = $rr['url'];
if ($rr['network'] === NETWORK_DFRN) {
$sparkle = ' sparkle';
$url = System::baseUrl() . '/redir/' . $rr['cid'];
}