From 9b1ccdc32074da30fc0658f6c36895adc7043f23 Mon Sep 17 00:00:00 2001 From: Diogo Peralta Cordeiro Date: Sun, 21 Feb 2021 13:30:09 +0000 Subject: [PATCH] [SCRIPTS] Update clean_file_table --- scripts/clean_file_table.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/clean_file_table.php b/scripts/clean_file_table.php index 2444a4bb69..faebf4112f 100755 --- a/scripts/clean_file_table.php +++ b/scripts/clean_file_table.php @@ -17,7 +17,6 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ - define('INSTALLDIR', dirname(__DIR__)); define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public'); @@ -47,8 +46,9 @@ if (!have_option('y', 'yes')) { print "Deleting"; $file = new File(); -$file->whereAdd('filename IS NOT NULL'); // local files -$file->whereAdd('filehash IS NULL', 'AND'); // without filehash value +// Select local files +$file->whereAdd('filename IS NOT NULL'); +$file->whereAdd('url IS NULL', 'AND'); if ($file->find()) { while ($file->fetch()) { try {