mirror of
https://github.com/friendica/friendica
synced 2025-04-26 19:10:11 +00:00
Remove multi profiles feature
- Remove mod/profperm - Remove additional feature - Remove profile visibility on contact page - Remove profile list templates
This commit is contained in:
parent
d1be68b754
commit
f6f4cbab9d
18 changed files with 13 additions and 523 deletions
|
@ -16,33 +16,6 @@ use Friendica\Util\Strings;
|
|||
*/
|
||||
class ContactSelector
|
||||
{
|
||||
/**
|
||||
* @param string $current current
|
||||
* @param string $foreign_net network
|
||||
* @return string
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function profileAssign($current, $foreign_net)
|
||||
{
|
||||
$o = '';
|
||||
|
||||
$disabled = (($foreign_net) ? ' disabled="true" ' : '');
|
||||
|
||||
$o .= "<select id=\"contact-profile-selector\" class=\"form-control\" $disabled name=\"profile-assign\" >\r\n";
|
||||
|
||||
$s = DBA::select('profile', ['id', 'profile-name', 'is-default'], ['uid' => $_SESSION['uid']]);
|
||||
$r = DBA::toArray($s);
|
||||
|
||||
if (DBA::isResult($r)) {
|
||||
foreach ($r as $rr) {
|
||||
$selected = (($rr['id'] == $current || ($current == 0 && $rr['is-default'] == 1)) ? " selected=\"selected\" " : "");
|
||||
$o .= "<option value=\"{$rr['id']}\" $selected >{$rr['profile-name']}</option>\r\n";
|
||||
}
|
||||
}
|
||||
$o .= "</select>\r\n";
|
||||
return $o;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $current current
|
||||
* @param boolean $disabled optional, default false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue