Files
freshrss-read-more/tests/e2e/reset.php
T
Vincent BourdonandClaude Opus 5.5 07f936ae80 test: e2e sur FreshRSS 1.30.4 (repli, marquage lu au scroll)
Corrige aussi la hauteur repliée (box-sizing: border-box) : le padding
de .text s'ajoutait à la hauteur configurée.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 19:09:20 +01:00

21 lines
785 B
PHP

<?php
// Run inside the FreshRSS container (mounted with the extension):
// php reset.php [collapsed_height]
// Enables the extension and mark-read-on-scroll for user "test", sets the
// collapsed height, reader view, and marks every entry unread.
declare(strict_types=1);
$height = (int)($argv[1] ?? 250);
$dir = '/var/www/FreshRSS/data/users/test';
$file = "$dir/config.php";
$conf = include $file;
$conf['extensions_enabled']['Read More'] = true;
$conf['extensions']['Read More']['collapsed_height'] = $height;
$conf['mark_when']['scroll'] = true;
$conf['view_mode'] = 'reader';
file_put_contents($file, "<?php\nreturn " . var_export($conf, true) . ";\n");
$pdo = new PDO("sqlite:$dir/db.sqlite");
$pdo->exec('UPDATE entry SET is_read = 0');
echo "reset ok (height=$height)\n";