Skip to content

Commit

Permalink
rename escapeSQLChars
Browse files Browse the repository at this point in the history
  • Loading branch information
aperomsik committed Jul 15, 2015
1 parent fc49e1b commit 907f8cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public boolean onCreate() {
return true;
}

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ private Cursor createItemsCursor(long listId, CursorLoader loader) {
String[] selection_args = new String[]{String.valueOf(listId)};
if (mFilter != null) {
selection = "list_id = ? AND " + ContainsFull.ITEM_NAME +
" like '%" + ShoppingProvider.EscapeSQLChars(mFilter) + "%' ESCAPE '`'";
" like '%" + ShoppingProvider.escapeSQLChars(mFilter) + "%' ESCAPE '`'";
} else if (mMode == ShoppingActivity.MODE_IN_SHOP) {
if (hideBought) {
selection = "list_id = ? AND " + Contains.STATUS
Expand Down

0 comments on commit 907f8cb

Please sign in to comment.