Incorrect comparison of bbcode restrictions
authorAlexander Ebert <ebert@woltlab.com>
Fri, 8 Jun 2018 12:08:12 +0000 (14:08 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 8 Jun 2018 12:08:12 +0000 (14:08 +0200)
wcfsetup/install/files/lib/system/option/user/group/BBCodeSelectUserGroupOptionType.class.php

index 30f308490541df9d01ac501fa3dc49c8fe675f37..8a6532783d3294dbb461404b5f4c9531ef6821bc 100644 (file)
@@ -123,7 +123,7 @@ class BBCodeSelectUserGroupOptionType extends AbstractOptionType implements IUse
                                return 0;
                        }
                        
-                       return -1;
+                       return 1;
                }
                else if (empty($value2)) {
                        return 1;
@@ -135,13 +135,13 @@ class BBCodeSelectUserGroupOptionType extends AbstractOptionType implements IUse
                // check if value1 disallows more BBCodes than value2
                $diff = array_diff($value1, $value2);
                if (!empty($diff)) {
-                       return 1;
+                       return -1;
                }
                
                // check if value1 disallows less BBCodes than value2
                $diff = array_diff($value2, $value1);
                if (!empty($diff)) {
-                       return -1;
+                       return 1;
                }
                
                // both lists of BBCodes are equal