Rename soutien → support (English naming convention)

- getSoutenirContent() → getContent()
- SOUTIEN_API_TOKEN → SUPPORT_API_TOKEN
- API URL : api/soutien-content → api/support-content

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
isUnknown 2026-04-12 08:20:18 +02:00
parent 322d9136b6
commit 1af076c3fd
6 changed files with 9 additions and 9 deletions

View file

@ -1,6 +1,6 @@
<?php
require_once __DIR__ . '/../includes/cache.php';
$data = getSoutenirContent('en');
$data = getContent('en');
?>
<!DOCTYPE html>
<html lang="en">

View file

@ -2,7 +2,7 @@
require_once __DIR__ . '/config.php';
function getSoutenirContent(string $lang = 'fr'): array {
function getContent(string $lang = 'fr'): array {
$cacheFile = CACHE_DIR . "/content.{$lang}.json";
// Serve cache if fresh
@ -12,8 +12,8 @@ function getSoutenirContent(string $lang = 'fr'): array {
// Fetch from Kirby API
$url = KIRBY_API_URL . '?lang=' . urlencode($lang);
if (SOUTIEN_API_TOKEN) {
$url .= '&token=' . urlencode(SOUTIEN_API_TOKEN);
if (SUPPORT_API_TOKEN) {
$url .= '&token=' . urlencode(SUPPORT_API_TOKEN);
}
$context = stream_context_create([

View file

@ -1,6 +1,6 @@
<?php
define('KIRBY_API_URL', 'https://www.index.ngo/api/soutien-content');
define('SOUTIEN_API_TOKEN', ''); // À remplir avec le même token que dans la config Kirby
define('KIRBY_API_URL', 'https://www.index.ngo/api/support-content');
define('SUPPORT_API_TOKEN', ''); // À remplir avec le même token que dans la config Kirby
define('CACHE_TTL', 300); // 5 minutes
define('CACHE_DIR', __DIR__ . '/../cache');

View file

@ -1,6 +1,6 @@
<?php
require_once __DIR__ . '/includes/cache.php';
$data = getSoutenirContent('fr');
$data = getContent('fr');
?>
<!DOCTYPE html>
<html lang="fr">

View file

@ -1,6 +1,6 @@
<?php
require_once __DIR__ . '/../includes/cache.php';
$data = getSoutenirContent('fr');
$data = getContent('fr');
?>
<!DOCTYPE html>
<html lang="fr">

View file

@ -1,6 +1,6 @@
<?php
require_once __DIR__ . '/../includes/cache.php';
$data = getSoutenirContent('en');
$data = getContent('en');
?>
<!DOCTYPE html>
<html lang="en">