From 3457a732f52a017e4dab55a43346f0952c9591e7 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Wed, 25 Nov 2015 20:19:18 +0100 Subject: [PATCH 1/5] New: Better integration of skype --- htdocs/admin/skype.php | 166 +++++++++++++++++++++++ htdocs/core/class/commonobject.class.php | 1 + htdocs/core/modules/modSkype.class.php | 6 +- htdocs/langs/en_US/admin.lang | 5 + 4 files changed, 175 insertions(+), 3 deletions(-) create mode 100644 htdocs/admin/skype.php diff --git a/htdocs/admin/skype.php b/htdocs/admin/skype.php new file mode 100644 index 00000000000..a1778afd101 --- /dev/null +++ b/htdocs/admin/skype.php @@ -0,0 +1,166 @@ + + * + * 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 + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/admin/skype.php + * \ingroup Skype + * \brief Skype module setup page + */ +require('../main.inc.php'); +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; + +$langs->load("admin"); + +if (! $user->admin) + accessforbidden(); + +$action = GETPOST('action', 'alpha'); + +/* + * Actions + */ +if (preg_match('/set_(.*)/',$action,$reg)) +{ + $code=$reg[1]; + $value=(GETPOST($code) ? GETPOST($code) : 1); + if (dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity) > 0) + { + Header("Location: ".$_SERVER["PHP_SELF"]); + exit; + } + else + { + dol_print_error($db); + } +} + +else if (preg_match('/del_(.*)/',$action,$reg)) +{ + $code=$reg[1]; + if (dolibarr_del_const($db, $code, $conf->entity) > 0) + { + Header("Location: ".$_SERVER["PHP_SELF"]); + exit; + } + else + { + dol_print_error($db); + } +} + +/* + * View + */ +llxHeader('', $langs->trans('Parameters')); + +$form = new Form($db); + +dol_htmloutput_mesg($mesg); + +// Subheader +$linkback = '' . $langs->trans("BackToModuleList") . ''; +print load_fiche_titre($langs->trans("SkypeSetup"), $linkback); + +// Configuration header +$h = 0; +$head = array (); + +$head[$h][0] = dol_buildpath('/admin/skype.php', 1); +$head[$h][1] = $langs->trans("Configuration"); +$head[$h][2] = 'parameters'; +$h ++; + +dol_fiche_head($head, 'parameters', $langs->trans("Skype"), 0, "skype"); + +if (! $conf->use_javascript_ajax) { + print '
'; + print ''; + print ''; +} + +print ''; +print ''; +print ''; +print "\n"; + +$var = ! $var; + +print ''; +print ''; +print ''; + +print ''; +print ''; +print ''; + +print ''; +print ''; +print ''; + +print "
' . $langs->trans('Parameters') . '
' . $langs->trans("SkypeDeactivateInUser") . ''; +if ($conf->use_javascript_ajax) { + print ajax_constantonoff('SKYPE_DEACTIVATE_IN_USER'); +} +else +{ + if (empty($conf->global->SKYPE_DEACTIVATE_IN_USER)) + { + print ''.img_picto($langs->trans("Disabled"),'switch_off').''; + } + else + { + print ''.img_picto($langs->trans("Enabled"),'switch_on').''; + } +} +print '
' . $langs->trans("SkypeDeactivateInContact") . ''; +if ($conf->use_javascript_ajax) { + print ajax_constantonoff('SKYPE_DEACTIVATE_IN_CONTACT'); +} +else +{ + if (empty($conf->global->SKYPE_DEACTIVATE_IN_CONTACT)) + { + print ''.img_picto($langs->trans("Disabled"),'switch_off').''; + } + else + { + print ''.img_picto($langs->trans("Enabled"),'switch_on').''; + } +} +print '
' . $langs->trans("SkypeDeactivateInMember") . ''; +if ($conf->use_javascript_ajax) { + print ajax_constantonoff('SKYPE_DEACTIVATE_IN_MEMBER'); +} +else +{ + if (empty($conf->global->SKYPE_DEACTIVATE_IN_MEMBER)) + { + print ''.img_picto($langs->trans("Disabled"),'switch_off').''; + } + else + { + print ''.img_picto($langs->trans("Enabled"),'switch_on').''; + } +} +print '
\n"; + +dol_fiche_end(); + +print '
'; + +llxFooter(); +$db->close(); diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 388f51e7dc5..9cb9a3d45ab 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -9,6 +9,7 @@ * Copyright (C) 2012-2015 Marcos García * Copyright (C) 2012-2015 Raphaël Doursenaud * Copyright (C) 2012 Cedric Salvador + * Copyright (C) 2015 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 diff --git a/htdocs/core/modules/modSkype.class.php b/htdocs/core/modules/modSkype.class.php index 280b871e475..2c7686d9349 100644 --- a/htdocs/core/modules/modSkype.class.php +++ b/htdocs/core/modules/modSkype.class.php @@ -42,8 +42,8 @@ class modSkype extends DolibarrModules $this->db = $db; $this->numero = 3100; - // Family can be 'crm','financial','hr','projects','products','ecm','technic','other' - // It is used to group modules in module setup page + // Family can be 'crm','financial','hr','projects','products','ecm','technic','other' + // It is used to group modules in module setup page $this->family = "crm"; // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) $this->name = preg_replace('/^mod/i','',get_class($this)); @@ -61,7 +61,7 @@ class modSkype extends DolibarrModules // Config pages //------------- - $this->config_page_url = array(); + $this->config_page_url = array("skype.php"); // Dependancies //------------- diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index b497bb45fc7..fff2ea5c32f 100755 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1249,6 +1249,11 @@ AddSubscriptionIntoAccount=Suggest by default to create a bank transaction, in b AdherentLoginRequired= Manage a Login for each member AdherentMailRequired=EMail required to create a new member MemberSendInformationByMailByDefault=Checkbox to send mail confirmation to members (validation or new subscription) is on by default +##### Skype setup ##### +SkypeSetup=Skype module setup +SkypeDeactivateInUser=Deactivate Skype in user card +SkypeDeactivateInContact=Deactivate Skype in contact card +SkypeDeactivateInMember=Deactivate Skype in member card ##### LDAP setup ##### LDAPSetup=LDAP Setup LDAPGlobalParameters=Global parameters From cb6038e125fd21cb393d8053d14a6f674088fa54 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Thu, 26 Nov 2015 07:10:13 +0100 Subject: [PATCH 2/5] Better code for admin skype --- htdocs/admin/skype.php | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/htdocs/admin/skype.php b/htdocs/admin/skype.php index a1778afd101..db942beb8ad 100644 --- a/htdocs/admin/skype.php +++ b/htdocs/admin/skype.php @@ -25,10 +25,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; $langs->load("admin"); -if (! $user->admin) - accessforbidden(); - -$action = GETPOST('action', 'alpha'); +if (! $user->admin) accessforbidden(); /* * Actions @@ -65,16 +62,15 @@ else if (preg_match('/del_(.*)/',$action,$reg)) /* * View */ +$help_url=''; llxHeader('', $langs->trans('Parameters')); -$form = new Form($db); - -dol_htmloutput_mesg($mesg); - -// Subheader $linkback = '' . $langs->trans("BackToModuleList") . ''; print load_fiche_titre($langs->trans("SkypeSetup"), $linkback); +$var=true; +$form = new Form($db); + // Configuration header $h = 0; $head = array (); @@ -86,12 +82,6 @@ $h ++; dol_fiche_head($head, 'parameters', $langs->trans("Skype"), 0, "skype"); -if (! $conf->use_javascript_ajax) { - print '
'; - print ''; - print ''; -} - print ''; print ''; print ''; @@ -99,9 +89,11 @@ print "\n"; $var = ! $var; -print ''; +print ''; +print ''; print ''; print ''; -print ''; +print ''; +print ''; print ''; print ''; -print ''; +print ''; +print ''; print ''; } - // Skype - if (! empty($conf->skype->enabled)) - { - print ''; - } - print ''; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 9cb9a3d45ab..bba17f50d11 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -530,7 +530,9 @@ abstract class CommonObject } if (! empty($conf->skype->enabled)) { - if ($this->skype) $out.=($outdone?'
':'').dol_print_skype($this->skype,$this->id,$object->id,'AC_SKYPE'); + $out.='
'; + if ($this->skype) $out.=dol_print_skype($this->skype,$this->id,$object->id,'AC_SKYPE'); + $outdone++; } $out.=''; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index e9251da148e..82d5c52c575 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1520,14 +1520,18 @@ function dol_print_skype($skype,$cid=0,$socid=0,$addlink=0,$max=64) if (! empty($addlink)) { - $newskype='trans("Call").' '.$skype.'" title="'.$langs->trans("Call").' '.$skype.'">'; - $newskype.=''; - $newskype.='    '; + $newskype.='   '; - $newskype.=''; + $newskype.=''; $newskype.=''; if (($cid || $socid) && ! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create) diff --git a/htdocs/core/modules/modSkype.class.php b/htdocs/core/modules/modSkype.class.php index 2c7686d9349..d6017b06c16 100644 --- a/htdocs/core/modules/modSkype.class.php +++ b/htdocs/core/modules/modSkype.class.php @@ -61,7 +61,7 @@ class modSkype extends DolibarrModules // Config pages //------------- - $this->config_page_url = array("skype.php"); + $this->config_page_url = array(); // Dependancies //------------- diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index fff2ea5c32f..232eb3e573f 100755 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -540,7 +540,7 @@ Module2800Desc=FTP Client Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind conversions capabilities Module3100Name=Skype -Module3100Desc=Add a Skype button into card of adherents / third parties / contacts +Module3100Desc=Add a Skype button into card of users / third parties / contacts / members Module4000Name=HRM Module4000Desc=Human resources management Module5000Name=Multi-company @@ -1249,11 +1249,6 @@ AddSubscriptionIntoAccount=Suggest by default to create a bank transaction, in b AdherentLoginRequired= Manage a Login for each member AdherentMailRequired=EMail required to create a new member MemberSendInformationByMailByDefault=Checkbox to send mail confirmation to members (validation or new subscription) is on by default -##### Skype setup ##### -SkypeSetup=Skype module setup -SkypeDeactivateInUser=Deactivate Skype in user card -SkypeDeactivateInContact=Deactivate Skype in contact card -SkypeDeactivateInMember=Deactivate Skype in member card ##### LDAP setup ##### LDAPSetup=LDAP Setup LDAPGlobalParameters=Global parameters diff --git a/htdocs/theme/common/skype_callbutton.png b/htdocs/theme/common/skype_callbutton.png index dd76442627a8c261aef378eb4df40442c8a9f1a2..ceccf2858d2cc06e1dbeeefeda95a6ed3f3b19af 100644 GIT binary patch literal 1377 zcmb_bZ%i9y9KJbcpkZp9ACxaUZ;9&>`sYe}wPy>oy~3JNY}z7ZW(h~{1uk%ZygO_Q zX36$#nhh3olp%qL%MzRh_MwGt-HMx=LS-g)&PgJsi!w3lrzI{~#J7wxKUhEc=DmCW z!K19?g1*=0lGNBf&Fpu z3Wjp518cSTj6TT?y14`WG6?oJhr<0mVH=Cp)uQ$&1qFDZGH8_V6%;D!z&3R$I4^7) zFmw~5_BgOdrrLad)Gf*YwdiYfVIx7HB&jFN7Lp{YQInA{8H})#I>Jm@NXleIw;Bec z$!sSTpc}Sg!IcB+R#k~I7$T8~K2oC>k zQaMpT3yMsK*rz%$==4zvytFMVC|kz_56lo{Bm<#07E&q#eZK#O^87YhQ3K$y-+vWW zLNN�zeV_^b!oW*AFsPvCIF_TPk^(q7ypxdv#)P`KECTy${@R!?EN zUAAzsUHCwN)h@%bK6>Wh0DKZF{-%%zKbgQ!B&tp(aoDGFucz{j=X1v4ORrAcAjht@ zr&hJ2*Q-x2nB$qMk!z6*Dp zXTNexW$~eTZTz}@27*(8^u2+lboY?NQ+s1F`KQpym9=D5W01L9rZn6Ynge1NFG|=Z7ejX*!6y7aWzN z$z6vWFCZ?(l&Bw@ Q+zU-2UQaXqsjL0i--u!+zyJUM literal 989 zcmV<310wv1P)YNnVG5Vx^9`2`6MFI4Gif9;hU98K1dHmm{Ek4MK_`7hH2%hrMb7r zG)RJcs0g}9V&-jkb|%dtR@c=mHNXC6_E;h7S})STZws5UU@@M@tuD;U-yDe55q_@kAGQ}7rn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2+|Yn=~+ z(0bHy#X{VO?paORO}Gec1#NLt#{M}u1Zgw84E*`^|LY|Z;v(h?R!kO1fP6mwb6BuB qU-G%y$v0B+ocP0plAU+VOX=SQUsKZw{}G`80000office_phone = GETPOST("office_phone", 'alpha'); $object->office_fax = GETPOST("office_fax", 'alpha'); $object->user_mobile = GETPOST("user_mobile"); - $object->skype = GETPOST("skype"); + $object->skype = GETPOST("skype", 'alpha'); $object->email = GETPOST("email", 'alpha'); $object->job = GETPOST("job", 'alpha'); $object->signature = GETPOST("signature"); @@ -330,7 +330,7 @@ if (empty($reshook)) { $object->office_phone = GETPOST("office_phone", 'alpha'); $object->office_fax = GETPOST("office_fax", 'alpha'); $object->user_mobile = GETPOST("user_mobile"); - $object->skype = GETPOST("skype"); + $object->skype = GETPOST("skype", 'alpha'); $object->email = GETPOST("email", 'alpha'); $object->job = GETPOST("job", 'alpha'); $object->signature = GETPOST("signature"); @@ -1325,14 +1325,6 @@ else print ''."\n"; } - // Skype - if (! empty($conf->skype->enabled)) - { - print ''; - print ''; - print "\n"; - } - // Signature print ''; } - // Skype - if (! empty($conf->skype->enabled)) - { - print ''; - } - print '
' . $langs->trans('Parameters') . '
' . $langs->trans("SkypeDeactivateInUser") . '
' . $langs->trans("SkypeDeactivateInUser") . ''; -if ($conf->use_javascript_ajax) { +if ($conf->use_javascript_ajax) +{ print ajax_constantonoff('SKYPE_DEACTIVATE_IN_USER'); } else @@ -118,9 +110,11 @@ else print '
' . $langs->trans("SkypeDeactivateInContact") . '
' . $langs->trans("SkypeDeactivateInContact") . ''; -if ($conf->use_javascript_ajax) { +if ($conf->use_javascript_ajax) +{ print ajax_constantonoff('SKYPE_DEACTIVATE_IN_CONTACT'); } else @@ -137,9 +131,11 @@ else print '
' . $langs->trans("SkypeDeactivateInMember") . '
' . $langs->trans("SkypeDeactivateInMember") . ''; -if ($conf->use_javascript_ajax) { +if ($conf->use_javascript_ajax) +{ print ajax_constantonoff('SKYPE_DEACTIVATE_IN_MEMBER'); } else From d12e3ca91fee9a149b8904bc2369bfb6d2aaed5d Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sat, 28 Nov 2015 14:43:16 +0100 Subject: [PATCH 3/5] Finish work on better integration of skype --- htdocs/admin/skype.php | 162 ----------------------- htdocs/contact/card.php | 8 +- htdocs/core/class/commonobject.class.php | 4 +- htdocs/core/lib/functions.lib.php | 12 +- htdocs/core/modules/modSkype.class.php | 2 +- htdocs/langs/en_US/admin.lang | 7 +- htdocs/theme/common/skype_callbutton.png | Bin 989 -> 1377 bytes htdocs/theme/common/skype_chatbutton.png | Bin 916 -> 1244 bytes htdocs/user/card.php | 12 +- 9 files changed, 16 insertions(+), 191 deletions(-) delete mode 100644 htdocs/admin/skype.php diff --git a/htdocs/admin/skype.php b/htdocs/admin/skype.php deleted file mode 100644 index db942beb8ad..00000000000 --- a/htdocs/admin/skype.php +++ /dev/null @@ -1,162 +0,0 @@ - - * - * 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 - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/** - * \file htdocs/admin/skype.php - * \ingroup Skype - * \brief Skype module setup page - */ -require('../main.inc.php'); -require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; - -$langs->load("admin"); - -if (! $user->admin) accessforbidden(); - -/* - * Actions - */ -if (preg_match('/set_(.*)/',$action,$reg)) -{ - $code=$reg[1]; - $value=(GETPOST($code) ? GETPOST($code) : 1); - if (dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity) > 0) - { - Header("Location: ".$_SERVER["PHP_SELF"]); - exit; - } - else - { - dol_print_error($db); - } -} - -else if (preg_match('/del_(.*)/',$action,$reg)) -{ - $code=$reg[1]; - if (dolibarr_del_const($db, $code, $conf->entity) > 0) - { - Header("Location: ".$_SERVER["PHP_SELF"]); - exit; - } - else - { - dol_print_error($db); - } -} - -/* - * View - */ -$help_url=''; -llxHeader('', $langs->trans('Parameters')); - -$linkback = '' . $langs->trans("BackToModuleList") . ''; -print load_fiche_titre($langs->trans("SkypeSetup"), $linkback); - -$var=true; -$form = new Form($db); - -// Configuration header -$h = 0; -$head = array (); - -$head[$h][0] = dol_buildpath('/admin/skype.php', 1); -$head[$h][1] = $langs->trans("Configuration"); -$head[$h][2] = 'parameters'; -$h ++; - -dol_fiche_head($head, 'parameters', $langs->trans("Skype"), 0, "skype"); - -print ''; -print ''; -print ''; -print "\n"; - -$var = ! $var; - -print ''; -print ''; -print ''; -print ''; - -print ''; -print ''; -print ''; -print ''; - -print ''; -print ''; -print ''; -print ''; - -print "
' . $langs->trans('Parameters') . '
' . $langs->trans("SkypeDeactivateInUser") . ''; -if ($conf->use_javascript_ajax) -{ - print ajax_constantonoff('SKYPE_DEACTIVATE_IN_USER'); -} -else -{ - if (empty($conf->global->SKYPE_DEACTIVATE_IN_USER)) - { - print ''.img_picto($langs->trans("Disabled"),'switch_off').''; - } - else - { - print ''.img_picto($langs->trans("Enabled"),'switch_on').''; - } -} -print '
' . $langs->trans("SkypeDeactivateInContact") . ''; -if ($conf->use_javascript_ajax) -{ - print ajax_constantonoff('SKYPE_DEACTIVATE_IN_CONTACT'); -} -else -{ - if (empty($conf->global->SKYPE_DEACTIVATE_IN_CONTACT)) - { - print ''.img_picto($langs->trans("Disabled"),'switch_off').''; - } - else - { - print ''.img_picto($langs->trans("Enabled"),'switch_on').''; - } -} -print '
' . $langs->trans("SkypeDeactivateInMember") . ''; -if ($conf->use_javascript_ajax) -{ - print ajax_constantonoff('SKYPE_DEACTIVATE_IN_MEMBER'); -} -else -{ - if (empty($conf->global->SKYPE_DEACTIVATE_IN_MEMBER)) - { - print ''.img_picto($langs->trans("Disabled"),'switch_off').''; - } - else - { - print ''.img_picto($langs->trans("Enabled"),'switch_on').''; - } -} -print '
\n"; - -dol_fiche_end(); - -print ''; - -llxFooter(); -$db->close(); diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index e49b52b8a90..8022c17de67 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -5,7 +5,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2007 Franky Van Liedekerke * Copyright (C) 2013 Florian Henry - * Copyright (C) 2013 Alexandre Spangaro + * Copyright (C) 2013-2015 Alexandre Spangaro * Copyright (C) 2014 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry * @@ -1156,12 +1156,6 @@ else print '
'.$langs->trans("No_Email").''.yn($object->no_email).'
'.$langs->trans("Skype").''.dol_print_skype($object->skype,0,$object->fk_soc,1).'
'.$langs->trans("ContactVisibility").''; print $object->LibPubPriv($object->priv); print '
'.$langs->trans("Skype").''.dol_print_skype($object->skype,0,0,1).'
'.$langs->trans('Signature').''; print dol_htmlentitiesbr($object->signature); From 0a3ab4617ccf36db218e64a4a94b2de8e3dc6de5 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sat, 28 Nov 2015 14:52:13 +0100 Subject: [PATCH 4/5] Fix adherent width colomn of create type form --- htdocs/adherents/type.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index af708ef2f20..e2fc32f3bcb 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -242,15 +242,14 @@ if ($action == 'create') print '
'; print ''; + print ''; dol_fiche_head(''); print ''; print ''; - print ''; - - print ''; + print ''; print ''; } - // Skype - if (! empty($conf->skype->enabled)) - { - print ''; - } - print '
'.$langs->trans("Label").'
'.$langs->trans("Label").'
'.$langs->trans("SubscriptionRequired").''; print $form->selectyesno("cotisation",1,1); From 8bf66d2f5856ca1bf53a79ef05607951c5d0d87e Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sat, 28 Nov 2015 15:09:08 +0100 Subject: [PATCH 5/5] Remove skype also in member card - already present in dol_banner --- htdocs/adherents/card.php | 7 ------- htdocs/adherents/card_subscriptions.php | 6 ------ 2 files changed, 13 deletions(-) diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index f998c2f08a3..503eddfbbb7 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -1400,7 +1400,6 @@ else $rowspan=17; if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) $rowspan++; if (! empty($conf->societe->enabled)) $rowspan++; - if (! empty($conf->skype->enabled)) $rowspan++; $linkback = ''.$langs->trans("BackToList").''; @@ -1445,12 +1444,6 @@ else print '
'.$langs->trans("Skype").''.dol_print_skype($object->skype,0,$object->fk_soc,1).'
'; print ''; diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index 9d86f618618..38c6f254bda 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -610,12 +610,6 @@ if ($rowid > 0) print '
'.$langs->trans("Skype").''.dol_print_skype($object->skype,0,$object->fk_soc,1).'
'; print '';