Skip to content

Commit

Permalink
Match barcodes derived from item ID
Browse files Browse the repository at this point in the history
  • Loading branch information
jimwins committed Jul 28, 2012
1 parent 27da378 commit ca608ba
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/item.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ function item_terms_to_sql($db, $q, $options) {
$term= $db->real_escape_string($term);
if (preg_match('/^code:(.+)/i', $term, $dbt)) {
$andor[]= "(item.code LIKE '{$dbt[1]}%')";
} elseif (preg_match('/^400400(\d+)\d$/i', $term, $dbt)) {
$andor[]= "(item.id = '{$dbt[1]}%')";
} elseif (preg_match('/^item:(.+)/i', $term, $dbt)) {
$andor[]= "(item.id = '{$dbt[1]}%')";
} elseif (preg_match('/^begin:([-0-9]+)/i', $term, $dbt)) {
Expand Down

0 comments on commit ca608ba

Please sign in to comment.