diff --git a/CHANGELOG b/CHANGELOG
index cd120b2df..4e88d864c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -10,9 +10,10 @@ Version 2019.06 (UNRELEASED) (2019-06-?)
General Code cleaning and restructuring [nupplaphil]
Added frio color scheme sharing [JeroenED]
Added syslog and stream Logger [nupplaphil]
+ Added collapsible panel for connector permission fields [MrPetovan]
Closed Issues:
- 6303, 6478, 6319, 6921
+ 6303, 6478, 6319, 6921, 6903
Version 2019.03 (2019-03-22)
Friendica Core:
diff --git a/doc/Addons.md b/doc/Addons.md
index 29cf22bfe..5d4be6db1 100644
--- a/doc/Addons.md
+++ b/doc/Addons.md
@@ -411,6 +411,30 @@ Hook data:
visitor => array with the contact record of the visitor
url => the query string
+### jot_networks
+Called when displaying the post permission screen.
+Hook data is a list of form fields that need to be displayed along the ACL.
+Form field array structure is:
+
+- **type**: `checkbox` or `select`.
+- **field**: Standard field data structure to be used by `field_checkbox.tpl` and `field_select.tpl`.
+
+For `checkbox`, **field** is:
+ - [0] (String): Form field name; Mandatory.
+ - [1]: (String): Form field label; Optional, default is none.
+ - [2]: (Boolean): Whether the checkbox should be checked by default; Optional, default is false.
+ - [3]: (String): Additional help text; Optional, default is none.
+ - [4]: (String): Additional HTML attributes; Optional, default is none.
+
+For `select`, **field** is:
+ - [0] (String): Form field name; Mandatory.
+ - [1] (String): Form field label; Optional, default is none.
+ - [2] (Boolean): Default value to be selected by default; Optional, default is none.
+ - [3] (String): Additional help text; Optional, default is none.
+ - [4] (Array): Associative array of options. Item key is option value, item value is option label; Mandatory.
+
+
+
## Complete list of hook callbacks
Here is a complete list of all hook callbacks with file locations (as of 24-Sep-2018). Please see the source for details of any hooks not documented above.
diff --git a/src/Core/ACL.php b/src/Core/ACL.php
index 19015714e..e6c82fd4b 100644
--- a/src/Core/ACL.php
+++ b/src/Core/ACL.php
@@ -266,14 +266,12 @@ class ACL extends BaseObject
$default_permissions = self::getDefaultUserPermissions($user);
}
- $jotnets = '';
+ $jotnets_fields = [];
if ($show_jotnets) {
- $imap_disabled = !function_exists('imap_open') || Config::get('system', 'imap_disabled');
-
$mail_enabled = false;
$pubmail_enabled = false;
- if (!$imap_disabled) {
+ if (function_exists('imap_open') && !Config::get('system', 'imap_disabled')) {
$mailacct = DBA::selectFirst('mailacct', ['pubmail'], ['`uid` = ? AND `server` != ""', local_user()]);
if (DBA::isResult($mailacct)) {
$mail_enabled = true;
@@ -283,17 +281,20 @@ class ACL extends BaseObject
if (empty($default_permissions['hidewall'])) {
if ($mail_enabled) {
- $selected = $pubmail_enabled ? ' checked="checked"' : '';
- $jotnets .= '