Browse Source

Merge branch 'unstable' into feature/test

bastien 13 years ago
parent
commit
d603eaacfe

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

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

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

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

+ 1 - 1
web/bundles/muzichcore/js/muzich.js View File

1112
   }
1112
   }
1113
    
1113
    
1114
   $('ul#favorite_tags a.tag').click(function(){
1114
   $('ul#favorite_tags a.tag').click(function(){
1115
-    list_tag_clicked();
1115
+    list_tag_clicked($(this));
1116
   });
1116
   });
1117
   
1117
   
1118
   last_keypress = 0;
1118
   last_keypress = 0;