liquid_feedback_core

diff core.sql @ 520:053190248598

Allow a value of zero as "notification_sample_size" to disable featured initiatives
author jbe
date Wed May 04 21:44:18 2016 +0200 (2016-05-04)
parents e4f619e87664
children 65bd17395c28
line diff
     1.1 --- a/core.sql	Sat Apr 30 17:50:48 2016 +0200
     1.2 +++ b/core.sql	Wed May 04 21:44:18 2016 +0200
     1.3 @@ -7,7 +7,7 @@
     1.4  BEGIN;
     1.5  
     1.6  CREATE VIEW "liquid_feedback_version" AS
     1.7 -  SELECT * FROM (VALUES ('3.2.1', 3, 2, 1))
     1.8 +  SELECT * FROM (VALUES ('3.2.2', 3, 2, 2))
     1.9    AS "subquery"("string", "major", "minor", "revision");
    1.10  
    1.11  
    1.12 @@ -2451,6 +2451,9 @@
    1.13        SELECT "notification_counter", "notification_sample_size"
    1.14          INTO "counter_v", "sample_size_v"
    1.15          FROM "member" WHERE "id" = "recipient_id_p";
    1.16 +      IF COALESCE("sample_size_v" <= 0, TRUE) THEN
    1.17 +        RETURN;
    1.18 +      END IF;
    1.19        "initiative_id_ary" := '{}';
    1.20        LOOP
    1.21          "match_v" := FALSE;

Impressum / About Us