Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Roundcube Plugin Filters

Plugin that adds a new tab to the settings section to create client-side e-mail filtering.

@version 2.2.0
@version 2.2.1
@author Roberto Zarrelli <[email protected]>
@developer Artur Petrov <[email protected]>

Expand Down Expand Up @@ -118,3 +118,6 @@ History
* 2.2.0:
- Fixed error "filters have stopped working after an update from version 2.1.7 to 2.1.9" (https://github.com/6ec123321/filters/issues/46);
- Fixed error "Folder name with single quotation marks not filtered".
* 2.2.1:
- Fix design for elastic skin - thanks to nicolas-joubert (https://github.com/6ec123321/filters/pull/53).

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"keywords": ["filters","client-side","rules","spam"],
"homepage": "https://github.com/6ec123321/filters",
"license": "GNU GPLv3+",
"version": "2.2.0",
"version": "2.2.1",
"authors": [
{
"name": "Roberto Zarrelli",
Expand Down
2 changes: 1 addition & 1 deletion filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Plugin that adds a new tab to the settings section to create client-side e-mail filtering.
*
* @version 2.2.0
* @version 2.2.1
* @author Roberto Zarrelli <[email protected]>
* @developer Artur Petrov <[email protected]>
*/
Expand Down
62 changes: 44 additions & 18 deletions filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ function filters_delete(){
$this->register_handler('plugin.body', array($this, 'filters_form'));
$this->rc->output->set_pagetitle($this->gettext('filters'));

if (isset($_GET[filterid])){
$filter_id = $_GET[filterid];
if (isset($_GET['filterid'])){
$filter_id = $_GET['filterid'];
$arr_prefs = $user->get_prefs();
$arr_prefs['filters'][$filter_id] = '';
$arr_prefs['filters'] = array_diff($arr_prefs['filters'], array(''));
Expand All @@ -222,7 +222,7 @@ function filters_form(){
if (method_exists($this->rc,'imap_connect')) $this->rc->imap_connect();
else $this->rc->storage_connect();

$table = new html_table(array('cols' => 2));
$table = new html_table(array('cols' => 2, 'class' => 'propform cols-sm-6-6'));
$table->add('title', rcube_utils::rep_specialchars_output($this->gettext('whatfilter').":", 'html'));

$select = new html_select(array('name' => '_whatfilter', 'id' => 'whatfilter'));
Expand Down Expand Up @@ -310,29 +310,55 @@ function filters_form(){
}
}

$out = html::div(array('class' => 'box'),
html::div(array('id' => 'prefs-title', 'class' => 'boxtitle'), $this->gettext('filters')).
html::div(array('class' => 'boxcontent'), $table->show() .
html::p(null,
$this->rc->output->button(array(
'command' => 'plugin.filters-save',
'type' => 'input',
'class' => 'button mainaction',
'label' => 'save'
)))));
$out.= html::div(array('id' => 'prefs-title','class' => 'boxtitle'), $this->gettext('storedfilters')).
html::div(array('class' => 'uibox listbox scroller','style'=>'margin-top:250px;'),
html::div(array('class' => 'boxcontent'), $table2->show() ));
if ($this->rc->config->get('skin') == 'elastic') {
$out = html::tag('fieldset', array('class' => 'main'),
html::tag('legend', null, $this->gettext('mainoptions')).
$table->show() .
html::p(null,
$this->rc->output->button(array(
'command' => 'plugin.filters-save',
'type' => 'input',
'class' => 'button mainaction',
'label' => 'save'
))
)
);

$out.= html::tag('fieldset', array('id' => 'prefs-title', 'class' => 'boxtitle3'),
html::tag('legend', null, $this->gettext('storedfilters')).
$table2->show()
);
} else {
$out = html::div(array('class' => 'box'),
html::div(array('id' => 'prefs-title', 'class' => 'boxtitle'), $this->gettext('filters')).
html::div(array('class' => 'boxcontent'), $table->show() .
html::p(null,
$this->rc->output->button(array(
'command' => 'plugin.filters-save',
'type' => 'input',
'class' => 'button mainaction',
'label' => 'save'
)))));
$out.= html::div(array('id' => 'prefs-title','class' => 'boxtitle'), $this->gettext('storedfilters')).
html::div(array('class' => 'uibox listbox scroller','style'=>'margin-top:250px;'),
html::div(array('class' => 'boxcontent'), $table2->show() ));
}

$this->rc->output->add_gui_object('filtersform', 'filters-form');

return $this->rc->output->form_tag(array(
$form = $this->rc->output->form_tag(array(
'id' => 'filters-form',
'name' => 'filters-form',
'method' => 'post',
'class' => 'propform',
'class' => 'propform cols-sm-6-6',
'action' => './?_task=settings&_action=plugin.filters-save',
), $out);

if ($this->rc->config->get('skin') == 'elastic') {
return html::div(array('class' => 'formcontent'), $form);
} else {
return $form;
}

}

Expand Down
23 changes: 14 additions & 9 deletions localization/pl_PL.inc
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
<?php

$labels = array();
$labels['filters'] = 'Reguły filtrowania';
$labels['storedfilters'] = 'Utworzone reguły filtrowania';
$labels['whatfilter'] = 'Filtruj';
$labels['whatfilter'] = 'Jakie pole ma być filtrowane?';
$labels['searchstring'] = 'Zawiera';
$labels['moveto'] = 'Przenieś do';
$labels['from'] = 'Od';
$labels['to'] = 'Do';
$labels['cc'] = 'CC';
$labels['subject'] = 'Temat';
$labels['movefrom'] = 'Sprawdzaj w';
$labels['moveto'] = 'Przenoś do';
$labels['from'] = 'Pole "Od"';
$labels['to'] = 'Pole "Do:';
$labels['cc'] = 'Pole "CC"';
$labels['subject'] = 'Tytuł wiadomości';
$labels['delete'] = 'Usuń';
$labels['filterpriority'] = 'Nie korzystaj z pozostałych reguł';

$messages = array();
$messages['nosearchstring'] = "Pole 'Zawiera' nie może być puste.";
$messages['successfullysaved'] = "Reguła filtrowania zapisana.";
$messages['unsuccessfullysaved'] = "Błąd. Nie udało się zapisać reguły filtrowania.";
$messages['unsuccessfullysaved'] = "Wystąpił błąd. Nie udało się zapisać reguły filtrowania.";
$messages['successfullydeleted'] = "Reguła filtrowania została usunięta.";
$messages['unsuccessfullydeleted'] = "Błąd. Nie udało się usunąć reguły filtrowania.";
$messages['unsuccessfullydeleted'] = "Wystąpił błąd. Nie udało się usunąć reguły filtrowania.";
$messages['msg_if_field'] = 'Jeśli pole';
$messages['msg_contains'] = 'zawiera';
$messages['msg_move_msg_in'] = 'przenieś wiadomość do';
$messages['msg_no_stored_filters'] = "Nie ma żadnych reguł filtrowania wiadomości.";
$messages['msg_move_msg_from'] = 'od';
$messages['msg_no_stored_filters'] = "Nie ma żadnych reguł filtrowania wiadomości";

?>
5 changes: 4 additions & 1 deletion localization/pt_BR.inc
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ $labels['filters'] = 'Filtros';
$labels['storedfilters'] = 'Filtros salvos';
$labels['whatfilter'] = 'Filtro';
$labels['searchstring'] = 'Contém';
$labels['movefrom'] = 'Verificar pasta';
$labels['moveto'] = 'Mover para';
$labels['from'] = 'Remetente';
$labels['to'] = 'Destinatário';
$labels['cc'] = 'Cópia carbono';
$labels['subject'] = 'Assunto';
$labels['delete'] = 'Excluir';
$labels['filterpriority'] = 'Não aplicar outras regras';

$messages = array();
$messages['nosearchstring'] = "O campo 'Contém' não pode estar vazio.";
$messages['successfullysaved'] = "O fitro foi salvo com sucesso.";
Expand All @@ -20,7 +23,7 @@ $messages['unsuccessfullydeleted'] = "Erro: o filtro não foi excluído.";
$messages['msg_if_field'] = 'Se o campo';
$messages['msg_contains'] = 'incluir';
$messages['msg_move_msg_in'] = 'mover a mensagem para';
$messages['msg_move_msg_from'] = 'de';
$messages['msg_no_stored_filters'] = "Não existem filtros.";


?>
6 changes: 3 additions & 3 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@
<name>Roberto Zarrelli</name>
<user>-</user>
<email>[email protected]</email>
<active>yes</active>
<active>no</active>
</lead>
<lead>
<name>Artur Petrov</name>
<user>6ec123321</user>
<email>[email protected]</email>
<active>yes</active>
</lead>
<date>2019-06-19</date>
<date>2020-01-13</date>
<version>
<release>2.2.0</release>
<release>2.2.1</release>
<api>2.2.0</api>
</version>
<stability>
Expand Down