Trim whitespace around code when entered
Created by: eileenmcnaughton
When trying to compare different versions of this extension I find that at some point the discountcode was being trimmed - this seems to be a sensible thing which should be re-introduced
diff --git a/cividiscount.php b/cividiscount.php index 93a7f47..b75ad55 100644 --- a/cividiscount.php +++ b/cividiscount.php @@ -137,7 +137,7 @@ function cividiscount_civicrm_buildForm($fname, &$form) {
if ($form->getVar('_single') == 1 || in_array($form->getVar('_context'), array('membership', 'standalone'))) {
_cividiscount_add_discount_textfield($form);
-
$code = CRM_Utils_Request::retrieve('discountcode', 'String', $form, false, null, 'REQUEST');
-
$code = trim(CRM_Utils_Request::retrieve('discountcode', 'String', $form, false, null, 'REQUEST'));