enabled mp cookie update
This commit is contained in:
parent
44017ffd35
commit
bf56f2e120
13
epub.php
13
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 '<div>Updated mpsessid in settings</div>';
|
||||
}
|
||||
|
||||
$feedurl = 'https://www.mediapart.fr/articles/feed';
|
||||
|
@ -590,7 +593,7 @@
|
|||
<input id="mediapart" name="mediapart" type="checkbox">
|
||||
<label for="mediapart">From RSS</label>
|
||||
<br>
|
||||
<input disabled id="forcempcookies" name="forcempcookies" type="checkbox">
|
||||
<input id="forcempcookies" name="forcempcookies" type="checkbox">
|
||||
<label for="forcempcookies">Force cookies</label>
|
||||
|
||||
<br><br>
|
||||
|
|
Loading…
Reference in New Issue