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

Unifier autant que possible la surcharge de chgt de statut de l'article quel...

Unifier autant que possible la surcharge de chgt de statut de l'article quel que soit le demandeur. Et encore un peu de ménage autour de la problématique du echo.
parent b287d54a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -475,7 +475,7 @@ echo "<p>";
encours_accueil($vos_articles);
afficher_enfant_rub(0, false);
echo afficher_enfant_rub(0, false, true);
// Dernieres modifications d'articles
if ($options == 'avancees'
......
......@@ -85,7 +85,7 @@ function articles_affiche($id_article, $row, $cherche_auteur, $ids, $cherche_mot
$iconifier = charger_fonction('iconifier', 'inc');
else $iconifier = '';
if ($statut_rubrique)
if ($flag_editable)
$instituer_article = charger_fonction('instituer_article', 'inc');
else $instituer_article ='';
......@@ -159,7 +159,7 @@ function articles_affiche($id_article, $row, $cherche_auteur, $ids, $cherche_mot
: articles_documents($flag_editable, 'article', $id_article))
. (($flag_auteur AND $statut_article == 'prepa' AND !$statut_rubrique)
? demande_publication($id_article)
? $instituer_article($id_article)
: '')
. "</div></div>"
......@@ -199,24 +199,6 @@ function articles_documents($flag_editable, $type, $id)
. $res;
}
// http://doc.spip.org/@demande_publication
function demande_publication($id_article)
{
return debut_cadre_relief('',true) .
"<center>" .
"<b>" ._T('texte_proposer_publication') . "</b>" .
aide ("artprop") .
redirige_action_auteur('instituer_article', "$id_article-prop",
'articles',
"id_article=$id_article",
("<input type='submit' class='fondo' value=\"" .
_T('bouton_demande_publication') .
"\" />\n"),
"method='post'") .
"</center>" .
fin_cadre_relief(true);
}
// http://doc.spip.org/@boite_info_articles
function boite_info_articles($id_article, $statut_article, $visites, $id_version)
{
......@@ -270,12 +252,10 @@ function boites_de_config_articles($id_article)
$g = charger_fonction('petitionner', 'inc');
if ($nb_forums) {
$masque = "<br />\n"
. icone_horizontale(_T('icone_suivi_forum', array('nb_forums' => $nb_forums)), generer_url_ecrire("articles_forum","id_article=$id_article"), "suivi-forum-24.gif", "", false);
$masque = icone_horizontale(_T('icone_suivi_forum', array('nb_forums' => $nb_forums)), generer_url_ecrire("articles_forum","id_article=$id_article"), "suivi-forum-24.gif", "", false);
} else $masque = '';
$masque .= $f($id_article,"articles","id_article=$id_article")
. '<br />'
. $g($id_article,"articles","id_article=$id_article");
return debut_cadre_relief("forum-interne-24.gif", true)
......
......@@ -276,7 +276,7 @@ function contenu_naviguer($id_rubrique, $id_parent, $ze_logo,$flag_editable) {
global $connect_statut, $connect_toutes_rubriques, $options, $spip_lang_left, $spip_lang_right;
///// Afficher les rubriques
afficher_enfant_rub($id_rubrique, $flag_editable);
echo afficher_enfant_rub($id_rubrique, $flag_editable, false);
//echo "<div align='$spip_lang_left'>";
......
......@@ -436,7 +436,7 @@ function indexer_les_champs(&$row,&$index_desc,$ponderation = 1){
$texte = $func($texte);
}
}
//echo ":$quoi:$poids:$texte<br/>";
//spip_log(":$quoi:$poids:$texte");
if (is_array($poids))
indexer_chaine($texte,array_shift($poids) * $ponderation,array_shift($poids));
else
......
......@@ -12,9 +12,11 @@
if (!defined("_ECRIRE_INC_VERSION")) return;
function inc_instituer_article_dist($id_article, $statut)
function inc_instituer_article_dist($id_article, $statut=-1)
{
$res =
if ($statut == -1) return demande_publication($id_article);
$res =
"\n<div id='instituer_article-$id_article'>" .
"\n<center>" .
"<b>" .
......@@ -42,6 +44,26 @@ function inc_instituer_article_dist($id_article, $statut)
"</center>"
. '</div>';
return redirige_action_auteur('instituer_article',$id_article,'articles', "id_article=$id_article", $res, " method='post'");
return redirige_action_auteur('instituer_article',$id_article,'articles', "id_article=$id_article", $res, " method='post'");
}
// http://doc.spip.org/@demande_publication
function demande_publication($id_article)
{
return debut_cadre_relief('',true) .
"<center>" .
"<b>" ._T('texte_proposer_publication') . "</b>" .
aide ("artprop") .
redirige_action_auteur('instituer_article', "$id_article-prop",
'articles',
"id_article=$id_article",
("<input type='submit' class='fondo' value=\"" .
_T('bouton_demande_publication') .
"\" />\n"),
"method='post'") .
"</center>" .
fin_cadre_relief(true);
}
?>
......@@ -32,14 +32,12 @@ function afficher_messages($titre, $from, $where, &$messages_vus, $afficher_aute
$styles = array('arial2', 'arial1', 'arial1');
}
if ($important) echo "<div class='cadre-couleur'><div class='cadre-padding'>";
$t = affiche_tranche_bandeau($requete, "messagerie-24.gif", $col, $couleur_foncee, "white", $tmp_var, $titre, false, $largeurs, $styles, 'afficher_message_boucles', $afficher_auteurs);
if ($t) {
if ($important) #debut_cadre_couleur();
echo "<div class='cadre-couleur'><div class='cadre-padding'>";
foreach ($t as $v) $messages_vus[$v]= $v;
if ($important) echo '</div></div>';#fin_cadre_couleur();
}
foreach ($t as $v) $messages_vus[$v]= $v;
if ($important) echo '</div></div>';
}
// http://doc.spip.org/@afficher_message_boucles
......
......@@ -43,7 +43,7 @@ function inc_petitionner_dist($id_article, $script, $args, $ajax=false)
$val_menu = 'off';
}
$res = '';
$res = "<br />\n";
foreach ($menu as $val => $desc) {
$res .= "<option" . (($val_menu == $val) ? " selected" : '') . " value='$val'>".$desc."</option>\n";
}
......
......@@ -239,7 +239,6 @@ function enregistre_modif_plugin(){
spip_log("Changement des plugins actifs par auteur id=$connect_id_auteur :".implode(',',$plugin));
ecrire_plugin_actifs($plugin);
ecrire_metas();
//echo "mise jour ok";
}
// http://doc.spip.org/@ordonne_plugin
......
......@@ -35,7 +35,7 @@ function replace_fragment($id_article, $version_min, $version_max, $id_fragment,
if ($flag_gz) {
$s = gzcompress($fragment);
if (strlen($s) < strlen($fragment)) {
//echo "gain gz: ".(100 - 100 * strlen($s) / strlen($fragment))."%<br />";
//spip_log("gain gz: ".(100 - 100 * strlen($s) / strlen($fragment)));
$compress = 1;
$fragment = $s;
}
......
......@@ -310,7 +310,7 @@ function sous_enfant_rub($collection2){
}
// http://doc.spip.org/@afficher_enfant_rub
function afficher_enfant_rub($id_rubrique, $afficher_bouton_creer=false) {
function afficher_enfant_rub($id_rubrique, $bouton=false, $return=false) {
global $spip_lang_right;
$les_enfants = enfant_rub($id_rubrique);
......@@ -326,30 +326,29 @@ function afficher_enfant_rub($id_rubrique, $afficher_bouton_creer=false) {
$les_enfants2="";
}
echo "<div>&nbsp;</div>",
"\n<table cellpadding='0' cellspacing='0' border='0' width='100%'>",
"\n<tr><td valign='top' width=50% rowspan=2>",
$les_enfants,
"</td>",
"\n<td width='20' rowspan='2'>",
http_img_pack("rien.gif", ' ', "width='20'"),
"</td>\n",
"\n<td valign='top' width='50%'>",
$les_enfants2,
"&nbsp;",
"</td></tr>",
"\n<tr><td style='text-align: ",
$spip_lang_right,
";' valign='bottom'><div align='",
$spip_lang_right,
"'>";
if ($afficher_bouton_creer) {
if ($id_rubrique == "0")
icone(_T('icone_creer_rubrique'), generer_url_ecrire("rubriques_edit","new=oui&retour=nav"), "secteur-24.gif", "creer.gif");
else icone(_T('icone_creer_sous_rubrique'), generer_url_ecrire("rubriques_edit","new=oui&retour=nav&id_parent=$id_rubrique"), "rubrique-24.gif", "creer.gif");
}
echo "</div></td></tr></table>";
$res = "<div>&nbsp;</div>"
. "\n<table cellpadding='0' cellspacing='0' border='0' width='100%'>"
. "\n<tr><td valign='top' width=50% rowspan=2>"
. $les_enfants
. "</td>"
. "\n<td width='20' rowspan='2'>"
. http_img_pack("rien.gif", ' ', "width='20'")
. "</td>\n"
. "\n<td valign='top' width='50%'>"
. $les_enfants2
. "&nbsp;"
. "</td></tr>"
. "\n<tr><td style='text-align: "
. $spip_lang_right
. ";' valign='bottom'><div align='"
. $spip_lang_right
. "'>"
. (!$bouton ? ''
: (!$id_rubrique
? icone(_T('icone_creer_rubrique'), generer_url_ecrire("rubriques_edit","new=oui&retour=nav"), "secteur-24.gif", "creer.gif",'', false)
: icone(_T('icone_creer_sous_rubrique'), generer_url_ecrire("rubriques_edit","new=oui&retour=nav&id_parent=$id_rubrique"), "rubrique-24.gif", "creer.gif",'',false)))
. "</div></td></tr></table>";
if ($return) return $res; else echo $res;
}
// http://doc.spip.org/@calcul_generation
......
......@@ -222,7 +222,7 @@ $preg='') {
// http://doc.spip.org/@echappe_retour
function echappe_retour($letexte, $source='') {
if (strpos($letexte,"base64$source")) {
# echo htmlspecialchars($letexte); ## pour les curieux
# spip_log(htmlspecialchars($letexte)); ## pour les curieux
if (preg_match_all(
',<(span|div) class=[\'"]base64'.$source.'[\'"]\s.*></\1>,UmsS',
$letexte, $regs, PREG_SET_ORDER)) {
......
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