Skip to content
Browse files

optionTypes can now also be userGroupOptionTypes

  • Loading branch information...
1 parent 612bacc commit b952ef1baef0b381579aed917ce152f1fb036944 @kaffeemon committed Mar 30, 2012
Showing with 8 additions and 4 deletions.
  1. +8 −4 file/lib/system/option/InstantOptionHandler.class.php
View
12 file/lib/system/option/InstantOptionHandler.class.php
@@ -115,11 +115,15 @@ public function disableAssignVariables() {
*/
public static function getTypeObject($type) {
if (!isset(static::$typeObjs[$type])) {
- $className = 'wcf\system\option\\'.ucfirst($type).'OptionType';
-
- if (class_exists($className) && ClassUtil::isInstanceOf($className, 'wcf\system\option\IOptionType'))
+ if (class_exists($className = 'wcf\system\option\\'.ucfirst($type).'OptionType') {
+ && ClassUtil::isInstanceOf($className, 'wcf\system\option\IOptionType'))
+
+ static::$typeObjs[$type] = new $className;
+ } else if (class_exists($className = 'wcf\system\option\user\group\\'.ucfirst($type).'UserGroupOptionType') {
+ && ClassUtil::isInstanceOf($className, 'wcf\system\option\IOptionType'))
+
static::$typeObjs[$type] = new $className;
- else
+ } else
static::$typeObjs[$type] = null;
}

0 comments on commit b952ef1

Please sign in to comment.
Something went wrong with that request. Please try again.