#!/usr/bin/env php . */ define('INSTALLDIR', dirname(__DIR__)); define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public'); $shortoptions = 'y'; $longoptions = array('yes'); $helptext = <<find(); while ($thumbs->fetch()) { try { $file = $thumbs->getFile(); if ($file->isLocal()) { // only delete properly linked thumbnails if they're local $thumbs->delete(); print '.'; } } catch (NoResultException $e) { // No File object for thumbnail, let's delete the thumbnail entry $thumbs->delete(); print 'x'; } } print "\nDONE.\n";