diff options
| author | 2020-04-30 12:11:51 +0200 | |
|---|---|---|
| committer | 2020-04-30 12:11:51 +0200 | |
| commit | 8f188ffa8498424653a3e6086ef99bbe1745cd29 (patch) | |
| tree | e09c5dd3feb23cca561bae5eb3996df7bbfc536f /cli/export-zip-for-user.php | |
| parent | 4ac868b30102c8fc9c2499a9b56e98c5c2a93ea0 (diff) | |
Fix filenames for files exported with CLI (#2932)
Filenames were created with the username of the current user. However,
when we export the files with the CLI, the current user is "_".
This commit makes the username always required in the `exportFile`
method so we make sure to always manipulate a real value. Consequently,
the filenames can be formatted correctly.
Obviously, this has absolutely no impacts since the CLI doesn't consider
the HTTP headers. It just makes things a bit more clear. It's a first
step to remove the concept of "default user".
Diffstat (limited to 'cli/export-zip-for-user.php')
| -rwxr-xr-x | cli/export-zip-for-user.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cli/export-zip-for-user.php b/cli/export-zip-for-user.php index b89a55104..fcefa9ccf 100755 --- a/cli/export-zip-for-user.php +++ b/cli/export-zip-for-user.php @@ -20,10 +20,9 @@ fwrite(STDERR, 'FreshRSS exporting ZIP for user “' . $username . "”…\n"); $importController = new FreshRSS_importExport_Controller(); $ok = false; +$number_entries = empty($options['max-feed-entries']) ? 100 : intval($options['max-feed-entries']); try { - $ok = $importController->exportFile(true, true, true, true, - empty($options['max-feed-entries']) ? 100 : intval($options['max-feed-entries']), - $username); + $ok = $importController->exportFile($username, true, true, true, true, $number_entries); } catch (FreshRSS_ZipMissing_Exception $zme) { fail('FreshRSS error: Lacking php-zip extension!'); } |
