Skip to content

Commit df94b62

Browse files
author
Martii
committed
More for OpenUserJS#262
* Change/Add some more comments in for Ambiguous * Remove some comments added as it appears they have been identified. * Unified what comments I found that I added for 264. Applies to OpenUserJS#264 as well
1 parent 82dc007 commit df94b62

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

controllers/admin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ exports.userAdmin = function (aReq, aRes, aNext) {
5656
if (!userIsAdmin(aReq)) { return aNext(); }
5757

5858
// You can only see users with a role less than yours
59-
User.find({ role: { $gt: thisUser.role } }, function (aErr, aUsers) { // TODO: STYLEGUIDE conformance needed here with $
59+
User.find({ role: { $gt: thisUser.role } }, function (aErr, aUsers) { // TODO: STYLEGUIDE.md conformance needed here
6060
var i = 0;
6161
options.users = [];
6262

controllers/group.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ exports.addScriptToGroups = function (aScript, aGroupNames, aCallback) {
116116

117117
// Update the group ratings in the background
118118
aGroups.forEach(function (aGroup) {
119-
Script.find({ _id: { $in: aGroup._scriptIds } }, // TODO: STYLEGUIDE conformance needed here
119+
Script.find({ _id: { $in: aGroup._scriptIds } }, // TODO: STYLEGUIDE.md conformance needed here
120120
function (aErr, aScripts) {
121121
if (aErr || aScripts.length < 2) { return; }
122122

controllers/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,12 @@ function getSearchResults(aReq, aRes, aPrefixSearch, aFullSearch, aOpts, aCallba
173173
condition[aProp] = fullRegex;
174174
conditions.push(condition);
175175
});
176-
aOpts['$or'] = conditions; // TODO: STYLEGUIDE.md conformance needed here
176+
aOpts['$or'] = conditions;
177177

178178
var options = {
179179
'username': user ? user.name : null,
180180
'search': search,
181-
'scriptsList': scriptsList // TODO: Where did this identifier come from?? Possibly a global
181+
'scriptsList': scriptsList // TODO: Ambiguous - Where did this identifier come from?? Possibly a global
182182
};
183183

184184
// Page metadata
@@ -206,7 +206,7 @@ exports.toolbox = function (aReq, aRes) {
206206
var options = {
207207
toolbox: true,
208208
username: user ? user.name : null,
209-
scriptsList: scriptsList // TODO: Where did this identifier come from?? Possibly a global
209+
scriptsList: scriptsList // TODO: Ambiguous - Where did this identifier come from?? Possibly a global
210210
};
211211

212212
// Page metadata

controllers/issue.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ exports.view = function (aReq, aRes, aNext) {
175175
//--- Tasks
176176

177177
// Show the number of open issues
178-
var scriptOpenIssueCountQuery = Discussion.find({ category: script.issuesCategorySlug, open: { $ne: false } }); // STYLEGUIDE.md conformance needed here
178+
var scriptOpenIssueCountQuery = Discussion.find({ category: script.issuesCategorySlug, open: { $ne: false } }); // TODO: STYLEGUIDE.md conformance needed here
179179
tasks.push(countTask(scriptOpenIssueCountQuery, options, 'issueCount'));
180180

181181
// Pagination

controllers/user.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ exports.edit = function (aReq, aRes, aNext) {
685685
options.defaultStrategy = strategies[defaultStrategy].name;
686686
options.haveOtherStrategies = options.usedStrategies.length > 0;
687687

688-
scriptsList.listScripts({ _authorId: user._id, isLib: null, flagged: null }, // TODO: Another possible global
688+
scriptsList.listScripts({ _authorId: user._id, isLib: null, flagged: null }, // TODO: Global detected
689689
{ size: -1 }, '/user/edit',
690690
function (aScriptsList) {
691691
aScriptsList.edit = true;
@@ -1119,7 +1119,7 @@ exports.userManageGitHubPage = function (aReq, aRes, aNext) {
11191119
aUserData.save(aCallback);
11201120
},
11211121
function (aCallback) {
1122-
console.log(util.format('Updated User(%s).ghUsername', aUserData.name)); // WATCHPOINT
1122+
console.log(util.format('Updated User(%s).ghUsername', aUserData.name));
11231123
aCallback(null);
11241124
},
11251125
], aCallback);
@@ -1222,7 +1222,7 @@ exports.uploadScript = function (aReq, aRes, aNext) {
12221222
}
12231223

12241224
stream = fs.createReadStream(script.path);
1225-
stream.on('data', function (aD) { bufs.push(aD); }); // TODO: Non-script function parm name
1225+
stream.on('data', function (aD) { bufs.push(aD); }); // TODO: Non-descript function parm
12261226

12271227
stream.on('end', function () {
12281228
User.findOne({ _id: user._id }, function (aErr, aUser) {
@@ -1374,7 +1374,7 @@ function getExistingScript(aReq, aOptions, aAuthedUser, aCallback) {
13741374
}
13751375
}
13761376

1377-
aStream.on('data', function (aD) { bufs.push(aD); }); // TODO: Small function parm
1377+
aStream.on('data', function (aD) { bufs.push(aD); }); // TODO: Non-descript function parm
13781378
aStream.on('end', function () {
13791379
// Page metadata
13801380
pageMetadata(aOptions, 'Edit ' + aScript.name);

libs/flag.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ function getThreshold(aModel, aContent, aAuthor, aCallback) {
8080
}
8181
exports.getThreshold = getThreshold;
8282

83-
function saveContent(aModel, aContent, aAuthor, flags, aCallback) { // TODO: Ambiguous
83+
function saveContent(aModel, aContent, aAuthor, aFlags, aCallback) {
8484
if (!aContent.flags) { aContent.flags = 0; }
85-
aContent.flags += flags;
85+
aContent.flags += aFlags;
8686

8787
if (aContent.flags >= thresholds[aModel.modelName] * (aAuthor.role < 4 ? 2 : 1)) {
8888
return getThreshold(aModel, aContent, aAuthor, function (aThreshold) {

libs/modifySessions.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ exports.add = function (aReq, aUser, aCallback) {
3030
var store = aReq.sessionStore;
3131

3232
function finish(aErr, aUser) {
33-
aReq.session.user = serializeUser(aUser); // TODO: Ambiguous
33+
aReq.session.user = serializeUser(aUser);
3434
aCallback();
3535
}
3636

@@ -44,7 +44,7 @@ exports.add = function (aReq, aUser, aCallback) {
4444
aSessionIds.push(aReq.sessionID);
4545
}
4646

47-
aUser.sessionIds = aSessionIds; // TODO: Ambiguous
47+
aUser.sessionIds = aSessionIds;
4848
aUser.save(finish);
4949
});
5050
} else {

0 commit comments

Comments
 (0)