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

poursuite de [5841]: mettre id_rubrique dans les appels au script articles (mais il y en a encore)

parent f9cd149e
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -1363,7 +1363,7 @@ function afficher_statut_articles($id_article, $rubrique_article, $statut_articl ...@@ -1363,7 +1363,7 @@ function afficher_statut_articles($id_article, $rubrique_article, $statut_articl
if ($connect_statut == '0minirezo' AND acces_rubrique($rubrique_article)) { if ($connect_statut == '0minirezo' AND acces_rubrique($rubrique_article)) {
echo generer_url_post_ecrire("articles", "id_article=$id_article"), echo generer_url_post_ecrire("articles", "id_article=$id_article&id_rubrique=$rubrique_article"),
debut_cadre_relief("", true), debut_cadre_relief("", true),
"\n<center>", "<B>",_T('texte_article_statut'),"</B>", "\n<center>", "<B>",_T('texte_article_statut'),"</B>",
"\n<SELECT NAME='statut_nouv' SIZE='1' CLASS='fondl'\n", "\n<SELECT NAME='statut_nouv' SIZE='1' CLASS='fondl'\n",
......
...@@ -113,8 +113,8 @@ function formulaire_articles_edit($id_article, $id_rubrique, $titre, $soustitre, ...@@ -113,8 +113,8 @@ function formulaire_articles_edit($id_article, $id_rubrique, $titre, $soustitre,
echo "\n<table cellpadding=0 cellspacing=0 border=0 width='100%'>"; echo "\n<table cellpadding=0 cellspacing=0 border=0 width='100%'>";
echo "<tr width='100%'>"; echo "<tr width='100%'>";
echo "<td>"; echo "<td>";
if ($lier_trad) icone(_T('icone_retour'), generer_url_ecrire("articles","id_article=$lier_trad"), "article-24.gif", "rien.gif"); if ($lier_trad) icone(_T('icone_retour'), generer_url_ecrire("articles","id_article=$lier_trad&id_rubrique=$id_rubrique"), "article-24.gif", "rien.gif");
else icone(_T('icone_retour'), generer_url_ecrire("articles","id_article=$id_article"), "article-24.gif", "rien.gif"); else icone(_T('icone_retour'), generer_url_ecrire("articles","id_article=$id_article&id_rubrique=$id_rubrique"), "article-24.gif", "rien.gif");
echo "</td>"; echo "</td>";
echo "<td>". http_img_pack('rien.gif', " ", "width='10'") . "</td>\n"; echo "<td>". http_img_pack('rien.gif', " ", "width='10'") . "</td>\n";
...@@ -137,7 +137,7 @@ echo "<P><HR><P>"; ...@@ -137,7 +137,7 @@ echo "<P><HR><P>";
$texte = entites_html($texte); $texte = entites_html($texte);
$ps = entites_html($ps); $ps = entites_html($ps);
echo generer_url_post_ecrire("articles", ($id_article ? "id_article=$id_article" : ""),'formulaire'); echo generer_url_post_ecrire("articles", ($id_article ? "id_article=$id_article&id_rubrique=$id_rubrique" : ""),'formulaire');
if ($new == 'oui') if ($new == 'oui')
echo "<INPUT TYPE='Hidden' NAME='new' VALUE='oui'>"; echo "<INPUT TYPE='Hidden' NAME='new' VALUE='oui'>";
......
...@@ -62,7 +62,7 @@ debut_droite(); ...@@ -62,7 +62,7 @@ debut_droite();
echo "\n<table cellpadding=0 cellspacing=0 border=0 width='100%'>"; echo "\n<table cellpadding=0 cellspacing=0 border=0 width='100%'>";
echo "<tr width='100%'>"; echo "<tr width='100%'>";
echo "<td>"; echo "<td>";
icone(_T('icone_retour'), generer_url_ecrire("articles","id_article=$id_article"), "article-24.gif", "rien.gif"); icone(_T('icone_retour'), generer_url_ecrire("articles","id_article=$id_article&id_rubrique=$id_rubrique"), "article-24.gif", "rien.gif");
echo "</td>"; echo "</td>";
echo "<td>" . http_img_pack('rien.gif', " ", "width='10'") ."</td>\n"; echo "<td>" . http_img_pack('rien.gif', " ", "width='10'") ."</td>\n";
......
...@@ -38,32 +38,34 @@ function exec_brouteur_frame_dist() ...@@ -38,32 +38,34 @@ function exec_brouteur_frame_dist()
if ($special == "redac") { if ($special == "redac") {
$query = "SELECT articles.id_article, articles.titre, articles.statut FROM spip_articles AS articles, spip_auteurs_articles AS lien WHERE articles.statut = 'prepa' AND articles.id_article = lien.id_article AND lien.id_auteur = $connect_id_auteur GROUP BY id_article ORDER BY articles.date DESC"; $query = "SELECT articles.id_article, articles.id_rubrique, articles.titre, articles.statut FROM spip_articles AS articles, spip_auteurs_articles AS lien WHERE articles.statut = 'prepa' AND articles.id_article = lien.id_article AND lien.id_auteur = $connect_id_auteur GROUP BY id_article ORDER BY articles.date DESC";
$result=spip_query($query); $result=spip_query($query);
if (spip_num_rows($result)>0) { if (spip_num_rows($result)>0) {
echo "<div style='padding-top: 6px; padding-bottom: 3px;'><b class='verdana2'>"._T("info_cours_edition")."</b></div>"; echo "<div style='padding-top: 6px; padding-bottom: 3px;'><b class='verdana2'>"._T("info_cours_edition")."</b></div>";
echo "<div class='plan-articles'>"; echo "<div class='plan-articles'>";
while($row=spip_fetch_array($result)){ while($row=spip_fetch_array($result)){
$id_article=$row['id_article']; $id_article=$row['id_article'];
$id_rubrique=$row['id_rubrique'];
$titre = typo($row['titre']); $titre = typo($row['titre']);
$statut = $row['statut']; $statut = $row['statut'];
echo "<a class='$statut' href='javascript:window.parent.location=\"" . generer_url_ecrire('articles',"id_article=$id_article"),"\"'>",$titre,"</a>"; echo "<a class='$statut' href='javascript:window.parent.location=\"" . generer_url_ecrire('articles',"id_article=$id_article&id_rubrique=$id_rubrique"),"\"'>",$titre,"</a>";
} }
echo "</div>"; echo "</div>";
} }
} }
else if ($special == "valider") { else if ($special == "valider") {
$query = "SELECT articles.id_article, articles.titre, articles.statut FROM spip_articles AS articles WHERE articles.statut = 'prop' ORDER BY articles.date DESC"; $query = "SELECT articles.id_article, article.id_rubrique, articles.titre, articles.statut FROM spip_articles AS articles WHERE articles.statut = 'prop' ORDER BY articles.date DESC";
$result=spip_query($query); $result=spip_query($query);
if (spip_num_rows($result)>0) { if (spip_num_rows($result)>0) {
echo "<div style='padding-top: 6px; padding-bottom: 3px;'><b class='verdana2'>"._T("info_articles_proposes")."</b></div>"; echo "<div style='padding-top: 6px; padding-bottom: 3px;'><b class='verdana2'>"._T("info_articles_proposes")."</b></div>";
echo "<div class='plan-articles'>"; echo "<div class='plan-articles'>";
while($row=spip_fetch_array($result)){ while($row=spip_fetch_array($result)){
$id_article=$row['id_article']; $id_article=$row['id_article'];
$id_rubrique=$row['id_rubrique'];
$titre = typo($row['titre']); $titre = typo($row['titre']);
$statut = $row['statut']; $statut = $row['statut'];
echo "<a class='$statut' href='javascript:window.parent.location=\"", generer_url_ecrire('articles',"id_article=$id_article"),"\"'>",$titre,"</a>"; echo "<a class='$statut' href='javascript:window.parent.location=\"", generer_url_ecrire('articles',"id_article=$id_article&id_rubrique=$id_rubrique"),"\"'>",$titre,"</a>";
} }
echo "</div>"; echo "</div>";
} }
...@@ -136,17 +138,18 @@ onMouseOut=\"changeclass(this, 'brouteur_rubrique');\">"; ...@@ -136,17 +138,18 @@ onMouseOut=\"changeclass(this, 'brouteur_rubrique');\">";
if ($id_rubrique > 0) { if ($id_rubrique > 0) {
if ($connect_statut == "0minirezo") $query = "SELECT articles.id_article, articles.titre, articles.statut FROM spip_articles AS articles WHERE id_rubrique=$id_rubrique ORDER BY date DESC"; if ($connect_statut == "0minirezo") $query = "SELECT articles.id_article, articles.id_rubrique, articles.titre, articles.statut FROM spip_articles AS articles WHERE id_rubrique=$id_rubrique ORDER BY date DESC";
else $query = "SELECT articles.id_article, articles.titre, articles.statut FROM spip_articles AS articles, spip_auteurs_articles AS lien WHERE articles.id_rubrique=$id_rubrique AND (articles.statut = 'publie' OR articles.statut = 'prop' OR (articles.statut = 'prepa' AND articles.id_article = lien.id_article AND lien.id_auteur = $connect_id_auteur)) GROUP BY id_article ORDER BY articles.date DESC"; else $query = "SELECT articles.id_article, articles.id_rubrique, articles.titre, articles.statut FROM spip_articles AS articles, spip_auteurs_articles AS lien WHERE articles.id_rubrique=$id_rubrique AND (articles.statut = 'publie' OR articles.statut = 'prop' OR (articles.statut = 'prepa' AND articles.id_article = lien.id_article AND lien.id_auteur = $connect_id_auteur)) GROUP BY id_article ORDER BY articles.date DESC";
$result=spip_query($query); $result=spip_query($query);
if (spip_num_rows($result)>0) { if (spip_num_rows($result)>0) {
echo "<div style='padding-top: 6px; padding-bottom: 3px;'><b class='verdana2'>"._T('info_articles')."</b></div>"; echo "<div style='padding-top: 6px; padding-bottom: 3px;'><b class='verdana2'>"._T('info_articles')."</b></div>";
echo "<div class='plan-articles'>"; echo "<div class='plan-articles'>";
while($row=spip_fetch_array($result)){ while($row=spip_fetch_array($result)){
$id_article=$row['id_article']; $id_article=$row['id_article'];
$id_rubrique=$row['id_rubrique'];
$titre = typo($row['titre']); $titre = typo($row['titre']);
$statut = $row['statut']; $statut = $row['statut'];
echo "<a class='$statut' href='javascript:window.parent.location=\"" . generer_url_ecrire('articles',"id_article=$id_article")."\"'>",$titre,"</a>"; echo "<a class='$statut' href='javascript:window.parent.location=\"" . generer_url_ecrire('articles',"id_article=$id_article&id_rubrique=$id_rubrique")."\"'>",$titre,"</a>";
} }
echo "</div>"; echo "</div>";
} }
......
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