Small optimization
authorMarcel Werk <burntime@woltlab.com>
Wed, 12 Jun 2013 14:15:28 +0000 (16:15 +0200)
committerMarcel Werk <burntime@woltlab.com>
Wed, 12 Jun 2013 14:15:28 +0000 (16:15 +0200)
wcfsetup/install/files/lib/system/option/UseroptionsOptionType.class.php

index 00416274bea20fdddf167622f74c42476d340611..0b6be51580be3f79335e0efc7fc72d117cf213d3 100644 (file)
@@ -66,7 +66,11 @@ class UseroptionsOptionType extends AbstractOptionType {
                        self::$userOptions = array();
                        $sql = "SELECT  optionName
                                FROM    wcf".WCF_N."_user_option
-                               WHERE   categoryName LIKE 'profile%'
+                               WHERE   categoryName IN (
+                                               SELECT  categoryName
+                                               FROM    wcf".WCF_N."_user_option_category
+                                               WHERE   parentCategoryName = 'profile'  
+                                       )
                                        AND optionType <> 'boolean'";
                        $statement = WCF::getDB()->prepareStatement($sql);
                        $statement->execute();