fix profiles urls
This commit is contained in:
parent
5e5c25a2c1
commit
3f48882844
3 changed files with 8 additions and 4 deletions
|
|
@ -206,8 +206,8 @@ class AuMBackend(BaseBackend, ICapMessages, ICapMessagesPost, ICapDating, ICapCh
|
|||
flags |= Message.IS_ACCUSED
|
||||
|
||||
signature = u''
|
||||
#if mail['src']:
|
||||
# signature += u'Sent from my %s\n\n' % mail['src']
|
||||
if mail.get('src', None):
|
||||
signature += u'Sent from my %s\n\n' % mail['src']
|
||||
if mail['id_from'] in contacts:
|
||||
signature += contacts[mail['id_from']].get_text()
|
||||
|
||||
|
|
|
|||
|
|
@ -77,13 +77,17 @@ class AuMBrowser(BaseBrowser):
|
|||
my_coords = (0,0)
|
||||
|
||||
def id2url(self, id):
|
||||
return 'http://www.adopteunmec.com/%s' % id
|
||||
return 'http://www.adopteunmec.com/index.php/profile/%s' % id
|
||||
|
||||
def url2id(func):
|
||||
def inner(self, id, *args, **kwargs):
|
||||
m = re.match('^http://.*adopteunmec.com.*/(\d+)$', str(id))
|
||||
if m:
|
||||
id = int(m.group(1))
|
||||
else:
|
||||
m = re.match('^http://.*adopteunmec.com/index.php/profile/(\d+).*', str(id))
|
||||
if m:
|
||||
id = int(m.group(1))
|
||||
return func(self, id, *args, **kwargs)
|
||||
return inner
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ class FieldProfileURL(FieldBase):
|
|||
def get_value(self, profile, consts):
|
||||
id = int(profile[self.key])
|
||||
if id > 0:
|
||||
return 'http://www.adopteunmec.com/%d' % id
|
||||
return 'http://www.adopteunmec.com/index.php/profile/%d' % id
|
||||
else:
|
||||
return ''
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue