0) { foreach($frontpage_course as $old_course) { $old_course->frontpage = 0; $old_course->save(); } } $entity->frontpage = 1; $entity->save(); forward($CONFIG->wwwroot.'pg/poster'); ?>