/** * sets a list of nodes to be featured * @param array The node ids * @param boot set or unset the featured flag * * @return array nodeids that have permission to be featured */ public function setFeatured($nodeids, $set = true) { $this->inlinemodAuthCheck(); if (!is_array($nodeids)) { $nodeids = array($nodeids); } $featureIds = array(); foreach ($nodeids as $nodeid) { if (!vB::getUserContext()->getChannelPermission('moderatorpermissions', 'cansetfeatured', $nodeid)) { continue; } $featureIds[] = $nodeid; } //If this user doesn't have the featured permission and they are trying to set it, //throw an exception if (empty($featureIds)) { throw new Exception('no_featured_permissions'); } return $this->library->setFeatured($featureIds, $set); }