Skip to content

Instantly share code, notes, and snippets.

@sporkman
Created January 18, 2015 23:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sporkman/439a97a6c9d09ff32e33 to your computer and use it in GitHub Desktop.
Save sporkman/439a97a6c9d09ff32e33 to your computer and use it in GitHub Desktop.
363c363,365
<
---
> // BWAY spam days
> if (rcube_find_object('rcmfd_spamdays'))
> rcube_find_object('rcmfd_spamdays').selectedIndex = 0;
559c561
< });
\ No newline at end of file
---
> });
184c184,186
<
---
> // BWAY - spam-days save
> //if (!isset($no_override['x-spam-days']) && !empty($_POST['_spamdays']))
> $new_prefs['x-spam-days'] = rcube_utils::get_input_value('_spamdays', rcube_utils::INPUT_POST);
427a430
> $input_spamthres->add("Disable filter", '1000');
448a452,479
> // BWAY spam days
> if (!isset($no_override['x-spam-days'])) {
> $field_id = 'rcmfd_spamdays';
> $input_spamdays = new html_select(array('name' => '_spamdays', 'id' => $field_id));
>
> $decPlaces = 0;
> if ($rcmail->config->get('sauserprefs_spamdays_inc') - (int)$rcmail->config->get('sauserprefs_spamdays_inc') > 0)
> $decPlaces = strlen($rcmail->config->get('sauserprefs_spamdays_inc') - (int)$rcmail->config->get('sauserprefs_spamdays_inc')) - 2;
>
> $days_found = false;
> for ($i = 1; $i <= 14; $i = $i + $rcmail->config->get('sauserprefs_score_inc')) {
> $input_spamdays->add(number_format($i, $decPlaces, $locale_info['decimal_point'], ''), number_format($i, $decPlaces, '.', ''));
>
> if (!$days_found && $this->user_prefs['x-spam-days'] && (float)$this->user_prefs['x-spam-days'] == (float)$i)
> $days_found = true;
> }
>
> if (!$days_found && $this->user_prefs['x-spam-days'])
> $input_spamdays->add(str_replace('%s', $this->user_prefs['x-spam-days'], $this->gettext('otherdays')), (float)$this->user_prefs['x-spam-days']);
>
> $table->add('title', html::label($field_id, rcmail::Q($this->gettext('days'))));
> $table->add(null, $input_spamdays->show(number_format($this->user_prefs['x-spam-days'], $decPlaces, '.', '')));
> $table->add(array('colspan' => 2), rcmail::Q($this->gettext('daysexp')));
> }
>
>
>
> $days_found = false;
> for ($i = 1; $i <= 14; $i = $i + $rcmail->config->get('sauserprefs_score_inc')) {
> $input_spamdays->add(number_format($i, $decPlaces, $locale_info['decimal_point'], ''), number_format($i, $decPlaces, '.', ''));
>
> if (!$days_found && $this->user_prefs['x-spam-days'] && (float)$this->user_prefs['x-spam-days'] == (float)$i)
> $days_found = true;
> }
>
> if (!$days_found && $this->user_prefs['x-spam-days'])
> $input_spamdays->add(str_replace('%s', $this->user_prefs['x-spam-days'], $this->gettext('otherdays')), (float)$this->user_prefs['x-spam-days']);
>
> $table->add('title', html::label($field_id, rcmail::Q($this->gettext('days'))));
> $table->add(null, $input_spamdays->show(number_format($this->user_prefs['x-spam-days'], $decPlaces, '.', '')));
> $table->add(array('colspan' => 2), rcmail::Q($this->gettext('daysexp')));
> }
>
>
>
926c957
< ?>
\ No newline at end of file
---
> ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment