1
0

Fix SQL error message display when invalid categories selected

This commit is contained in:
Garvin Hicking
2007-03-01 19:54:27 +00:00
parent df13cb59f4
commit ab22db27a6
2 changed files with 9 additions and 0 deletions

View File

@ -69,6 +69,10 @@ function serendipity_getMultiCategoriesSQL($cats, $invert = false) {
$cat_sql_array[] = " (c.category_left " . ($invert ? " NOT " : "") . " BETWEEN " . implode(' AND ', serendipity_fetchCategoryRange($categoryid)) . ')';
}
}
if (count($cat_sql_array) < 1) {
return '';
}
return '(' . implode(($invert ? ' AND ' : ' OR '), $cat_sql_array) . ')';
}