Skip to content
Extraits de code Groupes Projets
Valider e42aa6b1 rédigé par esj's avatar esj
Parcourir les fichiers

Tâche #877 facile ici car les globales ne servaient déjà plus. Et qq détails graphiques du cas New.

parent 78d86414
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -17,11 +17,11 @@ include_spip('inc/presentation'); ...@@ -17,11 +17,11 @@ include_spip('inc/presentation');
// http://doc.spip.org/@exec_mots_type_dist // http://doc.spip.org/@exec_mots_type_dist
function exec_mots_type_dist() function exec_mots_type_dist()
{ {
global $connect_statut, $descriptif, $id_groupe, $new, $options, $texte, $titre; $id_groupe= intval(_request('id_groupe'));
if ($new == "oui") { if (!$id_groupe) {
$id_groupe = 0;
$type = filtrer_entites(_T('titre_nouveau_groupe')); $type = $titre = filtrer_entites(_T('titre_nouveau_groupe'));
$onfocus = " onfocus=\"if(!antifocus){this.value='';antifocus=true;}\""; $onfocus = " onfocus=\"if(!antifocus){this.value='';antifocus=true;}\"";
$ancien_type = ''; $ancien_type = '';
$unseul = 'non'; $unseul = 'non';
...@@ -33,11 +33,12 @@ function exec_mots_type_dist() ...@@ -33,11 +33,12 @@ function exec_mots_type_dist()
$acces_minirezo = 'oui'; $acces_minirezo = 'oui';
$acces_comite = 'oui'; $acces_comite = 'oui';
$acces_forum = 'non'; $acces_forum = 'non';
$row = array();
} else { } else {
$id_groupe= intval($id_groupe);
$result_groupes = spip_query("SELECT * FROM spip_groupes_mots WHERE id_groupe=$id_groupe"); $result_groupes = spip_query("SELECT * FROM spip_groupes_mots WHERE id_groupe=$id_groupe");
while($row = spip_fetch_array($result_groupes)) { if ($row = spip_fetch_array($result_groupes)) {
$id_groupe = $row['id_groupe']; $id_groupe = $row['id_groupe'];
$type = $row['titre']; $type = $row['titre'];
$titre = typo($type); $titre = typo($type);
...@@ -56,6 +57,13 @@ function exec_mots_type_dist() ...@@ -56,6 +57,13 @@ function exec_mots_type_dist()
} }
} }
if (($id_groupe AND !$row) OR
!autoriser($id_groupe?'modifier' : 'creer', 'groupemots', $id_groupe)) {
include_spip('inc/minipres');
echo minipres();
exit;
}
pipeline('exec_init',array('args'=>array('exec'=>'mots_type','id_groupe'=>$id_groupe),'data'=>'')); pipeline('exec_init',array('args'=>array('exec'=>'mots_type','id_groupe'=>$id_groupe),'data'=>''));
$commencer_page = charger_fonction('commencer_page', 'inc'); $commencer_page = charger_fonction('commencer_page', 'inc');
echo $commencer_page("« $titre »", "naviguer", "mots"); echo $commencer_page("« $titre »", "naviguer", "mots");
...@@ -67,12 +75,6 @@ function exec_mots_type_dist() ...@@ -67,12 +75,6 @@ function exec_mots_type_dist()
echo pipeline('affiche_droite',array('args'=>array('exec'=>'mots_type','id_groupe'=>$id_groupe),'data'=>'')); echo pipeline('affiche_droite',array('args'=>array('exec'=>'mots_type','id_groupe'=>$id_groupe),'data'=>''));
debut_droite(); debut_droite();
if (!autoriser($id_groupe?'modifier' : 'creer', 'groupemots', $id_groupe)) {
echo "<h3>"._T('avis_non_acces_page')."</h3>";
exit;
}
$type = entites_html(rawurldecode($type)); $type = entites_html(rawurldecode($type));
$res = debut_cadre_relief("groupe-mot-24.gif", true) $res = debut_cadre_relief("groupe-mot-24.gif", true)
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter