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

Bardée d'indéfinis, dont 2 gênants que j'ai introduits récemment.

parent ca04e857
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -19,8 +19,7 @@ function exec_meme_rubrique_dist() ...@@ -19,8 +19,7 @@ function exec_meme_rubrique_dist()
$type = _request('type'); $type = _request('type');
$order = _request('order'); $order = _request('order');
if (($GLOBALS['auteur_session']['statut'] != '0minirezo') if ((!autoriser('publierdans','rubrique',$id))
OR (!autoriser('publierdans','rubrique',$id))
OR (!preg_match('/^[\w_-]+$/',$order)) OR (!preg_match('/^[\w_-]+$/',$order))
OR (!preg_match('/^[\w_-]+$/',$type))) { OR (!preg_match('/^[\w_-]+$/',$type))) {
include_spip('inc/minipres'); include_spip('inc/minipres');
......
...@@ -150,7 +150,7 @@ function ajax_action_post($action, $arg, $retour, $gra, $corps, $clic='', $atts_ ...@@ -150,7 +150,7 @@ function ajax_action_post($action, $arg, $retour, $gra, $corps, $clic='', $atts_
} else { } else {
if ($gra AND !$args_ajax) $args_ajax = "&$gra"; if ($gra AND !$args_ajax) $args_ajax = "&$gra";
if ($GLOBALS['var_profile']) if (isset($GLOBALS['var_profile']))
$args_ajax .= '&var_profile=1'; $args_ajax .= '&var_profile=1';
return redirige_action_auteur($action, return redirige_action_auteur($action,
......
...@@ -25,7 +25,6 @@ function inc_documenter_dist( ...@@ -25,7 +25,6 @@ function inc_documenter_dist(
$couleur='', # couleur des cases du tableau $couleur='', # couleur des cases du tableau
$appelant ='' # pour le rappel (cf plugin) $appelant ='' # pour le rappel (cf plugin)
) { ) {
global $spip_lang_left, $spip_lang_right;
if (is_int($doc)) { if (is_int($doc)) {
if ($ancre == 'portfolio') { if ($ancre == 'portfolio') {
...@@ -59,6 +58,8 @@ function inc_documenter_dist( ...@@ -59,6 +58,8 @@ function inc_documenter_dist(
propre(join(" ",$r)); propre(join(" ",$r));
}*/ }*/
$show_docs = explode(',', _request('show_docs'));
foreach ($documents as $document) { foreach ($documents as $document) {
$id_document = $document['id_document']; $id_document = $document['id_document'];
...@@ -70,7 +71,7 @@ function inc_documenter_dist( ...@@ -70,7 +71,7 @@ function inc_documenter_dist(
$vu = ($document['vu']=='oui') ? ' vu':''; $vu = ($document['vu']=='oui') ? ' vu':'';
$deplier = in_array($id_document, explode(',', _request('show_docs'))); $deplier = in_array($id_document, $show_docs);
if (!$case) if (!$case)
$res .= "<tr>"; $res .= "<tr>";
......
...@@ -87,7 +87,7 @@ function qui_edite ($id, $type='article') { ...@@ -87,7 +87,7 @@ function qui_edite ($id, $type='article') {
$edition = lire_tableau_edition(); $edition = lire_tableau_edition();
return $edition[$type][$id]; return $edition ? $edition[$type][$id] : '';
} }
// http://doc.spip.org/@mention_qui_edite // http://doc.spip.org/@mention_qui_edite
......
...@@ -174,7 +174,7 @@ function afficher_mots_cles($flag_editable, $objet, $id_objet, $table, $table_id ...@@ -174,7 +174,7 @@ function afficher_mots_cles($flag_editable, $objet, $id_objet, $table, $table_id
$url = generer_url_ecrire('mots_edit', "id_mot=$id_mot&redirect=$ret"); $url = generer_url_ecrire('mots_edit', "id_mot=$id_mot&redirect=$ret");
$vals= array("<a href='$url'>$cle</a>"); $vals= array("<a href='$url'>$cle</a>");
list($type_mot, $un) = spip_fetch_array(spip_query("SELECT titre, unseul FROM spip_groupes_mots WHERE id_groupe = $id_groupe"), SPIP_NUM); list($type_mot, $unseul) = spip_fetch_array(spip_query("SELECT titre, unseul FROM spip_groupes_mots WHERE id_groupe = $id_groupe"), SPIP_NUM);
// On recupere le typo_mot ici, et non dans le mot-cle lui-meme; sinon bug avec arabe // On recupere le typo_mot ici, et non dans le mot-cle lui-meme; sinon bug avec arabe
$type_mot = typo($type_mot); $type_mot = typo($type_mot);
......
...@@ -23,6 +23,7 @@ function inc_instituer_article_dist($id_article, $statut=-1) ...@@ -23,6 +23,7 @@ function inc_instituer_article_dist($id_article, $statut=-1)
AND function_exists('menu_postdates')) AND function_exists('menu_postdates'))
list($postdates,$postdates_js) = menu_postdates(); list($postdates,$postdates_js) = menu_postdates();
else $postdates = $postdates_js = '';
$res = $res =
"\n<div style='text-align: center;' id='instituer_article-$id_article'>" . "\n<div style='text-align: center;' id='instituer_article-$id_article'>" .
"<b>" . "<b>" .
......
...@@ -1335,9 +1335,8 @@ function meme_rubrique($id_rubrique, $id, $type, $order='date', $limit=NULL, $aj ...@@ -1335,9 +1335,8 @@ function meme_rubrique($id_rubrique, $id, $type, $order='date', $limit=NULL, $aj
. "\n<table style='background-color: #e0e0e0;border: 0px; padding-left:4px; width: 100%;'>" . "\n<table style='background-color: #e0e0e0;border: 0px; padding-left:4px; width: 100%;'>"
. $retour; . $retour;
if (_MODE_MEME_RUBRIQUE == 'oui')
$retour .= (($limit <= 0) ? '' // $retour .= (($limit <= 0) ? '' : "<tr><td colspan='3' style='text-align: center'>+ $limit</td></tr>");
: "<tr><td colspan='3' style='text-align: center'>+ $limit</td></tr>");
$retour .= "</table>" $retour .= "</table>"
. fin_block() . fin_block()
......
...@@ -42,7 +42,7 @@ function definir_puce() { ...@@ -42,7 +42,7 @@ function definir_puce() {
// l'espace prive (spip_lang est la langue de l'interface, lang_dir // l'espace prive (spip_lang est la langue de l'interface, lang_dir
// celle du texte) et public (spip_lang est la langue du texte) // celle du texte) et public (spip_lang est la langue du texte)
$dir = _DIR_RESTREINT ? lang_dir() : $GLOBALS['lang_dir']; $dir = _DIR_RESTREINT ? lang_dir() : lang_dir($GLOBALS['spip_lang']);
$p = ($dir == 'rtl') ? 'puce_rtl' : 'puce'; $p = ($dir == 'rtl') ? 'puce_rtl' : 'puce';
if (!isset($les_puces[$p])) { if (!isset($les_puces[$p])) {
...@@ -715,6 +715,8 @@ function traiter_tableau($bloc) { ...@@ -715,6 +715,8 @@ function traiter_tableau($bloc) {
// Decouper le tableau en lignes // Decouper le tableau en lignes
preg_match_all(',([|].*)[|]\n,UmsS', $bloc, $regs, PREG_PATTERN_ORDER); preg_match_all(',([|].*)[|]\n,UmsS', $bloc, $regs, PREG_PATTERN_ORDER);
$lignes = array(); $lignes = array();
$debut_table = $summary = '';
$l = 0;
// Traiter chaque ligne // Traiter chaque ligne
foreach ($regs[1] as $ligne) { foreach ($regs[1] as $ligne) {
...@@ -780,6 +782,7 @@ function traiter_tableau($bloc) { ...@@ -780,6 +782,7 @@ function traiter_tableau($bloc) {
// et on parcourt le tableau a l'envers pour ramasser les // et on parcourt le tableau a l'envers pour ramasser les
// colspan et rowspan en passant // colspan et rowspan en passant
$html = '';
for($l=count($lignes)-1; $l>=0; $l--) { for($l=count($lignes)-1; $l>=0; $l--) {
$cols= $lignes[$l]; $cols= $lignes[$l];
$colspan=1; $colspan=1;
......
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