aboutsummaryrefslogtreecommitdiffstats
path: root/mod/settings.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/settings.php')
-rw-r--r--mod/settings.php21
1 files changed, 20 insertions, 1 deletions
diff --git a/mod/settings.php b/mod/settings.php
index d75fe3043..c1380e159 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -14,16 +14,29 @@ function get_theme_config_file($theme){
return null;
}
-function settings_init(&$a) {
+function settings_aside(&$a) {
// default is channel settings in the absence of other arguments
if(argc() == 1) {
+ // We are setting these values - don't use the argc(), argv() functions here
$a->argc = 2;
$a->argv[] = 'channel';
}
+ $abook_self_id = 0;
+
+ // Retrieve the 'self' address book entry for use in the auto-permissions link
+ if(local_user()) {
+ $abk = q("select abook_id from abook where abook_channel = %d and ( abook_flags & %d ) limit 1",
+ intval(local_user()),
+ intval(ABOOK_FLAG_SELF)
+ );
+ if($abk)
+ $abook_self_id = $abk[0]['abook_id'];
+ }
+
$tabs = array(
array(
@@ -74,6 +87,12 @@ function settings_init(&$a) {
// 'selected' => ''
// ),
+ array(
+ 'label' => t('Automatic Permissions (Advanced)'),
+ 'url' => $a->get_baseurl(true) . '/connections/' . $abook_self_id,
+ 'selected' => ''
+ ),
+
);