From 8303b85156c36e9c626f76a961a93f3e0dc69249 Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Mon, 24 Jul 2006 06:17:50 +0000 Subject: [PATCH] fix ugly profile hack git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@620 839d8a87-29fc-0310-9880-83ba4fa771e5 --- include/profil/assign_adresses.inc.php | 3 +++ include/profil/get_adresses.inc.php | 2 ++ include/profil/update_adresses.inc.php | 1 + include/profil/verif_adresses.inc.php | 1 + templates/profil/adresses.tpl | 28 ++++++++++++++-------------- 5 files changed, 21 insertions(+), 14 deletions(-) diff --git a/include/profil/assign_adresses.inc.php b/include/profil/assign_adresses.inc.php index 6bdc2a4..9a9912e 100644 --- a/include/profil/assign_adresses.inc.php +++ b/include/profil/assign_adresses.inc.php @@ -18,6 +18,9 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ***************************************************************************/ + +global $adresses; + //on génère une éventuelle nouvelle adresse if (!isset($adresses) || (count($adresses) < $nb_adr_max)){ $adrid = generate_new_adrid(); diff --git a/include/profil/get_adresses.inc.php b/include/profil/get_adresses.inc.php index 928e4e7..d31c651 100644 --- a/include/profil/get_adresses.inc.php +++ b/include/profil/get_adresses.inc.php @@ -21,6 +21,8 @@ require_once('geoloc.inc.php'); +global $adresses; + // on limite à 6 adresses personnelles par utilisateur $nb_adr_max = 6; // ( = max(adrid possibles) // on limite à 4 numéros de téléphone par adresse diff --git a/include/profil/update_adresses.inc.php b/include/profil/update_adresses.inc.php index 49c09ba..79bbab7 100644 --- a/include/profil/update_adresses.inc.php +++ b/include/profil/update_adresses.inc.php @@ -19,6 +19,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ***************************************************************************/ +global $adresses; reset($adresses); function insert_new_tel($adrid, $tel) { diff --git a/include/profil/verif_adresses.inc.php b/include/profil/verif_adresses.inc.php index 6c4495d..fbf0049 100644 --- a/include/profil/verif_adresses.inc.php +++ b/include/profil/verif_adresses.inc.php @@ -19,6 +19,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ***************************************************************************/ +global $adresses; function generate_new_adrid(){ global $adresses; diff --git a/templates/profil/adresses.tpl b/templates/profil/adresses.tpl index 63f4e27..666e97e 100644 --- a/templates/profil/adresses.tpl +++ b/templates/profil/adresses.tpl @@ -98,20 +98,20 @@ {foreach from=$adr.tels item="tel"} - - - - {if $tel.new_tel} - - {/if} - {$tel.tel_type} : - - - - - - {include file="include/flags.radio.tpl" name="tel_pub`$tel.telid`[$adrid]" val=$tel.tel_pub display="mini"} - + + + + {if $tel.new_tel} + + {/if} + {$tel.tel_type} : + + + + + + {include file="include/flags.radio.tpl" name="tel_pub`$tel.telid`[$adrid]" val=$tel.tel_pub display="mini"} + {/foreach}   {/section} -- 2.1.4