Skip to:
Content

bbPress.org


Ignore:
Timestamp:
06/25/2025 12:35:10 AM (2 months ago)
Author:
johnjamesjacoby
Message:

Moderation: prefer "disallowed_keys" over "disallow_keys".

This change corrects a regression (from r7270, since 2.6.11) where the incorrect option name was used when deprecating blacklist_keys via #3538.

Props robin-w.

In trunk, for 2.7.

Fixes #3639.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/common/functions.php

    r7275 r7302  
    961961        $content        = 'Beware, they maybe bees hibernating.';
    962962
    963         update_option( 'disallow_keys',"hibernating\nfoo" );
     963        update_option( 'disallowed_keys',"hibernating\nfoo" );
    964964
    965965        $result = bbp_check_for_moderation( $anonymous_data, $author_id, $title, $content, true );
     
    967967        $this->assertFalse( $result );
    968968
    969         update_option( 'disallow_keys',"foo\nbar" );
     969        update_option( 'disallowed_keys',"foo\nbar" );
    970970
    971971        $result = bbp_check_for_moderation( $anonymous_data, $author_id, $title, $content, true );
     
    993993        $content        = bbp_get_topic_content( $t );
    994994
    995         update_option( 'disallow_keys',"http://example.net/banned\nfoo" );
     995        update_option( 'disallowed_keys',"http://example.net/banned\nfoo" );
    996996
    997997        $result = bbp_check_for_moderation( $anonymous_data, $author_id, $title, $content, true );
     
    10191019        $content        = bbp_get_topic_content( $t );
    10201020
    1021         update_option( 'disallow_keys',"banned@example.net\nfoo" );
     1021        update_option( 'disallowed_keys',"banned@example.net\nfoo" );
    10221022
    10231023        $result = bbp_check_for_moderation( $anonymous_data, $author_id, $title, $content, true );
     
    10431043        $content        = bbp_get_topic_content( $t );
    10441044
    1045         update_option( 'disallow_keys',"127.0.0.1\nfoo" );
     1045        update_option( 'disallowed_keys',"127.0.0.1\nfoo" );
    10461046
    10471047        $result = bbp_check_for_moderation( $anonymous_data, $author_id, $title, $content, true );
     
    10711071        $content        = bbp_get_topic_content( $t );
    10721072
    1073         update_option( 'disallow_keys',"hibernating\nfoo" );
     1073        update_option( 'disallowed_keys',"hibernating\nfoo" );
    10741074
    10751075        $result = bbp_check_for_moderation( $anonymous_data, $author_id, $title, $content, true );
     
    11021102        $content        = bbp_get_topic_content( $t );
    11031103
    1104         update_option( 'disallow_keys',"hibernating\nfoo" );
     1104        update_option( 'disallowed_keys',"hibernating\nfoo" );
    11051105
    11061106        $result = bbp_check_for_moderation( $anonymous_data, $author_id, $title, $content, true );
     
    11211121        $content        = 'Beware, there maybe bees <a href="http://example.com/hibernating/>buzzing</a>, buzzing.';
    11221122
    1123         update_option( 'disallow_keys',"hibernating\nfoo" );
     1123        update_option( 'disallowed_keys',"hibernating\nfoo" );
    11241124
    11251125        $result = bbp_check_for_moderation( $anonymous_data, $author_id, $title, $content, true );
     
    11451145        $content        = bbp_get_topic_content( $t );
    11461146
    1147         update_option( 'disallow_keys',"hibernating\nfoo" );
     1147        update_option( 'disallowed_keys',"hibernating\nfoo" );
    11481148
    11491149        $result = bbp_check_for_moderation( $anonymous_data, $author_id, $title, $content, true );
Note: See TracChangeset for help on using the changeset viewer.