Add conf_enable_app to add items to $enabled_apps, used from conf_enable_xxx functions so one doesn't need to both add stuff to $eanbled_apps and then call conf_enable_xxx, and to avoid enabling the same app twice.
New conf_enable_wiki function to follow the interface of other apps.
This commit is contained in:
parent
fe5c67da46
commit
7151777d9b
4 changed files with 17 additions and 1 deletions
|
|
@ -3,6 +3,7 @@ fn conf_enable_blog {
|
|||
blagh_dirs=$*
|
||||
if(~ $#blagh_dirs 0)
|
||||
blagh_dirs=( . )
|
||||
conf_enable_app blagh
|
||||
}
|
||||
|
||||
fn blagh_init {
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ fn conf_enable_comments {
|
|||
}
|
||||
enable_comments=yes
|
||||
groups_allowed_comments=$*
|
||||
conf_enable_app bridge
|
||||
}
|
||||
|
||||
fn bridge_init {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,12 @@
|
|||
fn conf_enable_wiki {
|
||||
enable_wiki=yes
|
||||
wiki_editors_group=$*
|
||||
conf_enable_app dirdir
|
||||
}
|
||||
|
||||
|
||||
fn dirdir_init {
|
||||
if(! ~ $#enable_wiki 0 && check_user $wiki_editors_group admin) {
|
||||
if(! ~ $#enable_wiki 0 && check_user $wiki_editors_group) {
|
||||
if(test -f $local_path.md)
|
||||
ll_add handlers_bar_left dirdir_controls
|
||||
|
||||
|
|
|
|||
|
|
@ -10,3 +10,10 @@ fn conf_hide_paths {
|
|||
for(i in $*)
|
||||
dirfilter=$dirfilter^'/'^`{echo $i|sed 's!/!\\/!g'}^'/d; '
|
||||
}
|
||||
|
||||
# Usually will be called from within conf_enable_foo
|
||||
fn conf_enable_app {
|
||||
# Note: maybe we should add test -d apps/$1/?
|
||||
if(! ~ $1 $enabled_apps)
|
||||
enabled_apps=( $enabled_apps $1 )
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue