Skip to content

Commit 907f8cb

Browse files
committed
rename escapeSQLChars
1 parent fc49e1b commit 907f8cb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ShoppingList/src/main/java/org/openintents/shopping/provider/ShoppingProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public boolean onCreate() {
107107
return true;
108108
}
109109

110-
public static String EscapeSQLChars(String trapped) {
110+
public static String escapeSQLChars(String trapped) {
111111
/*
112112
In order for this method to work properly, the query using the result must use '`' as its
113113
Escape character.
@@ -216,7 +216,7 @@ && listUsesStoreFilter(selectionArgs[0])) {
216216
defaultOrderBy = ContainsFull.DEFAULT_SORT_ORDER;
217217
String tagFilter = getListTagsFilter(selectionArgs[0]);
218218
if (!inSearchMode && !TextUtils.isEmpty(tagFilter)) {
219-
qb.appendWhere(" AND items.tags like '%" + EscapeSQLChars(tagFilter) + "%' ESCAPE '`'");
219+
qb.appendWhere(" AND items.tags like '%" + escapeSQLChars(tagFilter) + "%' ESCAPE '`'");
220220
}
221221
break;
222222

ShoppingList/src/main/java/org/openintents/shopping/ui/widget/ShoppingItemsView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ private Cursor createItemsCursor(long listId, CursorLoader loader) {
865865
String[] selection_args = new String[]{String.valueOf(listId)};
866866
if (mFilter != null) {
867867
selection = "list_id = ? AND " + ContainsFull.ITEM_NAME +
868-
" like '%" + ShoppingProvider.EscapeSQLChars(mFilter) + "%' ESCAPE '`'";
868+
" like '%" + ShoppingProvider.escapeSQLChars(mFilter) + "%' ESCAPE '`'";
869869
} else if (mMode == ShoppingActivity.MODE_IN_SHOP) {
870870
if (hideBought) {
871871
selection = "list_id = ? AND " + Contains.STATUS

0 commit comments

Comments
 (0)