Skip to content

Commit

Permalink
Some STYLEGUIDE.md conformance
Browse files Browse the repository at this point in the history
* Missed Apps Hungarian notation from OpenUserJS#264
* Curly braces with newlines
  • Loading branch information
Martii committed Jan 25, 2015
1 parent d115e35 commit 0fc58d1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
26 changes: 13 additions & 13 deletions controllers/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,20 +244,20 @@ var getScriptPageTasks = function (aOptions) {
return;
}

removeLib.removeable(Script, script, authedUser,
function (aCanRemove, author) {
aOptions.canRemove = aCanRemove;
aOptions.flags = script.flags || 0;
aOptions.removeUrl = '/remove' + (script.isLib ? '/libs/' : '/scripts/') + script.installNameSlug;

if (!aCanRemove) { return aCallback(); }

flagLib.getThreshold(Script, script, author,
function (aThreshold) {
aOptions.threshold = aThreshold;
aCallback();
});
removeLib.removeable(Script, script, authedUser, function (aCanRemove, aAuthor) {
aOptions.canRemove = aCanRemove;
aOptions.flags = script.flags || 0;
aOptions.removeUrl = '/remove' + (script.isLib ? '/libs/' : '/scripts/') + script.installNameSlug;

if (!aCanRemove) {
return aCallback();
}

flagLib.getThreshold(Script, script, aAuthor, function (aThreshold) {
aOptions.threshold = aThreshold;
aCallback();
});
});
});

return tasks;
Expand Down
4 changes: 3 additions & 1 deletion controllers/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ var setupUserModerationUITask = function (aOptions) {
aOptions.canRemove = aCanRemove;
aOptions.flags = user.flags || 0;

if (!aCanRemove) { return aCallback(); }
if (!aCanRemove) {
return aCallback();
}

flagLib.getThreshold(User, user, aAuthor, function (aThreshold) {
aOptions.threshold = aThreshold;
Expand Down

0 comments on commit 0fc58d1

Please sign in to comment.