File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -434,8 +434,7 @@ public function displayAction(
434
434
$ conditions = $ capsConditions ;
435
435
}
436
436
// If there are still no results, try again but with aliases
437
- else {
438
- $ cardsData ->unaliasCardNames ($ conditions );
437
+ else if ($ cardsData ->unaliasCardNames ($ conditions )) {
439
438
$ rows = $ cardsData ->get_search_rows ($ conditions , $ sort , $ locale );
440
439
}
441
440
}
Original file line number Diff line number Diff line change @@ -971,12 +971,14 @@ public function unaliasCardNames(array &$conditions)
971
971
972
972
// Check the conditions are non-empty
973
973
if (!$ title )
974
- return ;
974
+ return false ;
975
975
976
976
// If they are the substring of an alias for a card, replace the conditions with that card's name
977
977
if ($ match = current (preg_grep ("/^ $ title/ " , array_keys ($ this ->cardAliases )))) {
978
978
$ conditions = [["_ " , ": " , $ this ->cardAliases [$ match ]]];
979
+ return true ;
979
980
}
981
+ return false ;
980
982
}
981
983
982
984
public function buildQueryFromConditions (array $ conditions )
You can’t perform that action at this time.
0 commit comments