Sfoglia il codice sorgente

Evolution #131: Tags elements favoris & profil: tomoderate

bastien 13 anni fa
parent
commit
3be546fe73

+ 3 - 1
src/Muzich/CoreBundle/Repository/UserRepository.php Vedi File

@@ -192,9 +192,11 @@ class UserRepository extends EntityRepository
192 192
         SELECT t FROM MuzichCoreBundle:Tag t
193 193
         LEFT JOIN t.elements e
194 194
         WHERE e.owner = :uid
195
+        AND (t.tomoderate = \'FALSE\' OR t.tomoderate IS NULL
196
+          OR t.privateids LIKE :uidt)
195 197
         ORDER BY t.name ASC'
196 198
       )
197
-      ->setParameter('uid', $user_id)
199
+      ->setParameters(array('uid' => $user_id, 'uidt' => '%"'.$user_id.'"%'))
198 200
       ->getResult()
199 201
     ;
200 202
   }

+ 3 - 1
src/Muzich/CoreBundle/Repository/UsersElementsFavoritesRepository.php Vedi File

@@ -20,9 +20,11 @@ class UsersElementsFavoritesRepository extends EntityRepository
20 20
         LEFT JOIN t.elements e
21 21
         LEFT JOIN e.elements_favorites f
22 22
         WHERE f.user = :uid
23
+        AND (t.tomoderate = \'FALSE\' OR t.tomoderate IS NULL
24
+          OR t.privateids LIKE :uidt)
23 25
         ORDER BY t.name ASC'
24 26
       )
25
-      ->setParameter('uid', $user_id)
27
+      ->setParameters(array('uid' => $user_id, 'uidt' => '%"'.$user_id.'"%'))
26 28
       ->getResult()
27 29
     ;
28 30
   }