Przeglądaj źródła

fix MineTag agagin

Bastien Sevajol 10 lat temu
rodzic
commit
54c608af1c
1 zmienionych plików z 9 dodań i 4 usunięć
  1. 9 4
      src/Muzich/CoreBundle/Mining/Tag/TagData.php

+ 9 - 4
src/Muzich/CoreBundle/Mining/Tag/TagData.php Wyświetl plik

11
   {
11
   {
12
     $user_tags = $this->getUserTagsTags($user, 'element_favorite_tags');
12
     $user_tags = $this->getUserTagsTags($user, 'element_favorite_tags');
13
     
13
     
14
-   if (count($tags_ordereds = $user_tags->getElementFavoriteTags()))
15
-     return $tags_ordereds;
16
-   
14
+    if ($user_tags)
15
+    {
16
+      if (count($tags_ordereds = $user_tags->getElementFavoriteTags()))
17
+      {
18
+        return $tags_ordereds;
19
+      }
20
+    }
21
+    
17
    return array();
22
    return array();
18
   }
23
   }
19
   
24
   
20
   public function getTagOrderForDiffusions(User $user)
25
   public function getTagOrderForDiffusions(User $user)
21
   {
26
   {
22
     $user_tags = $this->getUserTagsTags($user, 'element_diffusion_tags');
27
     $user_tags = $this->getUserTagsTags($user, 'element_diffusion_tags');
23
-    $user_tags = null;
28
+    
24
     if ($user_tags)
29
     if ($user_tags)
25
     {
30
     {
26
       if (count($tags_ordereds = $user_tags->getElementDiffusionTags()))
31
       if (count($tags_ordereds = $user_tags->getElementDiffusionTags()))