src/cm/media/js/client/c_db.js
changeset 529 5eeed336b992
parent 504 b2e0186daa5b
equal deleted inserted replaced
528:cbe216651b19 529:5eeed336b992
   475   },
   475   },
   476 
   476 
   477   filterByCat : function(cat, cWithCatIds, rWithCatIds) {
   477   filterByCat : function(cat, cWithCatIds, rWithCatIds) {
   478     for (var id in this.allCommentsByDbId) {
   478     for (var id in this.allCommentsByDbId) {
   479       var comment = this.allCommentsByDbId[id] ;
   479       var comment = this.allCommentsByDbId[id] ;
   480       if (cat == "" || comment.category == cat) { 
   480       if (cat == undefined || cat == "" || comment.category == cat) { 
   481         if (comment.reply_to_id == null) {
   481         if (comment.reply_to_id == null) {
   482           cWithCatIds.push(comment.id);
   482           cWithCatIds.push(comment.id);
   483           if (comment.replies.length) {
   483           if (comment.replies.length) {
   484             for (var reply in comment.replies) {
   484             for (var reply in comment.replies) {
   485               rWithCatIds.push(comment.replies[reply].id) ;
   485               rWithCatIds.push(comment.replies[reply].id) ;