Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

Commit

Permalink
add: missing files
Browse files Browse the repository at this point in the history
  • Loading branch information
darkalchemy committed Oct 14, 2018
1 parent aa5678c commit 0c73995
Show file tree
Hide file tree
Showing 68 changed files with 36,526 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backups/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
28 changes: 28 additions & 0 deletions bin/validate_images.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

require_once dirname(__FILE__, 2) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'bittorrent.php';
$paths = [
IMAGES_DIR . DIRECTORY_SEPARATOR . 'proxy',
];

$dirsize = $o = $i = 0;
foreach ($paths as $path) {
$dirsize += (int) GetDirectorySize($path, false);
$objects = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::SKIP_DOTS), RecursiveIteratorIterator::SELF_FIRST);
foreach ($objects as $name => $object) {
if (!exif_imagetype($name)) {
if (basename($name) === '.gitignore') {
continue;
}
++$i;
unlink($name);
echo "$name \n";
} else {
++$o;
}
}
}
$dirsize = human_filesize($dirsize);
echo "$o images validated
Images size: $dirsize
$i bad images removed\n";
1 change: 1 addition & 0 deletions cache/happyhour.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a:3:{s:4:"time";s:16:"2018-10-15 04:18";s:6:"status";s:1:"1";s:5:"catid";i:255;}
Loading

0 comments on commit 0c73995

Please sign in to comment.