You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
752 B

<?php
9 months ago
$err = [];
$test = 'liens_classes';
9 months ago
$remonte = '../';
while (!is_dir($remonte . 'ecrire')) {
$remonte = "../$remonte";
9 months ago
}
require $remonte . 'tests/test.inc';
include_spip('inc/texte');
include_spip('inc/lang');
9 months ago
$id = sql_getfetsel('id_breve', 'spip_breves', "statut='publie'", '', '', '0,1');
if (!$id) { echo 'NA Necessite une breve publiee<br />';
}
$p0 = "[->breve$id]";
9 months ago
if (
!$c = extraire_attribut(propre($p0), 'class')
or strpos($c, 'spip_in') === false
or strpos($c, 'spip_out') !== false
) {
$err[] = "Classe $c errone dans $p0 : " . PtoBR(propre($p0));
}
// si le tableau $err est pas vide ca va pas
if (count($err)) {
echo ('<dl><dt>' . join('</dt><dt>', $err) . '</dt></dl>');
} else {
9 months ago
echo 'OK';
}