';
diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php
index c08be97cac4..83da19cb5db 100644
--- a/htdocs/core/lib/company.lib.php
+++ b/htdocs/core/lib/company.lib.php
@@ -1,12 +1,13 @@
- * Copyright (C) 2006 Rodolphe Quiedeville
- * Copyright (C) 2007 Patrick Raguin
- * Copyright (C) 2010-2012 Regis Houssin
- * Copyright (C) 2013 Florian Henry
- * Copyright (C) 2013 Juanjo Menent
+ * Copyright (C) 2006 Rodolphe Quiedeville
+ * Copyright (C) 2007 Patrick Raguin
+ * Copyright (C) 2010-2012 Regis Houssin
+ * Copyright (C) 2013 Florian Henry
+ * Copyright (C) 2013 Juanjo Menent
* Copyright (C) 2013 Christophe Battarel
- * *
+ * Copyright (C) 2013 Alexandre Spangaro
+ *
* 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
* the Free Software Foundation; either version 3 of the License, or
@@ -576,7 +577,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
print_liste_field_titre($langs->trans("PhoneMobile"),$_SERVER["PHP_SELF"],"p.phone_mobile","",$param,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Fax"),$_SERVER["PHP_SELF"],"p.fax","",$param,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("EMail"),$_SERVER["PHP_SELF"],"p.email","",$param,'',$sortfield,$sortorder);
- if (! empty($conf->skype->enabled))
+ if (! empty($conf->skype->enabled) && $user->rights->skype->view)
{
$colspan++;
print '
'.$langs->trans("Skype").'
';
@@ -608,8 +609,8 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
print '
';
- print '
';
- if (! empty($conf->skype->enabled))
+ print '
';
- if (! empty($conf->skype->enabled))
+ if (! empty($conf->skype->enabled) && $user->rights->skype->view)
{
print '
';
print dol_print_skype($obj->skype,$obj->rowid,$object->id,'AC_SKYPE');
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 8da52e301e6..b91a19a9820 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -1190,11 +1190,11 @@ function dol_print_email($email,$cid=0,$socid=0,$addlink=0,$max=64,$showinvalid=
* Show Skype link
*
* @param string $skype Skype to show (only skype, without 'Name of recipient' before)
- * @param int $cid Id of contact if known
+ * @param int $cid Id of contact if known
* @param int $socid Id of third party if known
* @param int $addlink 0=no link to create action
- * @param int $max Max number of characters to show
- * @return string HTML Link
+ * @param int $max Max number of characters to show
+ * @return string HTML Link
*/
function dol_print_skype($skype,$cid=0,$socid=0,$addlink=0,$max=64)
{
@@ -1208,9 +1208,12 @@ function dol_print_skype($skype,$cid=0,$socid=0,$addlink=0,$max=64)
{
$newskype='';
- $newskype.=' ';
+ $newskype.='?call" alt="'.$langs->trans("Call").' '.$skype.'" title="'.$langs->trans("Call").' '.$skype.'">';
+ $newskype.=' ';
+ $newskype.='';
+ $newskype.=' ';
$newskype.='';
if (($cid || $socid) && ! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create)
diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang
index cdf9c3e5770..227ce4442fb 100644
--- a/htdocs/langs/en_US/companies.lang
+++ b/htdocs/langs/en_US/companies.lang
@@ -68,6 +68,7 @@ CountryId=Country id
Phone=Phone
Skype=Skype
Call=Call
+Chat=Chat
PhonePro=Prof. phone
PhonePerso=Pers. phone
PhoneMobile=Mobile
diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php
index 9d5a707aac1..cc4d2c6754f 100644
--- a/htdocs/societe/soc.php
+++ b/htdocs/societe/soc.php
@@ -876,7 +876,7 @@ else
print '
'.$langs->trans('Web').'
';
// Skype
- if (! empty($conf->skype->enabled))
+ if (! empty($conf->skype->enabled) && $user->rights->skype->view)
{
print '
'.$langs->trans('Skype').'
';
}
@@ -1300,7 +1300,7 @@ else
print '
'.$langs->trans('Web').'
';
// Skype
- if (! empty($conf->skype->enabled))
+ if (! empty($conf->skype->enabled) && $user->rights->skype->view)
{
print '