2009-02-01 12:06:51 -07:00
|
|
|
# To be used from config files
|
|
|
|
fn conf_perm_redirect {
|
|
|
|
if(~ $#* 1)
|
2009-02-14 00:09:27 -07:00
|
|
|
perm_redir_to=$1
|
|
|
|
if not {
|
2009-02-01 12:06:51 -07:00
|
|
|
perm_redir_patterns=($perm_redir_patterns $1 $2)
|
2009-02-14 00:09:27 -07:00
|
|
|
conf_hide_paths $1 # XXX Will hide paths even if replacement string is the same as matched sctring.
|
|
|
|
}
|
2009-02-01 12:06:51 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
fn conf_hide_paths {
|
|
|
|
for(i in $*)
|
2009-02-20 17:04:48 -07:00
|
|
|
dirfilter=$dirfilter^'/'^`{echo $sitedir'/'$i|sed 's!/+!\\/!g'}^'/d; '
|
2009-02-01 12:06:51 -07:00
|
|
|
}
|
2009-02-07 17:22:46 -07:00
|
|
|
|
|
|
|
# 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 )
|
|
|
|
}
|