public static function deleteCategoryAllowed($id)
{
if (!BackendModel::get('fork.settings')->get('Faq', 'allow_multiple_categories', true) && self::getCategoryCount() == 1) {
return false;
} else {
// check if the category does not contain questions
return !(bool) BackendModel::get('database')->getVar('SELECT 1
FROM faq_questions AS i
WHERE i.category_id = ? AND i.language = ?
LIMIT 1', array((int) $id, BL::getWorkingLanguage()));
}
}