#!/usr/bin/env php . /** * StoreRemoteMediaPlugin * * @category Plugin * @package GNUsocial * @author Diogo Cordeiro * @copyright 2018 Free Software Foundation, Inc http://www.fsf.org * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later */ define('INSTALLDIR', dirname(__DIR__, 3)); define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public'); $shortoptions = 'l::a::i'; $longoptions = ['limit=', 'all', 'image']; $helptext = <<query($query); while ($fn->fetch()) { $file = File::getByID($fn->file_id); $file_info_id = $file->getID(); // Delete current file $file->delete(); if (!$quiet) { echo "Deleted file with id: {$file_info_id}\n"; } }