2010-07-12 21:00:58 -04:00
|
|
|
<?php
|
2016-01-24 13:56:23 -05:00
|
|
|
/**
|
|
|
|
* @file include/acl_selectors.php
|
|
|
|
*/
|
2018-02-04 19:23:49 -05:00
|
|
|
|
2017-04-30 00:07:00 -04:00
|
|
|
use Friendica\App;
|
2018-02-25 19:45:32 -05:00
|
|
|
use Friendica\Core\Acl;
|
2017-12-07 09:04:24 -05:00
|
|
|
use Friendica\Model\Contact;
|
2017-04-30 00:07:00 -04:00
|
|
|
|
2017-04-08 13:20:01 -04:00
|
|
|
require_once "mod/proxy.php";
|
2013-01-26 14:52:21 -05:00
|
|
|
|
2017-11-15 09:47:28 -05:00
|
|
|
function contact_selector($selname, $selclass, $options, $preselected = false)
|
|
|
|
{
|
2018-02-25 19:45:32 -05:00
|
|
|
return Acl::getSuggestContactSelectHTML($selname, $selclass, $options, defaults($preselected, []));
|
2011-06-24 00:55:27 -04:00
|
|
|
}
|
|
|
|
|
2012-03-16 13:45:07 -04:00
|
|
|
function contact_select($selname, $selclass, $preselected = false, $size = 4, $privmail = false, $celeb = false, $privatenet = false, $tabindex = null) {
|
2018-02-25 19:45:32 -05:00
|
|
|
return Acl::getMessageContactSelectHTML($selname, $selclass, defaults($preselected, []), $size, $privmail, $celeb, $privatenet, $tabindex);
|
2010-08-08 02:54:22 -04:00
|
|
|
}
|
2010-07-12 21:00:58 -04:00
|
|
|
|
2012-12-14 00:02:14 -05:00
|
|
|
function prune_deadguys($arr) {
|
2018-02-25 19:45:32 -05:00
|
|
|
Contact::pruneUnavailable($arr);
|
|
|
|
return $arr;
|
2012-12-14 00:02:14 -05:00
|
|
|
}
|
|
|
|
|
2013-01-26 14:52:21 -05:00
|
|
|
function get_acl_permissions($user = null) {
|
2018-02-25 19:45:32 -05:00
|
|
|
return Acl::getDefaultUserPermissions($user);
|
2013-01-26 14:52:21 -05:00
|
|
|
}
|
|
|
|
|
2015-06-26 09:13:52 -04:00
|
|
|
function populate_acl($user = null, $show_jotnets = false) {
|
2018-02-25 19:45:32 -05:00
|
|
|
return Acl::getFullSelectorHTML($user, $show_jotnets);
|
2010-08-16 08:23:26 -04:00
|
|
|
}
|
|
|
|
|
2017-01-09 07:09:01 -05:00
|
|
|
function navbar_complete(App $a) {
|
2018-02-11 16:13:29 -05:00
|
|
|
$search = notags(trim($_REQUEST['search']));
|
2016-07-11 04:33:39 -04:00
|
|
|
$mode = $_REQUEST['smode'];
|
2016-01-24 13:56:23 -05:00
|
|
|
|
2018-02-25 19:45:32 -05:00
|
|
|
return Acl::contactAutocomplete($search, $mode);
|
2016-04-14 11:05:19 -04:00
|
|
|
}
|