C'est un gros plus, car plus besoin d'avoir une réécriture d'url pour que cela fonctionne Normalement, on garde la compat spip < 41
33 lines
965 B
PHP
33 lines
965 B
PHP
<?php
|
|
/**
|
|
* Options au chargement du plugin BigForm
|
|
*
|
|
* @plugin BigForm
|
|
* @copyright 2019
|
|
* @author tofulm
|
|
* @licence GNU/GPL
|
|
* @package SPIP\Bigform\Options
|
|
*/
|
|
|
|
if (!defined('_ECRIRE_INC_VERSION')) {
|
|
return;
|
|
}
|
|
|
|
function urls_generer_url_document($id_document, $args = '', $ancre = '', $public = null, $connect = '') {
|
|
$f = charger_fonction('bigform_generer_url_document', 'inc');
|
|
return $f($id_document, $args, $ancre, $public, $connect);
|
|
}
|
|
|
|
// https://code.spip.net/@urls_propres2_dist
|
|
function urls_propres2($i, &$entite, $args = '', $ancre = '') {
|
|
if ($entite === 'document' and intval($i)) {
|
|
if (sql_countsel('spip_documents',['id_document='.$i, 'protected="oui"'])) {
|
|
//return generer_url_action('charger_document','id_document='.$i);
|
|
include_spip('inc/securiser_action');
|
|
return securiser_action_auteur('charger_document',$i);
|
|
}
|
|
}
|
|
|
|
$f = charger_fonction('propres', 'urls');
|
|
return $f($i, $entite, $args, $ancre);
|
|
}
|