From: Stéphane Jacob Date: Mon, 20 Jul 2009 20:54:14 +0000 (+0200) Subject: Merge commit 'origin/master' into fusionax X-Git-Tag: xorg/1.0.0~332^2~313^2~8 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=429e4a4b8eb428e9631513fc6bb053b4635c7729;p=platal.git Merge commit 'origin/master' into fusionax --- 429e4a4b8eb428e9631513fc6bb053b4635c7729 diff --cc ChangeLog index ec4f070,1e303cf..d3ea9c1 --- a/ChangeLog +++ b/ChangeLog @@@ -1,24 -1,44 +1,62 @@@ ================================================================================ +VERSION 0.f.0 XX XX XXXX + +New: + * Core: + - Centralises email management through an email combobox -JAC + +Bug/Wish: + * Profile: + - #16, #528, #917: Changes job interface, updates business sectors -JAC + - #188: Adds informations about the Corps d'État -JAC + - #209: Thoroughly changes education's implementation -JAC + - #373: User now chooses the name we use to talk to him/her -JAC + - #386: Adds the possibility to fill in multiple nationalities -JAC + - #443: Adds concept of ordinary firstname -JAC + - #450: Adds marital name, thus ordinary name can be any name -JAC + - #891: Improves education display -JAC + +================================================================================ VERSION 0.10.1 XX XX XXXX + New: + + * Events: + - Reminders -JAC/VZA + + Bug/Wish: + + * Admin: + - #965: Prevents password hashes from being broadcasted by email -VZA + + * AXLetter: + - Enables axletter mailings to a subset of subscribers -XEL + + * Core: + - #680: Retrieve dead redirections thanks to inactive redirections -JAC + + * Mail: + - Notifies the sender when a moderated message to a ML is accepted -JAC + - #963: Fixes notification email on removal of "nom d'usage" -VZA + - #972: Adds a legend on the email redirection page -JAC + + * Payment: + - #669: Sends comments with the payment notifications -JAC + + * Profile: + - #951: The address of a dead person is her last address -JAC + - #958: Fix the address in the professionnal vcard -JAC + - #970: Shows a confirmation message when the profile is modified -JAC + + * Marketing: + - #671: Displays more statistics about marketings -JAC + + * Survey: + - #794: Adds wiki syntax to surveys -PIK + + * XnetGrp: + - #973: Only site administrators can allow AX aggregation -JAC + From 0.10.0 branch: * Auth: diff --cc configs/platal.cron.in index 0994ace,a931d67..f2ade2c --- a/configs/platal.cron.in +++ b/configs/platal.cron.in @@@ -4,10 -4,10 +4,11 @@@ WD=/home/web/prod/platal/bin/cro # db 0 5 * * * web cd $WD; ./clean.php - 0 21 * * 1-6 web cd $WD; ./checkdb.php | mail -e -s "verifications sur la BDD de plat/al @VERSION@" br@staff.m4x.org - 0 21 * * 0 web cd $WD; ./checkdb.php -v | mail -e -s "verifications verbose sur la BDD de plat/al @VERSION@" br@staff.m4x.org - 0 20 * * * web cd $WD; ./emails.check.php | mail -e -s "qualite de l'annuaire" br@staff.m4x.org + 0 21 * * 1-6 web cd $WD; ./checkdb.php | mail -e -s "Verifications sur la BDD de plat/al @VERSION@" br@staff.m4x.org + 0 21 * * 0 web cd $WD; ./checkdb.php -v | mail -e -s "Verifications verbeuses sur la BDD de plat/al @VERSION@" br@staff.m4x.org + 0 20 2-31 * * web cd $WD; ./emails.check.php | mail -e -s "Qualite de l'annuaire" br@staff.m4x.org + 0 20 1 * * web cd $WD; ./emails.check.php -v | mail -e -s "Qualite de l'annuaire : verbeux" br@staff.m4x.org +0 22 * * * web cd $WD; ./phones.check.php > /dev/null # inscription report 0 6 * * 1 web cd $WD; ./rapports_inscription.php diff --cc htdocs/xorg.php index 7f1a842,c177d1c..61418cf --- a/htdocs/xorg.php +++ b/htdocs/xorg.php @@@ -22,10 -22,10 +22,11 @@@ require_once dirname(__FILE__).'/../include/xorg.inc.php'; $platal = new Xorg('auth', 'carnet', 'email', 'events', 'forums', - 'geoloc', 'lists', 'marketing', 'payment', 'platal', + 'lists', 'marketing', 'payment', 'platal', 'profile', 'register', 'search', 'stats', 'admin', 'newsletter', 'axletter', 'bandeau', 'survey', - 'fusionax', 'gadgets', 'googleapps', 'poison', 'openid'); - 'gadgets', 'googleapps', 'poison', 'openid', 'reminder'); ++ 'fusionax', 'gadgets', 'googleapps', 'poison', ++ 'openid', 'reminder'); if (!($path = Env::v('n')) || ($path{0} < 'A' || $path{0} > 'Z')) { $platal->run(); diff --cc modules/admin.php index e18a409,9d77934..775d4ff --- a/modules/admin.php +++ b/modules/admin.php @@@ -24,31 -24,30 +24,31 @@@ class AdminModule extends PLModul function handlers() { return array( - 'phpinfo' => $this->make_hook('phpinfo', AUTH_MDP, 'admin'), - 'admin' => $this->make_hook('default', AUTH_MDP, 'admin'), - 'admin/ax-xorg' => $this->make_hook('ax_xorg', AUTH_MDP, 'admin'), - 'admin/dead-but-active' => $this->make_hook('dead_but_active', AUTH_MDP, 'admin'), - 'admin/deaths' => $this->make_hook('deaths', AUTH_MDP, 'admin'), - 'admin/downtime' => $this->make_hook('downtime', AUTH_MDP, 'admin'), - 'admin/homonyms' => $this->make_hook('homonyms', AUTH_MDP, 'admin'), - 'admin/logger' => $this->make_hook('logger', AUTH_MDP, 'admin'), - 'admin/logger/actions' => $this->make_hook('logger_actions', AUTH_MDP, 'admin'), - 'admin/postfix/blacklist' => $this->make_hook('postfix_blacklist', AUTH_MDP, 'admin'), - 'admin/postfix/delayed' => $this->make_hook('postfix_delayed', AUTH_MDP, 'admin'), + 'phpinfo' => $this->make_hook('phpinfo', AUTH_MDP, 'admin'), + 'admin' => $this->make_hook('default', AUTH_MDP, 'admin'), + 'admin/ax-xorg' => $this->make_hook('ax_xorg', AUTH_MDP, 'admin'), + 'admin/dead-but-active' => $this->make_hook('dead_but_active', AUTH_MDP, 'admin'), + 'admin/deaths' => $this->make_hook('deaths', AUTH_MDP, 'admin'), + 'admin/downtime' => $this->make_hook('downtime', AUTH_MDP, 'admin'), + 'admin/homonyms' => $this->make_hook('homonyms', AUTH_MDP, 'admin'), + 'admin/logger' => $this->make_hook('logger', AUTH_MDP, 'admin'), + 'admin/logger/actions' => $this->make_hook('logger_actions', AUTH_MDP, 'admin'), + 'admin/postfix/blacklist' => $this->make_hook('postfix_blacklist', AUTH_MDP, 'admin'), + 'admin/postfix/delayed' => $this->make_hook('postfix_delayed', AUTH_MDP, 'admin'), 'admin/postfix/regexp_bounces' => $this->make_hook('postfix_regexpsbounces', AUTH_MDP, 'admin'), - 'admin/postfix/whitelist' => $this->make_hook('postfix_whitelist', AUTH_MDP, 'admin'), - 'admin/mx/broken' => $this->make_hook('mx_broken', AUTH_MDP, 'admin'), - 'admin/skins' => $this->make_hook('skins', AUTH_MDP, 'admin'), - 'admin/synchro_ax' => $this->make_hook('synchro_ax', AUTH_MDP, 'admin'), - 'admin/user' => $this->make_hook('user', AUTH_MDP, 'admin'), - 'admin/promo' => $this->make_hook('promo', AUTH_MDP, 'admin'), - 'admin/validate' => $this->make_hook('validate', AUTH_MDP, 'admin'), - 'admin/validate/answers' => $this->make_hook('validate_answers', AUTH_MDP, 'admin'), - 'admin/wiki' => $this->make_hook('wiki', AUTH_MDP, 'admin'), - 'admin/ipwatch' => $this->make_hook('ipwatch', AUTH_MDP, 'admin'), - 'admin/icons' => $this->make_hook('icons', AUTH_MDP, 'admin'), - 'admin/accounts' => $this->make_hook('accounts', AUTH_MDP, 'admin'), - 'admin/jobs' => $this->make_hook('jobs', AUTH_MDP, 'admin'), + 'admin/postfix/whitelist' => $this->make_hook('postfix_whitelist', AUTH_MDP, 'admin'), + 'admin/mx/broken' => $this->make_hook('mx_broken', AUTH_MDP, 'admin'), + 'admin/skins' => $this->make_hook('skins', AUTH_MDP, 'admin'), + 'admin/synchro_ax' => $this->make_hook('synchro_ax', AUTH_MDP, 'admin'), + 'admin/user' => $this->make_hook('user', AUTH_MDP, 'admin'), + 'admin/promo' => $this->make_hook('promo', AUTH_MDP, 'admin'), + 'admin/validate' => $this->make_hook('validate', AUTH_MDP, 'admin'), + 'admin/validate/answers' => $this->make_hook('validate_answers', AUTH_MDP, 'admin'), + 'admin/wiki' => $this->make_hook('wiki', AUTH_MDP, 'admin'), + 'admin/ipwatch' => $this->make_hook('ipwatch', AUTH_MDP, 'admin'), + 'admin/icons' => $this->make_hook('icons', AUTH_MDP, 'admin'), + 'admin/accounts' => $this->make_hook('accounts', AUTH_MDP, 'admin'), ++ 'admin/jobs' => $this->make_hook('jobs', AUTH_MDP, 'admin'), ); } diff --cc modules/profile.php index 1ff0dd7,b80d0e2..298d49c --- a/modules/profile.php +++ b/modules/profile.php @@@ -24,55 -24,44 +24,54 @@@ class ProfileModule extends PLModul function handlers() { return array( - 'photo' => $this->make_hook('photo', AUTH_PUBLIC), - 'photo/change' => $this->make_hook('photo_change', AUTH_MDP), - - 'fiche.php' => $this->make_hook('fiche', AUTH_PUBLIC), - 'profile' => $this->make_hook('profile', AUTH_PUBLIC), - 'profile/private' => $this->make_hook('profile', AUTH_COOKIE), - 'profile/ax' => $this->make_hook('ax', AUTH_COOKIE, 'admin'), - 'profile/edit' => $this->make_hook('p_edit', AUTH_MDP), - 'profile/ajax/address' => $this->make_hook('ajax_address', AUTH_COOKIE, 'user', NO_AUTH), - 'profile/ajax/tel' => $this->make_hook('ajax_tel', AUTH_COOKIE, 'user', NO_AUTH), - 'profile/ajax/medal' => $this->make_hook('ajax_medal', AUTH_COOKIE, 'user', NO_AUTH), - 'profile/ajax/job' => $this->make_hook('ajax_job', AUTH_COOKIE, 'user', NO_AUTH), - 'profile/ajax/secteur' => $this->make_hook('ajax_secteur', AUTH_COOKIE, 'user', NO_AUTH), - 'profile/ajax/skill' => $this->make_hook('ajax_skill', AUTH_COOKIE, 'user', NO_AUTH), - 'javascript/applis.js' => $this->make_hook('applis_js', AUTH_COOKIE), - 'javascript/grades.js' => $this->make_hook('grades_js', AUTH_COOKIE), - 'profile/medal' => $this->make_hook('medal', AUTH_PUBLIC), - 'profile/orange' => $this->make_hook('p_orange', AUTH_MDP), - 'profile/usage' => $this->make_hook('p_usage', AUTH_MDP), - - 'referent' => $this->make_hook('referent', AUTH_COOKIE), - 'emploi' => $this->make_hook('ref_search', AUTH_COOKIE), - 'referent/search' => $this->make_hook('ref_search', AUTH_COOKIE), - 'referent/ssect' => $this->make_hook('ref_sect', AUTH_COOKIE, 'user', NO_AUTH), - 'referent/country' => $this->make_hook('ref_country', AUTH_COOKIE, 'user', NO_AUTH), - - 'groupes-x' => $this->make_hook('xnet', AUTH_COOKIE), - - 'vcard' => $this->make_hook('vcard', AUTH_COOKIE), - 'admin/binets' => $this->make_hook('admin_binets', AUTH_MDP, 'admin'), - 'admin/medals' => $this->make_hook('admin_medals', AUTH_MDP, 'admin'), - 'admin/formations' => $this->make_hook('admin_formations', AUTH_MDP, 'admin'), - 'admin/sections' => $this->make_hook('admin_sections', AUTH_MDP, 'admin'), - 'admin/secteurs' => $this->make_hook('admin_secteurs', AUTH_MDP, 'admin'), - 'admin/trombino' => $this->make_hook('admin_trombino', AUTH_MDP, 'admin'), - 'admin/ss_secteurs' => $this->make_hook('admin_ss_secteurs', AUTH_MDP, 'admin'), - 'admin/fonctions' => $this->make_hook('admin_fonctions', AUTH_MDP, 'admin'), - + 'photo' => $this->make_hook('photo', AUTH_PUBLIC), + 'photo/change' => $this->make_hook('photo_change', AUTH_MDP), + + 'fiche.php' => $this->make_hook('fiche', AUTH_PUBLIC), + 'profile' => $this->make_hook('profile', AUTH_PUBLIC), + 'profile/private' => $this->make_hook('profile', AUTH_COOKIE), + 'profile/ax' => $this->make_hook('ax', AUTH_COOKIE, 'admin'), + 'profile/edit' => $this->make_hook('p_edit', AUTH_MDP), + 'profile/ajax/address' => $this->make_hook('ajax_address', AUTH_COOKIE, 'user', NO_AUTH), + 'profile/ajax/tel' => $this->make_hook('ajax_tel', AUTH_COOKIE, 'user', NO_AUTH), + 'profile/ajax/edu' => $this->make_hook('ajax_edu', AUTH_COOKIE, 'user', NO_AUTH), + 'profile/ajax/medal' => $this->make_hook('ajax_medal', AUTH_COOKIE, 'user', NO_AUTH), + 'profile/networking' => $this->make_hook('networking', AUTH_PUBLIC), + 'profile/ajax/job' => $this->make_hook('ajax_job', AUTH_COOKIE, 'user', NO_AUTH), + 'profile/ajax/sector' => $this->make_hook('ajax_sector', AUTH_COOKIE, 'user', NO_AUTH), + 'profile/ajax/sub_sector' => $this->make_hook('ajax_sub_sector', AUTH_COOKIE, 'user', NO_AUTH), + 'profile/ajax/alternates' => $this->make_hook('ajax_alternates', AUTH_COOKIE, 'user', NO_AUTH), + 'profile/ajax/skill' => $this->make_hook('ajax_skill', AUTH_COOKIE, 'user', NO_AUTH), + 'profile/ajax/searchname' => $this->make_hook('ajax_searchname', AUTH_COOKIE, 'user', NO_AUTH), + 'profile/ajax/buildnames' => $this->make_hook('ajax_buildnames', AUTH_COOKIE, 'user', NO_AUTH), + 'javascript/education.js' => $this->make_hook('education_js', AUTH_COOKIE), + 'javascript/grades.js' => $this->make_hook('grades_js', AUTH_COOKIE), + 'profile/medal' => $this->make_hook('medal', AUTH_PUBLIC), + 'profile/name_info' => $this->make_hook('name_info', AUTH_PUBLIC), + 'profile/orange' => $this->make_hook('p_orange', AUTH_MDP), + + 'referent' => $this->make_hook('referent', AUTH_COOKIE), + 'emploi' => $this->make_hook('ref_search', AUTH_COOKIE), + 'referent/search' => $this->make_hook('ref_search', AUTH_COOKIE), + 'referent/ssect' => $this->make_hook('ref_sect', AUTH_COOKIE, 'user', NO_AUTH), + 'referent/country' => $this->make_hook('ref_country', AUTH_COOKIE, 'user', NO_AUTH), + + 'groupes-x' => $this->make_hook('xnet', AUTH_COOKIE), + + 'vcard' => $this->make_hook('vcard', AUTH_COOKIE, 'user', NO_HTTPS), + 'admin/binets' => $this->make_hook('admin_binets', AUTH_MDP, 'admin'), + 'admin/medals' => $this->make_hook('admin_medals', AUTH_MDP, 'admin'), + 'admin/education' => $this->make_hook('admin_education', AUTH_MDP, 'admin'), + 'admin/education_field' => $this->make_hook('admin_education_field', AUTH_MDP, 'admin'), + 'admin/education_degree' => $this->make_hook('admin_education_degree', AUTH_MDP, 'admin'), + 'admin/education_degree_set' => $this->make_hook('admin_education_degree_set', AUTH_MDP, 'admin'), + 'admin/sections' => $this->make_hook('admin_sections', AUTH_MDP, 'admin'), + 'admin/networking' => $this->make_hook('admin_networking', AUTH_MDP, 'admin'), + 'admin/trombino' => $this->make_hook('admin_trombino', AUTH_MDP, 'admin'), + 'admin/sectors' => $this->make_hook('admin_sectors', AUTH_MDP, 'admin'), + 'admin/corps_enum' => $this->make_hook('admin_corps_enum', AUTH_MDP, 'admin'), + 'admin/corps_rank' => $this->make_hook('admin_corps_rank', AUTH_MDP, 'admin'), + 'admin/names' => $this->make_hook('admin_names', AUTH_MDP, 'admin'), - ); } @@@ -392,9 -355,12 +391,12 @@@ } $page->setTitle('Mon Profil'); + if (isset($success) && $success) { + $page->trigSuccess('Ton profil a bien été mis à jour.'); + } } - function handler_applis_js(&$page) + function handler_education_js(&$page) { header('Content-Type: text/javascript; charset=utf-8'); header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); diff --cc modules/register.php index 41055b6,61a7dfa..3668521 --- a/modules/register.php +++ b/modules/register.php @@@ -352,11 -381,11 +381,11 @@@ class RegisterModule extends PLModul $res = XDB::iterRow( "SELECT sa.alias, IF(s.nom_usage,s.nom_usage,s.nom) AS nom, s.prenom, FIND_IN_SET('femme', s.flags) AS femme, - GROUP_CONCAT(m.email) AS mails, MAX(m.last) AS dateDernier + GROUP_CONCAT(m.email SEPARATOR ', ') AS mails, MAX(m.last) AS dateDernier FROM register_marketing AS m - INNER JOIN auth_user_md5 AS s ON ( m.sender = s.user_id ) - INNER JOIN aliases AS sa ON ( sa.id = m.sender - AND FIND_IN_SET('bestalias', sa.flags) ) + INNER JOIN auth_user_md5 AS s ON (m.sender = s.user_id) + INNER JOIN aliases AS sa ON (sa.id = m.sender + AND FIND_IN_SET('bestalias', sa.flags)) WHERE m.uid = {?} GROUP BY m.sender ORDER BY dateDernier DESC", $uid); diff --cc plugins/function.display_phones.php index b9589b2,1a66dae..b676d50 --- a/plugins/function.display_phones.php +++ b/plugins/function.display_phones.php @@@ -19,42 -19,12 +19,43 @@@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ***************************************************************************/ -function smarty_function_geoloc_region($params, &$smarty) { - require_once 'geoloc.inc.php'; - if(!isset($params['country']) || !isset($params['region'])) { - return; +function smarty_function_display_phones($param, &$smarty) +{ + $txthtml = ""; + if (count($param['tels'])) { + foreach ($param['tels'] as $tel) { ++ $tel_type = ($param['dcd'] ? 'Dernier ' : ''); + switch ($tel['tel_type']) { - case 'fixed': - $tel_type = 'Tél'; ++ case 'fixed': ++ $tel_type .= 'Tél'; + break; - case 'fax': - $tel_type = 'Fax'; ++ case 'fax': ++ $tel_type .= 'Fax'; + break; - case 'mobile': - $tel_type = 'Mob'; ++ case 'mobile': ++ $tel_type .= 'Mob'; + break; - default: - $tel_type = $tel['tel_type']; ++ default: ++ $tel_type .= $tel['tel_type']; + } + $txthtml .= "
\n" . $tel_type . " : \n" . $tel['tel'] . "\n"; + $comment = ""; + if ($tel['comment'] != "") { + $commentHtml = str_replace(array('&', '"'), array('&', '"'), $tel['comment']); + $commentJs = str_replace(array('\\', '\''), array('\\\\', '\\\''), $commentHtml); + $txthtml .= "\"Commentaire\"\n"; + } + $txthtml .= "
\n"; + } } - return geoloc_region($params['country'], $params['region'], @$params['available']); + return $txthtml; } // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: diff --cc templates/profile/profile.tpl index 7aa9c0c,6128b54..9487465 --- a/templates/profile/profile.tpl +++ b/templates/profile/profile.tpl @@@ -124,8 -111,10 +124,8 @@@ function chgMainWinLoc(strPage {/if} {/if} - {if $x.mobile} -
- {if $x.dcd}Dernier m{else}M{/if}obile : {$x.mobile} -
+ {if $x.tels} - {display_phones tels=$x.tels} ++ {display_phones tels=$x.tels dcd=$x.dcd} {/if}