[Erp5-report] r24426 - in /erp5/trunk/products/ERP5: Document/ tests/
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Oct 30 15:32:46 CET 2008
Author: rafael
Date: Thu Oct 30 15:32:43 2008
New Revision: 24426
URL: http://svn.erp5.org?rev=24426&view=rev
Log:
Bug Fix for:
"Telephone drops the last piece after -
for example, try to enter +11(0)11-1111-1111 as a telephone number. then it becomes +11(0)11-1111
telephone should not eliminate any part."
Modified:
erp5/trunk/products/ERP5/Document/Telephone.py
erp5/trunk/products/ERP5/tests/testERP5Base.py
Modified: erp5/trunk/products/ERP5/Document/Telephone.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Telephone.py?rev=24426&r1=24425&r2=24426&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Telephone.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/Telephone.py [utf8] Thu Oct 30 15:32:43 2008
@@ -73,9 +73,10 @@
regex_list = [
# Country, Area, Number, Extension*
# +11(0)1-11111111/111 or +11(0)1-11111111/ or +11(0)1-11111111
+ # +11(0)1-1111-1111/111 or +11(0)1-1111-1111/ or +11(0)1-1111-1111
# + 11 (0)1-11 11 01 01/111 or + 11 (0)1-11 11 01 01/ or + 11 (0)1-11 11 01 01
# +11 (0)11 1011 1100/111 or +11 (0)11 1011 1100/ or +11 (0)11 1011 1100
- "\+(?P<country>[\d\ ]*)\(0\)(?P<area>\d+)(\-|\ )(?P<number>[\d\ ]*)(?:\/)?(?P<ext>\d+|)",
+ "\+(?P<country>[\d\ ]*)\(0\)(?P<area>\d+)(\-|\ )(?P<number>[\d\ \-]*)(?:\/)?(?P<ext>\d+|)",
# Country, Area, Number, Extension*
# +11-1-11111111/111 or +11-1-11111111/ or +11-1-11111111
Modified: erp5/trunk/products/ERP5/tests/testERP5Base.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testERP5Base.py?rev=24426&r1=24425&r2=24426&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testERP5Base.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testERP5Base.py [utf8] Thu Oct 30 15:32:43 2008
@@ -1076,6 +1076,7 @@
['+111/1/1111 1100/111', '+111(0)1-11111100/111'],
['+111/1/1111 1100/', '+111(0)1-11111100'],
['+111/1/1111 1100', '+111(0)1-11111100'],
+ ['+11(0)11-1111-1111/111', '+11(0)11-11111111/111'],
]
for i in input_list:
More information about the Erp5-report
mailing list