}
}
- if (empty($optionNames) && empty($categoryNames)) {
+ if (empty($optionNames) && empty($categoryNames) && !(ENABLE_DEBUG_MODE && ENABLE_DEVELOPER_TOOLS)) {
return [];
}
if (!empty($optionNames)) {
$conditions->add('optionName IN (?)', [$optionNames]);
}
+ if (ENABLE_DEBUG_MODE && ENABLE_DEVELOPER_TOOLS) {
+ $conditions->add('optionName LIKE ?', ['%'.$query.'%']);
+ }
$sql = "SELECT optionName, categoryName, options, permissions, hidden
FROM wcf".WCF_N."_option
$languageItems[$itemName] = $languageItem;
}
- if (empty($languageItems)) {
+ if (empty($languageItems) && !(ENABLE_DEBUG_MODE && ENABLE_DEVELOPER_TOOLS)) {
return [];
}
- $conditions = new PreparedStatementConditionBuilder();
- $conditions->add("optionName IN (?)", [array_keys($languageItems)]);
+ $conditions = new PreparedStatementConditionBuilder(true, 'OR');
+ if (!empty($languageItems)) {
+ $conditions->add("optionName IN (?)", [array_keys($languageItems)]);
+ }
+ if (ENABLE_DEBUG_MODE && ENABLE_DEVELOPER_TOOLS) {
+ $conditions->add('optionName LIKE ?', ['%'.$query.'%']);
+ }
$sql = "SELECT optionID, optionName, categoryName, permissions, options
FROM wcf".WCF_N."_user_group_option
$categoryName = $optionCategories[$categoryName]->parentCategoryName;
}
+ if (isset($languageItems[$userGroupOption->optionName])) {
+ $languageItem = $languageItems[$userGroupOption->optionName];
+ }
+ else {
+ $languageItem = 'wcf.acp.group.option.' . $userGroupOption->optionName;
+ }
+
$results[] = new ACPSearchResult(
- WCF::getLanguage()->getDynamicVariable($languageItems[$userGroupOption->optionName]),
+ WCF::getLanguage()->getDynamicVariable($languageItem),
$link,
WCF::getLanguage()->getDynamicVariable('wcf.acp.search.result.subtitle', ['pieces' => $parentCategories])
);