Commit 8c80f493 authored by catch's avatar catch

Issue #2081145 by beowulf1416: Remove Unused local variable $translations from...

Issue #2081145 by beowulf1416: Remove Unused local variable $translations from lib/Drupal/content_translation()/ContentTranslationController.php.
parent ecce2783
......@@ -46,7 +46,6 @@ public function __construct($entity_type, $entity_info) {
* Implements ContentTranslationControllerInterface::removeTranslation().
*/
public function removeTranslation(EntityInterface $entity, $langcode) {
$translations = $entity->getTranslationLanguages();
// @todo Handle properties.
// Remove field translations.
foreach (field_info_instances($entity->entityType(), $entity->bundle()) as $instance) {
......@@ -236,7 +235,7 @@ public function entityFormAlter(array &$form, array &$form_state, EntityInterfac
// A new translation is not available in the translation metadata, hence
// it should count as one more.
$published = $new_translation;
foreach ($entity->translation as $langcode => $translation) {
foreach ($entity->translation as $translation) {
$published += $translation['status'];
}
$enabled = $published > 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment