mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 03:35:13 +00:00
allow site defaults for enabled features
This commit is contained in:
parent
f90b3b60cb
commit
0948c3c3ca
2 changed files with 3 additions and 1 deletions
|
@ -7,6 +7,8 @@
|
|||
|
||||
function feature_enabled($uid,$feature) {
|
||||
$x = get_pconfig($uid,'feature',$feature);
|
||||
if($x === false)
|
||||
$x = get_config('feature',$feature);
|
||||
$arr = array('uid' => $uid, 'feature' => $feature, 'enabled' => $x);
|
||||
call_hooks('feature_enabled',$arr);
|
||||
return($arr['enabled']);
|
||||
|
|
|
@ -635,7 +635,7 @@ function settings_content(&$a) {
|
|||
$arr[$fname] = array();
|
||||
$arr[$fname][0] = $fdata[0];
|
||||
foreach(array_slice($fdata,1) as $f) {
|
||||
$arr[$fname][1][] = array('feature_' .$f[0],$f[1],((intval(get_pconfig(local_user(),'feature',$f[0]))) ? "1" : ''),$f[2],array(t('Off'),t('On')));
|
||||
$arr[$fname][1][] = array('feature_' .$f[0],$f[1],((intval(feature_enabled(local_user(),$f[0]))) ? "1" : ''),$f[2],array(t('Off'),t('On')));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue