aboutsummaryrefslogtreecommitdiffstats
path: root/mod/settings.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-01-23 21:15:40 -0800
committerfriendica <info@friendica.com>2013-01-23 21:15:40 -0800
commit6e6b268e2523d95624361d29a8bd80b1133aa627 (patch)
tree95c01140f753fe42f0031064597b12c7dc297835 /mod/settings.php
parentc1a5c88720cf00a041ac4838c4e799ee53933ae9 (diff)
downloadvolse-hubzilla-6e6b268e2523d95624361d29a8bd80b1133aa627.tar.gz
volse-hubzilla-6e6b268e2523d95624361d29a8bd80b1133aa627.tar.bz2
volse-hubzilla-6e6b268e2523d95624361d29a8bd80b1133aa627.zip
auto permissions (such as for forums or whatever) - untested but might just work
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' => ''
+ ),
+
);