Merge pull request #1287 from aspangaro/develop

Update Skype module
This commit is contained in:
Laurent Destailleur 2013-11-09 16:07:23 -08:00
commit 238b483ad8
5 changed files with 67 additions and 5 deletions

View File

@ -585,7 +585,7 @@ if ($id > 0 || ! empty($ref))
$banklinestatic->fetch($links[$key]['url_id']);
$bankstatic->id=$banklinestatic->fk_account;
$bankstatic->label=$banklinestatic->bank_account_label;
print ' ('.$langs->trans("from").' ';
print ' ('.$langs->trans("TransferFrom").' ';
print $bankstatic->getNomUrl(1,'transactions');
print ' '.$langs->trans("toward").' ';
$bankstatic->id=$objp->bankid;
@ -597,7 +597,7 @@ if ($id > 0 || ! empty($ref))
{
$bankstatic->id=$objp->bankid;
$bankstatic->label=$objp->bankref;
print ' ('.$langs->trans("from").' ';
print ' ('.$langs->trans("TransferFrom").' ';
print $bankstatic->getNomUrl(1,'');
print ' '.$langs->trans("toward").' ';
$banklinestatic->fetch($links[$key]['url_id']);

View File

@ -487,6 +487,8 @@ Module2700Desc= Utilise le service en ligne Gravatar (www.gravatar.com) pour aff
Module2800Desc=Client FTP
Module2900Name= GeoIPMaxmind
Module2900Desc= Capacités de conversion GeoIP Maxmind
Module3100Name= Skype
Module3100Desc= Ajouter un button Skype dans les fiches adhérents / tiers / contacts
Module5000Name=Multi-société
Module5000Desc=Permet de gérer plusieurs sociétés
Module6000Name=Workflow

View File

@ -66,6 +66,8 @@ Country=Pays
CountryCode=Code pays
CountryId=Identifiant pays
Phone=Téléphone
Skype=Skype
Call=Appeler
PhonePro=Tél pro.
PhonePerso=Tél perso.
PhoneMobile=Tél portable

View File

@ -8,6 +8,7 @@
* Copyright (C) 2005 Lionel Cousteix <etm_ltd@tiscali.co.uk>
* Copyright (C) 2011 Herve Prot <herve.prot@symeos.com>
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -50,6 +51,7 @@ class User extends CommonObject
var $firstname;
var $note;
var $email;
var $skype;
var $job;
var $signature;
var $office_phone;
@ -140,7 +142,7 @@ class User extends CommonObject
$login=trim($login);
// Get user
$sql = "SELECT u.rowid, u.lastname, u.firstname, u.email, u.job, u.signature, u.office_phone, u.office_fax, u.user_mobile,";
$sql = "SELECT u.rowid, u.lastname, u.firstname, u.email, u.job, u.skype, u.signature, u.office_phone, u.office_fax, u.user_mobile,";
$sql.= " u.admin, u.login, u.note,";
$sql.= " u.pass, u.pass_crypted, u.pass_temp,";
$sql.= " u.fk_societe, u.fk_socpeople, u.fk_member, u.fk_user, u.ldap_sid,";
@ -203,6 +205,7 @@ class User extends CommonObject
$this->office_fax = $obj->office_fax;
$this->user_mobile = $obj->user_mobile;
$this->email = $obj->email;
$this->skype = $obj->skype;
$this->job = $obj->job;
$this->signature = $obj->signature;
$this->admin = $obj->admin;
@ -917,6 +920,7 @@ class User extends CommonObject
$this->lastname = $contact->lastname;
$this->firstname = $contact->firstname;
$this->email = $contact->email;
$this->skype = $contact->skype;
$this->office_phone = $contact->phone_pro;
$this->office_fax = $contact->fax;
$this->user_mobile = $contact->phone_mobile;
@ -1110,6 +1114,7 @@ class User extends CommonObject
$this->office_fax = trim($this->office_fax);
$this->user_mobile = trim($this->user_mobile);
$this->email = trim($this->email);
$this->skype = trim($this->skype);
$this->job = trim($this->job);
$this->signature = trim($this->signature);
$this->note = trim($this->note);
@ -1145,6 +1150,7 @@ class User extends CommonObject
$sql.= ", office_fax = '".$this->db->escape($this->office_fax)."'";
$sql.= ", user_mobile = '".$this->db->escape($this->user_mobile)."'";
$sql.= ", email = '".$this->db->escape($this->email)."'";
$sql.= ", skype = '".$this->db->escape($this->skype)."'";
$sql.= ", job = '".$this->db->escape($this->job)."'";
$sql.= ", signature = '".$this->db->escape($this->signature)."'";
$sql.= ", accountancy_code = '".$this->db->escape($this->accountancy_code)."'";
@ -1206,6 +1212,7 @@ class User extends CommonObject
$adh->societe=(empty($adh->societe) && $this->societe_id ? $this->societe_id : $adh->societe);
$adh->email=$this->email;
$adh->skype=$this->skype;
$adh->phone=$this->office_phone;
$adh->phone_mobile=$this->user_mobile;
@ -1914,6 +1921,7 @@ class User extends CommonObject
if ($this->office_fax && ! empty($conf->global->LDAP_FIELD_FAX)) $info[$conf->global->LDAP_FIELD_FAX] = $this->office_fax;
if ($this->note && ! empty($conf->global->LDAP_FIELD_DESCRIPTION)) $info[$conf->global->LDAP_FIELD_DESCRIPTION] = $this->note;
if ($this->email && ! empty($conf->global->LDAP_FIELD_MAIL)) $info[$conf->global->LDAP_FIELD_MAIL] = $this->email;
if ($this->skype && ! empty($conf->global->LDAP_FIELD_SKYPE)) $info[$conf->global->LDAP_FIELD_SKYPE] = $this->skype;
if ($conf->global->LDAP_SERVER_TYPE == 'egroupware')
{
@ -1966,6 +1974,7 @@ class User extends CommonObject
$this->firstname='SPECIMEN';
$this->note='This is a note';
$this->email='email@specimen.com';
$this->skype='tom.hanson';
$this->office_phone='0999999999';
$this->office_fax='0999999998';
$this->user_mobile='0999999997';
@ -2113,6 +2122,7 @@ class User extends CommonObject
$this->user_mobile=$ldapuser->{$conf->global->LDAP_FIELD_MOBILE};
$this->office_fax=$ldapuser->{$conf->global->LDAP_FIELD_FAX};
$this->email=$ldapuser->{$conf->global->LDAP_FIELD_MAIL};
$this->skype=$ldapuser->{$conf->global->LDAP_FIELD_SKYPE};
$this->ldap_sid=$ldapuser->{$conf->global->LDAP_FIELD_SID};
$this->job=$ldapuser->{$conf->global->LDAP_FIELD_TITLE};

View File

@ -8,6 +8,7 @@
* Copyright (C) 2011 Herve Prot <herve.prot@symeos.com>
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -184,6 +185,7 @@ if ($action == 'add' && $canadduser)
$object->office_phone = GETPOST("office_phone");
$object->office_fax = GETPOST("office_fax");
$object->user_mobile = GETPOST("user_mobile");
$object->skype = GETPOST("skype");
$object->email = GETPOST("email");
$object->job = GETPOST("job");
$object->signature = GETPOST("signature");
@ -321,10 +323,11 @@ if ($action == 'update' && ! $_POST["cancel"])
$object->office_phone=GETPOST("office_phone");
$object->office_fax = GETPOST("office_fax");
$object->user_mobile= GETPOST("user_mobile");
$object->skype =GETPOST("skype");
$object->email = GETPOST("email");
$object->job = GETPOST("job");
$object->signature = GETPOST("signature");
$object->accountancy_code = GETPOST("accountancy_code");
$object->accountancy_code = GETPOST("accountancy_code");
$object->openid = GETPOST("openid");
$object->fk_user = GETPOST("fk_user")>0?GETPOST("fk_user"):0;
@ -520,6 +523,7 @@ if ($action == 'adduserldap')
$conf->global->LDAP_FIELD_PHONE,
$conf->global->LDAP_FIELD_FAX,
$conf->global->LDAP_FIELD_MOBILE,
$conf->global->LDAP_FIELD_SKYPE,
$conf->global->LDAP_FIELD_MAIL,
$conf->global->LDAP_FIELD_TITLE,
$conf->global->LDAP_FIELD_DESCRIPTION,
@ -548,6 +552,7 @@ if ($action == 'adduserldap')
$ldap_phone = $attribute[$conf->global->LDAP_FIELD_PHONE];
$ldap_fax = $attribute[$conf->global->LDAP_FIELD_FAX];
$ldap_mobile = $attribute[$conf->global->LDAP_FIELD_MOBILE];
$ldap_skype = $attribute[$conf->global->LDAP_FIELD_SKYPE];
$ldap_mail = $attribute[$conf->global->LDAP_FIELD_MAIL];
$ldap_sid = $attribute[$conf->global->LDAP_FIELD_SID];
}
@ -605,9 +610,10 @@ if (($action == 'create') || ($action == 'adduserldap'))
$conf->global->LDAP_FIELD_LOGIN_SAMBA,
$conf->global->LDAP_FIELD_PASSWORD,
$conf->global->LDAP_FIELD_PASSWORD_CRYPTED,
$conf->global->LDAP_FIELD_PHONE,
$conf->global->LDAP_FIELD_PHONE,
$conf->global->LDAP_FIELD_FAX,
$conf->global->LDAP_FIELD_MOBILE,
$conf->global->LDAP_FIELD_SKYPE,
$conf->global->LDAP_FIELD_MAIL,
$conf->global->LDAP_FIELD_TITLE,
$conf->global->LDAP_FIELD_DESCRIPTION,
@ -858,6 +864,23 @@ if (($action == 'create') || ($action == 'adduserldap'))
print '<input size="20" type="text" name="office_fax" value="'.GETPOST('office_fax').'">';
}
print '</td></tr>';
// Skype
if (! empty($conf->skype->enabled))
{
print '<tr><td valign="top">'.$langs->trans("Skype").'</td>';
print '<td>';
if (! empty($ldap_skype))
{
print '<input type="hidden" name="skype" value="'.$ldap_skype.'">';
print $ldap_skype;
}
else
{
print '<input size="40" type="text" name="skype" value="'.GETPOST('skype').'">';
}
print '</td></tr>';
}
// EMail
print '<tr><td valign="top"'.(! empty($conf->global->USER_MAIL_REQUIRED)?' class="fieldrequired"':'').'>'.$langs->trans("EMail").'</td>';
@ -1166,6 +1189,14 @@ else
print '<tr><td valign="top">'.$langs->trans("Fax").'</td>';
print '<td>'.dol_print_phone($object->office_fax,'',0,0,1).'</td>';
print '</tr>'."\n";
// Skype
if (! empty($conf->skype->enabled))
{
print '<tr><td valign="top">'.$langs->trans("Skype").'</td>';
print '<td>'.dol_print_skype($object->skype,0,0,1).'</td>';
print "</tr>\n";
}
// EMail
print '<tr><td valign="top">'.$langs->trans("EMail").'</td>';
@ -1761,6 +1792,23 @@ else
}
print '</td></tr>';
// Skype
if (! empty($conf->skype->enabled))
{
print '<tr><td valign="top">'.$langs->trans("Skype").'</td>';
print '<td>';
if ($caneditfield && empty($object->ldap_sid))
{
print '<input size="40" type="text" name="skype" class="flat" value="'.$object->skype.'">';
}
else
{
print '<input type="hidden" name="skype" value="'.$object->skype.'">';
print $object->skype;
}
print '</td></tr>';
}
// EMail
print "<tr>".'<td valign="top"'.(! empty($conf->global->USER_MAIL_REQUIRED)?' class="fieldrequired"':'').'>'.$langs->trans("EMail").'</td>';
print '<td>';