diff --git a/dev/Common/Enums.js b/dev/Common/Enums.js index 3c3b43f06..be5c9a72a 100644 --- a/dev/Common/Enums.js +++ b/dev/Common/Enums.js @@ -32,7 +32,6 @@ export const Capa = { Themes: 'THEMES', UserBackground: 'USER_BACKGROUND', Sieve: 'SIEVE', - Filters: 'FILTERS', AttachmentThumbnails: 'ATTACHMENT_THUMBNAILS', Templates: 'TEMPLATES', AutoLogout: 'AUTOLOGOUT', diff --git a/dev/Model/Filter.js b/dev/Model/Filter.js index 91d99f8fb..8ab6ca988 100644 --- a/dev/Model/Filter.js +++ b/dev/Model/Filter.js @@ -236,7 +236,7 @@ export class FilterModel extends AbstractModel { ); } - filter.actionKeep(1 == json.Keep); + filter.actionKeep(0 != json.Keep); filter.actionNoStop(0 == json.Stop); filter.actionMarkAsRead(1 == json.MarkAsRead); } diff --git a/dev/Stores/Admin/Capa.js b/dev/Stores/Admin/Capa.js index a16deed85..bab13d08d 100644 --- a/dev/Stores/Admin/Capa.js +++ b/dev/Stores/Admin/Capa.js @@ -8,8 +8,6 @@ export const CapaAdminStore = { this.additionalAccounts(capa(Capa.AdditionalAccounts)); this.identities(capa(Capa.Identities)); this.attachmentThumbnails(capa(Capa.AttachmentThumbnails)); - this.sieve(capa(Capa.Sieve)); - this.filters(capa(Capa.Filters)); this.themes(capa(Capa.Themes)); this.userBackground(capa(Capa.UserBackground)); this.openPGP(capa(Capa.OpenPGP)); @@ -23,8 +21,6 @@ ko.addObservablesTo(CapaAdminStore, { additionalAccounts: false, identities: false, attachmentThumbnails: false, - sieve: false, - filters: false, themes: true, userBackground: false, openPGP: false, diff --git a/dev/View/Popup/Domain.js b/dev/View/Popup/Domain.js index 03d674491..bb14cd2c3 100644 --- a/dev/View/Popup/Domain.js +++ b/dev/View/Popup/Domain.js @@ -2,8 +2,6 @@ import { StorageResultType, Notification } from 'Common/Enums'; import { pInt, pString } from 'Common/Utils'; import { i18n } from 'Common/Translator'; -import { CapaAdminStore } from 'Stores/Admin/Capa'; - import Remote from 'Remote/Admin/Fetch'; import { decorateKoCommands } from 'Knoin/Knoin'; @@ -56,8 +54,6 @@ class DomainPopupView extends AbstractViewPopup { }); this.addComputables({ - allowSieve: () => CapaAdminStore.filters() && CapaAdminStore.sieve(), - headerText: () => { const name = this.name(), aliasName = this.aliasName(); @@ -85,14 +81,13 @@ class DomainPopupView extends AbstractViewPopup { domainIsComputed: () => { const usePhpMail = this.smtpPhpMail(), - allowSieve = this.allowSieve(), useSieve = this.useSieve(); return ( this.name() && this.imapServer() && this.imapPort() && - (allowSieve && useSieve ? this.sieveServer() && this.sievePort() : true) && + (useSieve ? this.sieveServer() && this.sievePort() : true) && ((this.smtpServer() && this.smtpPort()) || usePhpMail) ); }, diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php index 54323ab86..5afcafd47 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php @@ -2077,11 +2077,8 @@ class Actions $aResult[] = Enumerations\Capa::OPEN_PGP; } - if ($oConfig->Get('capa', 'filters', false)) { - $aResult[] = Enumerations\Capa::FILTERS; - if ($bAdmin || ($oAccount && $oAccount->Domain()->UseSieve())) { - $aResult[] = Enumerations\Capa::SIEVE; - } + if ($bAdmin || ($oAccount && $oAccount->Domain()->UseSieve())) { + $aResult[] = Enumerations\Capa::SIEVE; } } diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Filters.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Filters.php index 3080d02de..48890542a 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Filters.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Filters.php @@ -18,22 +18,11 @@ trait Filters { $oAccount = $this->getAccountFromToken(); - if (!$this->GetCapa(false, Capa::FILTERS, $oAccount)) + if (!$this->GetCapa(false, Capa::SIEVE, $oAccount)) { return $this->FalseResponse(__FUNCTION__); } - $aFakeFilters = null; - - $this->Plugins() - ->RunHook('filter.filters-fake', array($oAccount, &$aFakeFilters)) - ; - - if ($aFakeFilters) - { - return $this->DefaultResponse(__FUNCTION__, $aFakeFilters); - } - return $this->DefaultResponse(__FUNCTION__, $this->FiltersProvider()->Load($oAccount)); } @@ -44,7 +33,7 @@ trait Filters { $oAccount = $this->getAccountFromToken(); - if (!$this->GetCapa(false, Capa::FILTERS, $oAccount)) { + if (!$this->GetCapa(false, Capa::SIEVE, $oAccount)) { return $this->FalseResponse(__FUNCTION__); } @@ -79,7 +68,7 @@ trait Filters { $oAccount = $this->getAccountFromToken(); - if (!$this->GetCapa(false, Capa::FILTERS, $oAccount)) { + if (!$this->GetCapa(false, Capa::SIEVE, $oAccount)) { return $this->FalseResponse(__FUNCTION__); } @@ -95,7 +84,7 @@ trait Filters { $oAccount = $this->getAccountFromToken(); - if (!$this->GetCapa(false, Capa::FILTERS, $oAccount)) { + if (!$this->GetCapa(false, Capa::SIEVE, $oAccount)) { return $this->FalseResponse(__FUNCTION__); } diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Config/Application.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Config/Application.php index 12009c876..50034c94d 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Config/Application.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Config/Application.php @@ -186,7 +186,6 @@ class Application extends \RainLoop\Config\AbstractConfig 'reload' => array(true), 'search' => array(true), 'search_adv' => array(true), - 'filters' => array(true), 'x-templates' => array(false), 'dangerous_actions' => array(true), 'message_actions' => array(true), diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Enumerations/Capa.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Enumerations/Capa.php index 5c7fc91c8..ee7c4fcd4 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Enumerations/Capa.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Enumerations/Capa.php @@ -12,7 +12,6 @@ class Capa const THEMES = 'THEMES'; const USER_BACKGROUND = 'USER_BACKGROUND'; const SIEVE = 'SIEVE'; - const FILTERS = 'FILTERS'; const ATTACHMENT_THUMBNAILS = 'ATTACHMENT_THUMBNAILS'; const ADDITIONAL_ACCOUNTS = 'ADDITIONAL_ACCOUNTS'; const IDENTITIES = 'IDENTITIES'; diff --git a/snappymail/v/0.0.0/app/templates/Views/Admin/PopupsDomain.html b/snappymail/v/0.0.0/app/templates/Views/Admin/PopupsDomain.html index d7e6e2157..427fe23da 100644 --- a/snappymail/v/0.0.0/app/templates/Views/Admin/PopupsDomain.html +++ b/snappymail/v/0.0.0/app/templates/Views/Admin/PopupsDomain.html @@ -78,7 +78,7 @@

-
+