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.
 
 
 
 

81 lines
1.8 KiB

<?php
/**
* Fichier d'options de spip.net
*
* Penser à activer les URLs 'trad'.
* et à intégrer le htaccess.txt dans le .htaccess ou le vhost.
*/
define('_SPIP_TOPNAV', true);
// pas d'autobr dans l'aide, ca casse des images (autobr a debug donc)
if (_request('lang_aide')) {
define('_AUTOBR','');
}
// raccourcis [->spip19] etc
function generer_url_ecrire_spip($rac,$args,$ancre) {
return generer_url_spip($rac, $args, $ancre);
}
function generer_url_spip($rac, $args, $ancre) {
static $liens_spip = array(
1 => 1309,
10 => 1309,
103 => 1309,
104 => 1309,
105 => 1309,
12 => 1310,
121 => 1310,
13 => 1253,
14 => 1832,
15 => 1911,
16 => 1965,
17 => 2102,
171 => 2102,
172 => 2102,
18 => 2991,
181 => 2991,
182 => 3173,
183 => 3333,
19 => 3368,
191 => 3462,
192 => 3567,
20 => 3784,
21 => 4728,
30 => 5427,
);
if (isset($liens_spip[$rac])) {
$id = $liens_spip[$rac];
$id_trad = sql_getfetsel('id_article', 'spip_articles',
"id_trad=" . $id
. " AND lang=" . sql_quote($GLOBALS['spip_lang'])
);
if ($id_trad) {
$id = $id_trad;
}
return array('article', $id);
}
spip_log("raccourci spip$id inconnu");
return '';
}
// antispam de signature de forum (a integrer dans akismet ?)
function inc_controler_signature($id_article, $nom_email, $adresse_email, $message, $nom_site, $url_site, $url_page) {
if (
$a = @unserialize($GLOBALS['meta']['spampetitions'])
AND strlen($a = $a['regexp'])
AND (
preg_match($a, $nom_email)
OR preg_match($a, $adresse_email)
OR preg_match($a, $message)
)
) {
spip_log("spam detecte sur la petition $id_article", 'spam');
return false; // spam detecte
}
return inc_controler_signature_dist($id_article, $nom_email, $adresse_email, $message, $nom_site, $url_site, $url_page);
}