Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F727115
D210.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Jan 6, 7:00 AM
Size
1 KB
Mime Type
text/x-diff
Expires
Tue, Jan 7, 7:00 AM (3 d, 28 m ago)
Engine
blob
Format
Raw Data
Handle
537177
Attached To
D210: INP-1546 - Make "user-profile:Field" tag support fields of any type
D210.diff
View Options
Index: branches/5.2.x/core/units/user_profile/user_profile_tp.php
===================================================================
--- branches/5.2.x/core/units/user_profile/user_profile_tp.php
+++ branches/5.2.x/core/units/user_profile/user_profile_tp.php
@@ -39,24 +39,26 @@
}
if ( $user_field ) {
- // Determine if field should be shown on "Public Profile" page.
+ // Determine if field should be shown on "Public Profile" page (always checkbox).
$block_params = array('name' => 'DisplayToPublic', 'value' => $user_field);
$selected = $this->Application->ProcessParsedTag(
$this->getUserPrefixSpecial(),
'Selected',
$block_params
);
+ $value = $selected ? 1 : 0;
}
else {
- // New user-defined public profile field - fallback to persistent session storage.
- $selected = $this->recallUserProfileVar($field) == 1;
+ // Custom user preference (can by field of any type) - fallback to persistent session storage.
+ $value = $this->recallUserProfileVar($field);
+ $selected = $value == 1;
}
if ( isset($params['checked']) && $params['checked'] ) {
return $selected ? 'checked' : '';
}
- return $selected ? 1 : 0;
+ return $value;
}
/**
Event Timeline
Log In to Comment