diff --git a/plugins/StoreRemoteMedia/scripts/removeRemoteMedia.php b/plugins/StoreRemoteMedia/scripts/removeRemoteMedia.php index 5961418784..138df1af13 100755 --- a/plugins/StoreRemoteMedia/scripts/removeRemoteMedia.php +++ b/plugins/StoreRemoteMedia/scripts/removeRemoteMedia.php @@ -20,8 +20,9 @@ * * @category Plugin * @package GNUsocial - * @author Diogo Cordeiro - * @copyright 2018 Free Software Foundation, Inc http://www.fsf.org + * @author Diogo Peralta Cordeiro + * @author Alexei Sorokin + * @copyright 2018-2021 Free Software Foundation, Inc http://www.fsf.org * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later */ @@ -33,20 +34,15 @@ $longoptions = ['limit=', 'all', 'image']; $helptext = <<query(sprintf( FROM file_to_post INNER JOIN file ON file_to_post.file_id = file.id INNER JOIN notice ON file_to_post.post_id = notice.id - WHERE notice.is_local = 0 - %1$s%2$sAND notice.modified <= '%3$s' + WHERE notice.is_local = 0 AND notice.modified <= '%3$s' GROUP BY file_to_post.file_id ORDER BY MAX(notice.modified) END, - $image_only ? 'AND file.width IS NOT NULL AND file.height IS NOT NULL ' : '', - $include_previews ? '' : 'AND file.filehash IS NOT NULL ', $fn->escape($max_date) ));