a different (hopefully better) implementation of affinity presets, but not for 3.0 because strings have changed.
This commit is contained in:
@@ -17,12 +17,8 @@ class Featured {
|
||||
$cmin = intval($_POST['affinity_cmin']);
|
||||
if($cmin < 0 || $cmin > 99)
|
||||
$cmin = 0;
|
||||
if($cmin !== 0 || $cmax !== 99) {
|
||||
set_pconfig(local_channel(),'system','network_page_default','cmin=' . $cmin . '&cmax=' . $cmax);
|
||||
}
|
||||
else {
|
||||
set_pconfig(local_channel(),'system','network_page_default','');
|
||||
}
|
||||
set_pconfig(local_channel(),'affinity','cmin',$cmin);
|
||||
set_pconfig(local_channel(),'affinity','cmax',$cmax);
|
||||
|
||||
info( t('Affinity Slider settings updated.') . EOL);
|
||||
|
||||
@@ -46,12 +42,12 @@ class Featured {
|
||||
$cmax = intval(get_pconfig(local_channel(),'affinity','cmax'));
|
||||
$cmax = (($cmax) ? $cmax : 99);
|
||||
$setting_fields .= replace_macros(get_markup_template('field_input.tpl'), array(
|
||||
'$field' => array('affinity_cmax', t('Default maximum affinity level'), $cmax, '')
|
||||
'$field' => array('affinity_cmax', t('Default maximum affinity level'), $cmax, t('0-99 default 99'))
|
||||
));
|
||||
$cmin = intval(get_pconfig(local_channel(),'affinity','cmin'));
|
||||
$cmin = (($cmin) ? $cmin : 0);
|
||||
$setting_fields .= replace_macros(get_markup_template('field_input.tpl'), array(
|
||||
'$field' => array('affinity_cmin', t('Default minimum affinity level'), $cmin, '')
|
||||
'$field' => array('affinity_cmin', t('Default minimum affinity level'), $cmin, t('0-99 - default 0'))
|
||||
));
|
||||
|
||||
$settings_addons .= replace_macros(get_markup_template('generic_addon_settings.tpl'), array(
|
||||
|
||||
Reference in New Issue
Block a user