les groupes peuvent empecher les inscriptions, evitant ainsi les demandes d'inscripti...
authorx2001corpet <x2001corpet@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sun, 31 Jul 2005 03:27:25 +0000 (03:27 +0000)
committerx2001corpet <x2001corpet@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sun, 31 Jul 2005 03:27:25 +0000 (03:27 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@7 839d8a87-29fc-0310-9880-83ba4fa771e5

ChangeLog
htdocs.net/groupe/edit.php
htdocs.net/groupe/inscrire.php
templates/xnet/groupe/asso.tpl
templates/xnet/groupe/edit.tpl
upgrade/0.9.9/00_xnet.sql [new file with mode: 0644]
upgrade/0.9.9/update.sh [new file with mode: 0755]

index cb90665..e354b22 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 ================================================================================
-VERSION 0.9.8                                                                                                           21 Jun 2005
+VERSION 0.9.9                                                                                                           18 Jul 2005
+
+New :
+
+       * Xnet :
+               - Groups can be non subscribable.                                                                       -Car
+               
+================================================================================
+VERSION 0.9.8                                                                                                           18 Jul 2005
 
 New :
 
index ff8f515..99a7726 100644 (file)
@@ -7,11 +7,12 @@
         if (has_perms()) {
             $globals->xdb->execute(
                 "UPDATE  groupex.asso
-                    SET  nom={?}, diminutif={?}, cat={?}, dom={?}, descr={?}, site={?}, mail={?}, resp={?}, forum={?}, mail_domain={?}, ax={?}, pub={?}, sub_url={?}
+                    SET  nom={?}, diminutif={?}, cat={?}, dom={?}, descr={?}, site={?}, mail={?}, resp={?}, forum={?}, mail_domain={?}, ax={?}, pub={?}, sub_url={?}, inscriptible={?}
                   WHERE  id={?}",
                   Post::get('nom'), Post::get('diminutif'), Post::get('cat'), Post::getInt('dom'),
                   Post::get('descr'), Post::get('site'), Post::get('mail'), Post::get('resp'),
-                  Post::get('forum'), Post::get('mail_domain'), Post::has('ax'), Post::has('pub')?'private':'public', Post::get('sub_url'), $globals->asso('id'));
+                  Post::get('forum'), Post::get('mail_domain'), Post::has('ax'), Post::has('pub')?'private':'public', Post::get('sub_url'), Post::get('inscriptible'),
+                 $globals->asso('id'));
             if (Post::get('mail_domain')) {
                 $globals->xdb->execute('INSERT INTO virtual_domains (domain) VALUES({?})', Post::get('mail_domain'));
             }
index 47448fb..2b3326d 100644 (file)
@@ -7,6 +7,8 @@ $page->setType($globals->asso('cat'));
 $page->assign('asso', $globals->asso());
 $page->assign('admin', may_update());
 
+if (!$globals->asso('inscriptible'))
+       $page->kill("Il n'est pas possible de s'inscire en ligne à ce groupe. Essaie de joindre le contact indiqué sur la page de présentation.");
 
 if (Env::has('u') && may_update()) {
     $u   = Env::get('u');
index 38bd2d7..f139389 100644 (file)
@@ -65,7 +65,7 @@
   </tr>
   {/if}
 
-  {if !$is_member && $logged && $asso.pub eq 'public'}
+  {if !$is_member && $logged && $asso.pub eq 'public' && $asso.inscriptible}
   <tr>
     <td class="titre">
       M'inscrire :
index 7d16926..1dbd3ac 100644 (file)
 
     <tr>
       <td class="titre">
+        Inscription possible:
+      </td>
+      <td>
+        <input type="radio" value="1" id="inscr_yes"
+          {if $asso.inscriptible eq 1}checked="checked"{/if}
+          name="inscriptible" />
+        <label for="inscr_yes">oui</label>
+        <input type="radio" value="0" id="inscr_no"
+          {if $asso.inscriptible neq 1}checked="checked"{/if}
+          name="inscriptible" />
+        <label for="inscr_no">non</label>
+      </td>
+    </tr>
+
+    <tr>
+      <td class="titre">
         Lien pour l'inscription:<br />
         <em>laisser vide par défaut</em>
       </td>
diff --git a/upgrade/0.9.9/00_xnet.sql b/upgrade/0.9.9/00_xnet.sql
new file mode 100644 (file)
index 0000000..494b33d
--- /dev/null
@@ -0,0 +1,2 @@
+ALTER TABLE groupex.asso ADD inscriptible TINYINT NOT NULL DEFAULT 1;
+
diff --git a/upgrade/0.9.9/update.sh b/upgrade/0.9.9/update.sh
new file mode 100755 (executable)
index 0000000..de82fc0
--- /dev/null
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+. ../inc/pervasive.sh
+
+mailman_stop
+mailman_templates
+mailman_start
+
+
+###########################################################
+for sql in *.sql
+do
+    echo -n $sql
+    $MYSQL x4dat < $sql &>/dev/null || echo -n " ERROR"
+    echo .
+done
+
+###########################################################
+
+echo "we will now upgrade the search table (this may be a long operation)
+
+please hit ^D to continue
+"
+
+cat
+
+pushd ../../bin
+./search.rebuild_db.php
+popd
+
+###########################################################
+