You are here

function _uc_coupon_map_restriction in Ubercart Discount Coupons 6

Same name and namespace in other branches
  1. 7.3 uc_coupon.admin.inc \_uc_coupon_map_restriction()
  2. 7.2 uc_coupon.admin.inc \_uc_coupon_map_restriction()
1 string reference to '_uc_coupon_map_restriction'
uc_coupon_add_form_submit in ./uc_coupon.admin.inc
Coupon form submit handler.

File

./uc_coupon.admin.inc, line 1006

Code

function _uc_coupon_map_restriction(&$value, $key, $prefix) {
  if ($value && preg_match('/\\[' . $prefix . ':(\\d+)\\]$/', $value, $matches)) {
    $value = $matches[1];
  }
  else {
    $value = FALSE;
  }
}