Merge remote branch 'origin/platal-1.0.0'
authorStéphane Jacob <sj@m4x.org>
Sun, 4 Jul 2010 17:10:45 +0000 (19:10 +0200)
committerStéphane Jacob <sj@m4x.org>
Sun, 4 Jul 2010 17:10:45 +0000 (19:10 +0200)
classes/userfilter.php
configs/platal.cron.in
include/ufbuilder.inc.php
include/wiki/farmconfig.php
modules/xnetgrp.php
upgrade/1.0.0/02_validate.sql [new file with mode: 0644]

index cc8a611..058def4 100644 (file)
@@ -156,7 +156,8 @@ class UFC_Promo implements UserFilterCondition
             UserFilter::assertGrade($this->grade);
         }
         if ($this->grade == UserFilter::DISPLAY && $this->comparison != '=') {
-            Platal::page()->killError('Comparison ' . $this->comparison . ' not allowed on displaid promo');
+            // XXX: we might try to guess the grade from the first char of the promo and forbid only '<= 2004', but allow '<= X2004'
+            Platal::page()->killError("Il n'est pas possible d'appliquer la comparaison '" . $this->comparison . "' aux promotions sans spécifier de formation (X/M/D)");
         }
     }
 
index 0e0d885..f445da4 100644 (file)
@@ -27,7 +27,7 @@ WD=/home/web/prod/platal/bin/cron
 15 * * * *      web     cd $WD; ./axletter.send.php | mail -e -s "Envoi d'un email de l'AX" br@staff.m4x.org
 
 # homonymes
-0 0 4 * *      web     cd $WD; ./homonymes.php
+0 0 4 * *      web     cd $WD; ./homonyms.php
 
 # ml moderation
 * * * * *       web     cd $WD; ./cron_ml_moderate.php > /dev/null
index 7e37f02..6475f98 100644 (file)
@@ -620,7 +620,7 @@ class UFBF_Promo extends UFB_Field
     }
 
     protected function buildUFC(UserFilterBuilder &$ufb) {
-        return new UFC_Promo($this->comp, UserFilter::DISPLAY, 'X' . $this->val);
+        return new UFC_Promo($this->comp, UserFilter::GRADE_ING, $this->val);
     }
 }
 // }}}
index 617ebfb..a4fef9d 100644 (file)
@@ -97,8 +97,8 @@ function doBicol($column=false)
 function doPlatalLink($link, $text)
 {
     if (strlen(trim($text)) == 0) {
-        $user = User::get($link);
-        $text = $user->fullName();
+        $profile = Profile::get($link);
+        $text = $profile->fullName();
     }
     return '<a href="profile/' . $link . '" class="popup2">' . $text . '</a>';
 }
index a3accb6..7cf8d26 100644 (file)
@@ -300,6 +300,11 @@ class XnetGrpModule extends PLModule
             $view->addMod('trombi', 'Trombinoscope');
             $view->apply('annuaire', $page, $action, $subaction);
             $page->changeTpl('xnetgrp/annuaire.tpl');
+            $count = XDB::fetchOneCell('SELECT  COUNT(*)
+                                          FROM  group_members
+                                         WHERE  asso_id = {?}',
+                                       $globals->asso('id'));
+            $page->assign('nb_tot', $count);
             return;
         }
 
@@ -326,6 +331,7 @@ class XnetGrpModule extends PLModule
         $users = $uf->getUsers(new PlLimit(NB_PER_PAGE, $ofs * NB_PER_PAGE));
         $count = $uf->getTotalCount();
 
+        $page->assign('nb_tot', $count);
         $page->assign('pages', floor(($count + NB_PER_PAGE - 1) / NB_PER_PAGE));
         $page->assign('current', $ofs);
         $page->assign('order', $sort);
diff --git a/upgrade/1.0.0/02_validate.sql b/upgrade/1.0.0/02_validate.sql
new file mode 100644 (file)
index 0000000..0a4f846
--- /dev/null
@@ -0,0 +1,3 @@
+ALTER TABLE  requests_answers MODIFY COLUMN  category ENUM('alias','liste','usage','photo','evts','gapps-unsuspend','marketing','orange','homonyme','nl','paiements','medal','broken','surveys', 'entreprise') NOT NULL DEFAULT 'alias';
+
+-- vim:set syntax=mysql: