[SCRIPTS] Update clean_file_table
This commit is contained in:
parent
f8e6ad416b
commit
890f3bd91e
|
@ -17,7 +17,6 @@
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('INSTALLDIR', dirname(__DIR__));
|
define('INSTALLDIR', dirname(__DIR__));
|
||||||
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
|
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
|
||||||
|
|
||||||
|
@ -47,8 +46,9 @@ if (!have_option('y', 'yes')) {
|
||||||
|
|
||||||
print "Deleting";
|
print "Deleting";
|
||||||
$file = new File();
|
$file = new File();
|
||||||
$file->whereAdd('filename IS NOT NULL'); // local files
|
// Select local files
|
||||||
$file->whereAdd('filehash IS NULL', 'AND'); // without filehash value
|
$file->whereAdd('filename IS NOT NULL');
|
||||||
|
$file->whereAdd('url IS NULL', 'AND');
|
||||||
if ($file->find()) {
|
if ($file->find()) {
|
||||||
while ($file->fetch()) {
|
while ($file->fetch()) {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user