Просмотр исходного кода

filtered articles index if translated or not in current language

Bachir Soussi Chiadmi 6 лет назад
Родитель
Сommit
82c1f1f9bc
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      sites/all/modules/figli/edlp_corpus/src/Controller/CorpusController.php

+ 2 - 2
sites/all/modules/figli/edlp_corpus/src/Controller/CorpusController.php

@@ -272,8 +272,8 @@ class CorpusController extends ControllerBase {
         if($sid != 'corpus_documents_publie') continue;
         if($sid != 'corpus_documents_publie') continue;
 
 
         // TODO: check if article is translated
         // TODO: check if article is translated
-        if (!$node->hasTranslation($current_langcode)
-            || $node->getTranslation($current_langcode)->body->isEmpty()) continue;
+        if ($node->hasTranslation($current_langcode)
+            && $node->getTranslation($current_langcode)->body->isEmpty()) continue;
 
 
         $this->articles_nodes[] = $node;
         $this->articles_nodes[] = $node;
         // record an array of nids for corpus map filtering
         // record an array of nids for corpus map filtering