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