Skip to content

Add custom filter type (null filter) for manualy managed labels #8

@anonymouzz

Description

@anonymouzz

Hi,

This is dirty, but workng for me patch, that add ability to add labels manualy (without filter)


diff -r message_label-master/localization/ru_RU.inc message_label/localization/ru_RU.inc
36c36,38
< ?>
\ No newline at end of file

---
> $labels['label_null_filter'] = 'Без фильтра';
> 
> ?>
diff -r message_label-master/message_label.php message_label/message_label.php
917a918
>   $header_select->add(Q($this->gettext('label_null_filter')), 'label_null_filter');
1000c1001
<             if (!in_array($header[$i], array('subject', 'from', 'to', 'cc'))) {

---
>             if (!in_array($header[$i], array('subject', 'from', 'to', 'cc', 'label_null_filter'))) {
1008,1009c1009,1016
<             if ($input[$i] == '') {
<                 continue;

---
>       if (in_array($header[$i], array('subject', 'from', 'to', 'cc'))) {
>               if ($input[$i] == '') {
>                   continue;
>               }
>             } else {
>               if ($input[$i] == '') {
>                   $input[$i] = '-------- empty filter ---------';
>               }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions