accepter de charger une image sans avoir le hash
This commit is contained in:
parent
b7f2495289
commit
acc8ed8ded
1 changed files with 12 additions and 3 deletions
|
@ -1,10 +1,19 @@
|
||||||
<?php
|
<?php
|
||||||
if (!defined('_ECRIRE_INC_VERSION')) return;
|
if (!defined('_ECRIRE_INC_VERSION')) return;
|
||||||
|
|
||||||
function action_charger_document_dist(){
|
function action_charger_document_dist($arg=null){
|
||||||
|
|
||||||
$securiser_action = charger_fonction('securiser_action', 'inc');
|
if (is_null($arg)) {
|
||||||
$arg = $securiser_action();
|
// DEMI sécurité : s'il y a un hash, on teste la sécurité
|
||||||
|
if (_request('hash')) {
|
||||||
|
$securiser_action = charger_fonction('securiser_action', 'inc');
|
||||||
|
$arg = $securiser_action();
|
||||||
|
}
|
||||||
|
// Sinon, on prend l'arg direct
|
||||||
|
else {
|
||||||
|
$arg = _request('arg');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
include_spip('inc/autoriser');
|
include_spip('inc/autoriser');
|
||||||
if (! autoriser("charger","document")) {
|
if (! autoriser("charger","document")) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue