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

docs: PhpDoc

parent 9691b18c
Branches
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -14,6 +14,9 @@ if (!defined('_ECRIRE_INC_VERSION')) { ...@@ -14,6 +14,9 @@ if (!defined('_ECRIRE_INC_VERSION')) {
return; return;
} }
/**
* @throws \JsonException
*/
function action_ordonner_liens_blocks_dist() { function action_ordonner_liens_blocks_dist() {
include_spip('inc/autoriser'); include_spip('inc/autoriser');
include_spip('base/objets'); include_spip('base/objets');
...@@ -81,11 +84,17 @@ function action_ordonner_liens_blocks_dist() { ...@@ -81,11 +84,17 @@ function action_ordonner_liens_blocks_dist() {
]); ]);
} }
/**
* @throws \JsonException
*/
function envoyer_json_envoi($data) { function envoyer_json_envoi($data) {
header('Content-Type: application/json; charset=' . $GLOBALS['meta']['charset']); header('Content-Type: application/json; charset=' . $GLOBALS['meta']['charset']);
echo json_encode($data, JSON_THROW_ON_ERROR); echo json_encode($data, JSON_THROW_ON_ERROR);
} }
/**
* @throws \JsonException
*/
function envoyer_json_erreur($msg) { function envoyer_json_erreur($msg) {
return envoyer_json_envoi([ return envoyer_json_envoi([
'done' => false, 'done' => false,
......
...@@ -21,7 +21,9 @@ if (!defined('_ECRIRE_INC_VERSION')) { ...@@ -21,7 +21,9 @@ if (!defined('_ECRIRE_INC_VERSION')) {
* @param null|int $arg * @param null|int $arg
* Identifiant à supprimer. * Identifiant à supprimer.
* En absence de id utilise l'argument de l'action sécurisée. * En absence de id utilise l'argument de l'action sécurisée.
**/ *
* @throws \JsonException
*/
function action_supprimer_block_dist($arg = null) { function action_supprimer_block_dist($arg = null) {
if (is_null($arg)) { if (is_null($arg)) {
$securiser_action = charger_fonction('securiser_action', 'inc'); $securiser_action = charger_fonction('securiser_action', 'inc');
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter