Skip to content

Commit af641e4

Browse files
committed
Merge pull request OpenUserJS#697 from Martii/Issue-490patchRemoverName
Patch for searching remover and reason in graveyard Auto-merge
2 parents e842564 + 32a27af commit af641e4

2 files changed

Lines changed: 15 additions & 8 deletions

File tree

controllers/user.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1214,7 +1214,7 @@ function getExistingScript(aReq, aOptions, aAuthedUser, aCallback) {
12141214
collaborators = [collaborators];
12151215
}
12161216
} else {
1217-
collaborators = []; // WATCHPOINT
1217+
collaborators = []; // NOTE: Watchpoint
12181218
}
12191219

12201220
aStream.on('data', function (aData) { bufs.push(aData); });

libs/modelQuery.js

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ var parseModelListSearchQuery = function (aModelListQuery, aQuery, aSearchOption
9090
var parseScriptSearchQuery = function (aScriptListQuery, aQuery) {
9191
parseModelListSearchQuery(aScriptListQuery, aQuery, {
9292
partialWordMatchFields: ['name', 'author', 'about', 'meta.description'],
93-
fullWordMatchFields: ['meta.include', 'meta.match'],
93+
fullWordMatchFields: ['meta.include', 'meta.match']
9494
});
9595
};
9696
exports.parseScriptSearchQuery = parseScriptSearchQuery;
9797

9898
var parseGroupSearchQuery = function (aGroupListQuery, aQuery) {
9999
parseModelListSearchQuery(aGroupListQuery, aQuery, {
100-
partialWordMatchFields: ['name'],
100+
partialWordMatchFields: ['name']
101101
fullWordMatchFields: [],
102102
});
103103
};
@@ -106,31 +106,38 @@ exports.parseGroupSearchQuery = parseGroupSearchQuery;
106106
var parseDiscussionSearchQuery = function (aDiscussionListQuery, aQuery) {
107107
parseModelListSearchQuery(aDiscussionListQuery, aQuery, {
108108
partialWordMatchFields: ['topic'],
109-
fullWordMatchFields: ['author'],
109+
fullWordMatchFields: ['author']
110110
});
111111
};
112112
exports.parseDiscussionSearchQuery = parseDiscussionSearchQuery;
113113

114114
var parseCommentSearchQuery = function (aCommentListQuery, aQuery) {
115115
parseModelListSearchQuery(aCommentListQuery, aQuery, {
116116
partialWordMatchFields: ['content'],
117-
fullWordMatchFields: ['author'],
117+
fullWordMatchFields: ['author']
118118
});
119119
};
120120
exports.parseCommentSearchQuery = parseCommentSearchQuery;
121121

122122
var parseUserSearchQuery = function (aUserListQuery, aQuery) {
123123
parseModelListSearchQuery(aUserListQuery, aQuery, {
124124
partialWordMatchFields: ['name'],
125-
fullWordMatchFields: [],
125+
fullWordMatchFields: []
126126
});
127127
};
128128
exports.parseCommentSearchQuery = parseCommentSearchQuery;
129129

130130
var parseRemovedItemSearchQuery = function (aRemovedItemListQuery, aQuery) {
131131
parseModelListSearchQuery(aRemovedItemListQuery, aQuery, {
132-
partialWordMatchFields: ['content.*'],
133-
fullWordMatchFields: ['model'],
132+
partialWordMatchFields: [
133+
'removerName',
134+
'reason',
135+
136+
'content.*', // NOTE: Watchpoint... Wildcards don't appear to work (yet?)...
137+
'content.name', // NOTE: ... instead use some exact key names. See #490
138+
'content.author'
139+
],
140+
fullWordMatchFields: ['model']
134141
});
135142
};
136143
exports.parseCommentSearchQuery = parseCommentSearchQuery;

0 commit comments

Comments
 (0)