Merge commit 'origin/master' into fusionax
authorStéphane Jacob <sj@m4x.org>
Mon, 20 Jul 2009 20:54:14 +0000 (22:54 +0200)
committerStéphane Jacob <sj@m4x.org>
Mon, 20 Jul 2009 20:54:14 +0000 (22:54 +0200)
22 files changed:
1  2 
ChangeLog
classes/user.php
classes/xnetpage.php
configs/platal.cron.in
htdocs/xorg.php
modules/admin.php
modules/email.php
modules/events.php
modules/newsletter.php
modules/profile.php
modules/profile/page.inc.php
modules/register.php
modules/search.php
modules/search/classes.inc.php
plugins/function.display_phones.php
templates/axletter/edit.tpl
templates/emails/redirect.tpl
templates/events/index.tpl
templates/include/minifiche.tpl
templates/profile/profile.tpl
templates/search/adv.form.tpl
templates/survey/show_root.tpl

diff --cc 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:
Simple merge
Simple merge
@@@ -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
  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();
@@@ -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'),
          );
      }
  
Simple merge
Simple merge
Simple merge
@@@ -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'),
          );
      }
  
          }
  
         $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');
Simple merge
@@@ -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);
Simple merge
Simple merge
   *  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 .= "<div>\n<em>" . $tel_type . "&nbsp;: </em>\n<strong>" . $tel['tel'] . "</strong>\n";
 +            $comment = "";
 +            if ($tel['comment'] != "") {
 +                $commentHtml = str_replace(array('&', '"'), array('&amp;', '&quot;'), $tel['comment']);
 +                $commentJs = str_replace(array('\\', '\''), array('\\\\', '\\\''), $commentHtml);
 +                $txthtml .= "<img style=\"margin-left: 5px;\" src=\"images/icons/comments.gif\""
 +                            . " onmouseover=\"return overlib('"
 +                            . $commentJs
 +                            . "',WIDTH,250);\""
 +                            . " onmouseout=\"nd();\""
 +                            . " alt=\"Commentaire\" title=\""
 +                            . $commentHtml
 +                            . "\"/>\n";
 +            }
 +            $txthtml .= "</div>\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:
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -124,8 -111,10 +124,8 @@@ function chgMainWinLoc(strPage
          {/if}
        </div>
        {/if}
 -      {if $x.mobile}
 -      <div class="mob">
 -        <em class="intitule">{if $x.dcd}Dernier m{else}M{/if}obile&nbsp;: </em>{$x.mobile}
 -      </div>
 +      {if $x.tels}
-         {display_phones tels=$x.tels}
++        {display_phones tels=$x.tels dcd=$x.dcd}
        {/if}
        <div class='spacer'></div>
      </div>
Simple merge
Simple merge