mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-11-03 20:45:58 +01:00 
			
		
		
		
	categoryData should return better topics (non-anon uid passed in now)
This commit is contained in:
		@@ -88,7 +88,7 @@ categoriesController.get = function(req, res, next) {
 | 
				
			|||||||
				var start = (page - 1) * settings.topicsPerPage,
 | 
									var start = (page - 1) * settings.topicsPerPage,
 | 
				
			||||||
					end = start + settings.topicsPerPage - 1;
 | 
										end = start + settings.topicsPerPage - 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				categories.getCategoryById(cid, start, end, 0, function (err, categoryData) {
 | 
									categories.getCategoryById(cid, start, end, uid, function (err, categoryData) {
 | 
				
			||||||
					if (categoryData) {
 | 
										if (categoryData) {
 | 
				
			||||||
						if (parseInt(categoryData.disabled, 10) === 1) {
 | 
											if (parseInt(categoryData.disabled, 10) === 1) {
 | 
				
			||||||
							return next(new Error('Category disabled'), null);
 | 
												return next(new Error('Category disabled'), null);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -687,7 +687,6 @@ var async = require('async'),
 | 
				
			|||||||
	};
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	Topics.getTopicsByTids = function(tids, uid, callback) {
 | 
						Topics.getTopicsByTids = function(tids, uid, callback) {
 | 
				
			||||||
 | 
					 | 
				
			||||||
		if (!Array.isArray(tids) || tids.length === 0) {
 | 
							if (!Array.isArray(tids) || tids.length === 0) {
 | 
				
			||||||
			return callback(null, []);
 | 
								return callback(null, []);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user