From bf56f2e120e61a77a789db57d19f319250c8a340 Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Mon, 8 Jul 2024 09:12:26 +0200 Subject: [PATCH] enabled mp cookie update --- epub.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/epub.php b/epub.php index 4b3a8d0..e9c51d5 100644 --- a/epub.php +++ b/epub.php @@ -98,7 +98,7 @@ $date = (new DateTime('today'))->format('Ymd'); // Socialter - if (isset($_POST['socialter']) && $_POST['socialter']) + /*if (isset($_POST['socialter']) && $_POST['socialter']) { // parameters hardcoded for now $includeimages = false; @@ -206,8 +206,7 @@ } } write_epub($epub); - } - + }*/ // Le Monde if (isset($_POST['lemonde']) && $_POST['lemonde']) @@ -325,8 +324,12 @@ { if (isset($_POST['forcempcookies']) && $_POST['forcempcookies']) { + $old = $mp_sessionid; $mp_sessionid = get_mp_cookie(); - // todo save in settings + $settings = file_get_contents('settings.php'); + $settings = str_replace($old, $mp_sessionid, $settings); + file_put_contents('settings.php', $settings); + echo '
Updated mpsessid in settings
'; } $feedurl = 'https://www.mediapart.fr/articles/feed'; @@ -590,7 +593,7 @@
- +