/* Validite des flags de transmission */
check("SELECT u.user_id, nom, prenom, promo,
- profile_mobile_pub, emails_alias_pub, profile_web_pub, profile_freetext_pub, profile_medals_pub
+ profile_mobile_pub, emails_alias_pub, profile_freetext_pub, profile_medals_pub
FROM auth_user_md5 AS u
INNER JOIN auth_user_quick AS q USING(user_id)
WHERE (profile_mobile_pub != 'private' AND profile_mobile_pub != 'ax' AND profile_mobile_pub != 'public')
OR (emails_alias_pub != 'private' AND emails_alias_pub != 'public')
- OR (profile_web_pub != 'private' AND profile_web_pub != 'public')
OR (profile_freetext_pub != 'private' AND profile_freetext_pub != 'public')
OR (profile_medals_pub != 'private' AND profile_medals_pub != 'public')",
"Utilisateur n'ayant pas de flag de publicite pour leurs donnees de profil");
check("select uid from adresses where pub != 'private' and pub !='ax' and pub != 'public'", "Utiliseur n'ayant pas de flag de publicite pour une adresse");
check("select uid from tels where tel_pub != 'private' and tel_pub !='ax' and tel_pub != 'public'", "Utiliseur n'ayant pas de flag de publicite pour un numero de telephone");
+check("select uid from profile_networking where pub != 'private' and pub != 'public'", "Utiliseur n'ayant pas de flag de publicité pour une adresse de networking");
/* validite de aliases */
check("SELECT a.*
'mobile' => 'Son numéro de téléphone portable',
'nationalite' => 'Sa nationalité',
'nick' => 'Son surnom',
- 'web' => 'L\'adresse de son site web',
+ 'networking' => 'La liste de ses adresses de networking',
'appli1' => 'Son école d\'application',
'appli2' => 'Son école de post-application',
'addresses' => 'Ses adresses',
// don't modify mobile if you don't have the right
if (isset($b['mobile_pub']) && !has_user_right($b['mobile_pub'], $view) && isset($c['mobile']))
unset($c['mobile']);
- if (isset($b['web_pub']) && !has_user_right($b['web_pub'], $view) && isset($c['web']))
- unset($c['web']);
if (isset($b['freetext_pub']) && !has_user_right($b['freetext_pub'], $view) && isset($c['freetext']))
unset($c['freetext']);
if (!count($c))
{
$reqsql = "SELECT u.user_id, u.promo, u.promo_sortie, u.prenom, u.nom, u.nom_usage, u.date, u.cv,
u.perms IN ('admin','user','disabled') AS inscrit, FIND_IN_SET('femme', u.flags) AS sexe, u.deces != 0 AS dcd, u.deces,
- q.profile_nick AS nickname, q.profile_from_ax, q.profile_mobile AS mobile, q.profile_web AS web, q.profile_freetext AS freetext,
- q.profile_mobile_pub AS mobile_pub, q.profile_web_pub AS web_pub, q.profile_freetext_pub AS freetext_pub,
+ q.profile_nick AS nickname, q.profile_from_ax, q.profile_mobile AS mobile, q.profile_freetext AS freetext,
+ q.profile_mobile_pub AS mobile_pub, q.profile_freetext_pub AS freetext_pub,
q.profile_medals_pub AS medals_pub,
IF(gp.nat='',gp.pays,gp.nat) AS nationalite, gp.a2 AS iso3166,
a.alias AS forlife, a2.alias AS bestalias,
else
$user['mobile'] = '';
}
- // hide web
- if (!has_user_right($user['web_pub'], $view)) {
- if ($user['web'] == '')
- $user['web_pub'] = $view;
- else
- $user['web'] = '';
- }
+
// hide freetext
if (!has_user_right($user['freetext_pub'], $view)) {
if ($user['freetext'] == '')
= new ProfileNom();
$this->settings['naissance'] = new ProfileDate();
$this->settings['mobile_pub']
- = $this->settings['web_pub']
= $this->settings['freetext_pub']
= $this->settings['photo_pub']
= new ProfilePub();
$this->settings['synchro_ax']
= new ProfileBool();
$this->settings['mobile'] = new ProfileTel();
- $this->settings['web'] = new ProfileWeb();
$this->settings['networking'] = new ProfileNetworking();
$this->settings['appli1']
= $this->settings['appli2']
= new ProfileAppli();
- $this->watched= array('nom' => true, 'freetext' => true, 'mobile' => true, 'web' => true,
+ $this->watched= array('nom' => true, 'freetext' => true, 'mobile' => true, 'networking' => true,
'appli1' => true, 'appli2' => true, 'nationalite' => true, 'nick' => true);
}
// Checkout all data...
$res = XDB::query("SELECT u.promo, u.promo_sortie, u.nom_usage, u.nationalite, u.naissance,
q.profile_mobile as mobile, q.profile_mobile_pub as mobile_pub,
- q.profile_web as web, q.profile_web_pub as web_pub,
q.profile_freetext as freetext, q.profile_freetext_pub as freetext_pub,
q.profile_nick as nick, q.profile_from_ax as synchro_ax, u.matricule_ax,
IF(a1.aid IS NULL, -1, a1.aid) as appli_id1, a1.type as appli_type1,
S::v('uid'));
}
if ($this->changed['nick'] || $this->changed['mobile'] || $this->changed['mobile_pub']
- || $this->changed['web'] || $this->changed['web_pub'] || $this->changed['freetext']
+ || $this->changed['freetext']
|| $this->changed['freetext_pub'] || $this->changed['synchro_ax']) {
XDB::execute("UPDATE auth_user_quick
SET profile_nick= {?}, profile_mobile={?}, profile_mobile_pub={?},
- profile_web={?}, profile_web_pub={?}, profile_freetext={?},
+ profile_freetext={?},
profile_freetext_pub={?}, profile_from_ax = {?}
WHERE user_id = {?}",
$this->values['nick'], $this->values['mobile'], $this->values['mobile_pub'],
- $this->values['web'], $this->values['web_pub'],
$this->values['freetext'], $this->values['freetext_pub'],
$this->values['synchro_ax'], S::v('uid'));
}
// hide private information if not logged
if (S::logged())
$globals->search->result_fields .='
- q.profile_web AS web,
q.profile_mobile AS mobile,
q.profile_freetext AS freetext,
adr.city, gp.pays AS countrytxt, gr.name AS region,
nwe.name AS networking_name,';
else
$globals->search->result_fields .="
- IF(q.profile_web_pub='public', q.profile_web, '') AS web,
IF(q.profile_mobile_pub='public', q.profile_mobile, '') AS mobile,
IF(q.profile_freetext_pub='public', q.profile_freetext, '') AS freetext,
IF(adr.pub='public', adr.city, '') AS city,
{/if}
{/foreach}
{/foreach}
-{if $vcard.web}
-URL:{$vcard.web}
+{foreach from=$vcard.networking item=nw}
+{if $nw.filter eq 'web'}
+URL:{$nw.address}
{/if}
+{/foreach}
{if strlen(trim($vcard.freetext)) == 0}
NOTE:(X{$vcard.promo})
{else}
<input type="checkbox" name="freetext_pub" {if $freetext_pub eq 'public'}checked="checked"{/if} />
{icon name="flag_green" title="site public"}
</span>
- <span class="titre">Complément libre</span><br />
- <span class="comm">Commentaire ? ICQ ? etc...</span>
+ <span class="titre">Commentaire</span>
</div>
<div class="smaller" style="margin-top: 30px">
<a href="wiki_help/notitle" class="popup3">
PRIMARY KEY (`uid`, `nwid`)
) CHARSET=utf8 COMMENT='networking addresses';
-
+-- Insert a first address type for old URLs
INSERT INTO `profile_networking_enum` (`network_type`, `name`, `icon`, `filter`)
VALUES (0, 'Page web', 'web.gif', 'web');
FROM `auth_user_quick`
WHERE `profile_web` <> "";
+-- Modify watch_profile to update 'field' from web to networking
+ALTER TABLE `watch_profile`
+ MODIFY `field` enum('nom', 'freetext', 'mobile', 'nationalite', 'nick',
+ 'web', 'networking', 'appli1', 'appli2', 'addresses',
+ 'section', 'binets', 'medals', 'cv', 'jobs', 'photo');
+
+UPDATE `watch_profile` SET `field` = 'networking' WHERE `field` = 'web';
+
+ALTER TABLE `watch_profile`
+ MODIFY `field` enum('nom', 'freetext', 'mobile', 'nationalite', 'nick',
+ 'networking', 'appli1', 'appli2', 'addresses',
+ 'section', 'binets', 'medals', 'cv', 'jobs', 'photo');
+
+-- Drop old web URL columns
+ALTER TABLE `auth_user_quick` DROP COLUMN `profile_web`;
+ALTER TABLE `auth_user_quick` DROP COLUMN `profile_web_pub`;
+