From c10e9a24b920cb34b3950306b5db941f8fc6ab59 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Thu, 14 Apr 2011 16:38:22 +0200 Subject: [PATCH] Adds search on broken redirections (Closes #990). MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- ChangeLog | 3 +++ include/ufbuilder.inc.php | 20 ++++++++++++++++++++ templates/search/adv.form.tpl | 21 +++++++++++++++++++++ 3 files changed, 44 insertions(+) diff --git a/ChangeLog b/ChangeLog index f91f7c9..26a5846 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,9 @@ Bug/Wish: * Profile: - #1445: Add job entry year -JAC + * Search: + - #990: Adds search on broken redirections -JAC + * XnetList: - #957: Allows xnet list sorting by description and members count -JAC diff --git a/include/ufbuilder.inc.php b/include/ufbuilder.inc.php index fecc077..fdd8c6f 100644 --- a/include/ufbuilder.inc.php +++ b/include/ufbuilder.inc.php @@ -344,6 +344,7 @@ class UFB_AdvancedSearch extends UserFilterBuilder new UFBF_Promo('promo2', 'Promotion', 'egal2'), new UFBF_Sex('woman', 'Sexe'), new UFBF_Registered('subscriber', 'Inscrit'), + new UFBF_HasEmailRedirect('has_email_redirect', 'A une redirection active'), new UFBF_Dead('alive', 'En vie'), new UFBF_Town('city', 'Ville / Code Postal'), @@ -956,6 +957,25 @@ class UFBF_Registered extends UFBF_Enum } // }}} +// {{{ class UFBF_HasEmailRedirect +class UFBF_HasEmailRedirect extends UFBF_Enum +{ + public function __construct($envfield, $formtext = '') + { + parent::__construct($envfield, $formtext, array(1, 2)); + } + + protected function buildUFC(UserFilterBuilder $ufb) + { + if ($this->val == 1) { + return new UFC_HasEmailRedirect(); + } else if ($this->val == 2) { + return new PFC_Not(new UFC_HasEmailRedirect()); + } + } +} +// }}} + // {{{ class UFBF_Dead class UFBF_Dead extends UFBF_Enum { diff --git a/templates/search/adv.form.tpl b/templates/search/adv.form.tpl index 48ac0b0..d8fc26f 100644 --- a/templates/search/adv.form.tpl +++ b/templates/search/adv.form.tpl @@ -345,6 +345,27 @@ function cleanForm(f) { + A une redirection active + + + + + + + +
+ + + + + +
+ + + En vie -- 2.1.4