1
0
Fork 0

The friend contact block wasn't displayed in the profile

This commit is contained in:
Michael 2017-11-11 05:23:28 +00:00
parent 037d6ac17b
commit cfdbd07628
2 changed files with 11 additions and 20 deletions

View file

@ -437,10 +437,7 @@ function event_store($arr) {
function get_event_strings() { function get_event_strings() {
// First day of the week (0 = Sunday). // First day of the week (0 = Sunday).
$firstDay = PConfig::get(local_user(), 'system', 'first_day_of_week'); $firstDay = PConfig::get(local_user(), 'system', 'first_day_of_week', 0);
if ($firstDay === false) {
$firstDay = 0;
}
$i18n = array( $i18n = array(
"firstDay" => $firstDay, "firstDay" => $firstDay,

View file

@ -937,10 +937,7 @@ function contact_block() {
$o = ''; $o = '';
$a = get_app(); $a = get_app();
$shown = PConfig::get($a->profile['uid'],'system','display_friend_count'); $shown = PConfig::get($a->profile['uid'],'system','display_friend_count', 24);
if ($shown === false) {
$shown = 24;
}
if ($shown == 0) { if ($shown == 0) {
return; return;
} }
@ -1976,11 +1973,12 @@ function file_tag_update_pconfig($uid, $file_old, $file_new, $type = 'file') {
// $file_old - categories previously associated with an item // $file_old - categories previously associated with an item
// $file_new - new list of categories for an item // $file_new - new list of categories for an item
if (! intval($uid)) if (!intval($uid)) {
return false; return false;
}
if ($file_old == $file_new) if ($file_old == $file_new) {
return true; return true;
}
$saved = PConfig::get($uid,'system','filetags'); $saved = PConfig::get($uid,'system','filetags');
if (strlen($saved)) { if (strlen($saved)) {
@ -1988,8 +1986,7 @@ function file_tag_update_pconfig($uid, $file_old, $file_new, $type = 'file') {
$lbracket = '['; $lbracket = '[';
$rbracket = ']'; $rbracket = ']';
$termtype = TERM_FILE; $termtype = TERM_FILE;
} } else {
else {
$lbracket = '<'; $lbracket = '<';
$rbracket = '>'; $rbracket = '>';
$termtype = TERM_CATEGORY; $termtype = TERM_CATEGORY;
@ -2026,8 +2023,7 @@ function file_tag_update_pconfig($uid, $file_old, $file_new, $type = 'file') {
if (DBM::is_result($r)) { if (DBM::is_result($r)) {
unset($deleted_tags[$key]); unset($deleted_tags[$key]);
} } else {
else {
$filetags_updated = str_replace($lbracket . file_tag_encode($tag) . $rbracket,'',$filetags_updated); $filetags_updated = str_replace($lbracket . file_tag_encode($tag) . $rbracket,'',$filetags_updated);
} }
} }
@ -2036,9 +2032,7 @@ function file_tag_update_pconfig($uid, $file_old, $file_new, $type = 'file') {
PConfig::set($uid, 'system', 'filetags', $filetags_updated); PConfig::set($uid, 'system', 'filetags', $filetags_updated);
} }
return true; return true;
} } elseif (strlen($file_new)) {
else
if (strlen($file_new)) {
PConfig::set($uid, 'system', 'filetags', $file_new); PConfig::set($uid, 'system', 'filetags', $file_new);
} }
return true; return true;