[pkg-fso-commits] [SCM] FSO frameworkd Debian packaging branch, debian, updated. upstream/0.9.5.5-717-g0f98819
Sebastian Krzyszkowiak
seba.dos1 at gmail.com
Sat Aug 6 08:18:45 UTC 2011
The following commit has been merged in the debian branch:
commit 050df576db5782faa3f0971b111258ee13c8dffb
Author: Sebastian Krzyszkowiak <seba.dos1 at gmail.com>
Date: Sat Dec 5 20:51:12 2009 +0100
opimd: remove all old handling of 'tel:' URI
diff --git a/framework/subsystems/opimd/helpers.py b/framework/subsystems/opimd/helpers.py
index 9d73ac3..9cc0462 100644
--- a/framework/subsystems/opimd/helpers.py
+++ b/framework/subsystems/opimd/helpers.py
@@ -28,27 +28,16 @@ def field_value_to_list(field_value):
return [ field_value ]
#----------------------------------------------------------------------------#
-def phone_number_to_tel_uri(phone_num):
-#----------------------------------------------------------------------------#
- """Transforms a regular phone number into a tel URI"""
-
- uri = "tel:"
-
- uri += phone_num
- return uri
-
-
-#----------------------------------------------------------------------------#
-def get_compare_for_tel(tel_value):
+def make_comp_value(value):
#----------------------------------------------------------------------------#
"""Determines and returns a representation of a tel URI that is comparable to human input"""
# Remove tel:
- res = tel_value[4:]
+ #res = tel_value[4:]
- res = normalize_number(res)
+ #res = normalize_number(res)
- return 'tel:'+res
+ return res
#----------------------------------------------------------------------------#
class InvalidBackend( DBusException ):
diff --git a/framework/subsystems/opimd/pimb_sim_contacts_fso.py b/framework/subsystems/opimd/pimb_sim_contacts_fso.py
index 765878b..2e739d6 100644
--- a/framework/subsystems/opimd/pimb_sim_contacts_fso.py
+++ b/framework/subsystems/opimd/pimb_sim_contacts_fso.py
@@ -107,7 +107,7 @@ class SIMContactBackendFSO(Backend):
if field=='Name':
name=value
elif field=='Phone':
- phone=value.replace('tel:','')
+ phone=value
elif field=='_backend_entry_id':
entry_id=int(value)
self.gsm_sim_iface.StoreEntry('contacts', entry_id, name, phone, reply_handler=self.dbus_ok, error_handler=self.dbus_err)
@@ -120,7 +120,7 @@ class SIMContactBackendFSO(Backend):
if field=='Name':
name=value
elif field=='Phone':
- phone=value.replace('tel:','')
+ phone=value
ret = 1
sim_ids = []
for con in self._domain_handlers['Contacts'].enumerate_items(self):
diff --git a/framework/subsystems/opimd/pimd_generic.py b/framework/subsystems/opimd/pimd_generic.py
index 5a8022c..65833d1 100644
--- a/framework/subsystems/opimd/pimd_generic.py
+++ b/framework/subsystems/opimd/pimd_generic.py
@@ -135,15 +135,6 @@ class GenericEntry():
except KeyError:
self._field_idx[field_name] = [field_idx]
- def make_comp_value(self, field_value):
- # We only generate compare values for specific fields
- try:
- if isinstance(field_value, (str, unicode, dbus.String)) and field_value.startswith('tel:'):
- return get_compare_for_tel(field_value)
- except Exception, exp:
- logger.error(str(exp))
- return ''
-
def import_fields(self, entry_data, backend_name):
"""Adds an array of entry data fields to this entry
@@ -409,7 +400,7 @@ class GenericEntry():
field_value = str(query_obj[field_name])
best_field_match = 0.0
- if field_value.startswith('tel:'): field_value=re.escape(get_compare_for_tel(field_value))+'$'
+ #if field_value.startswith('tel:'): field_value=re.escape(get_compare_for_tel(field_value))+'$'
matcher = re.compile(field_value)
--
FSO frameworkd Debian packaging
More information about the pkg-fso-commits
mailing list