summaryrefslogtreecommitdiffstats
path: root/gen_thumbs.php
diff options
context:
space:
mode:
authorAndreas Unterkircher <unki@netshadow.at>2008-01-13 10:57:43 +0100
committerAndreas Unterkircher <unki@netshadow.at>2008-01-13 10:57:43 +0100
commit1dc0e2e565d3c8b49e1074acd5875ffb63b085c9 (patch)
treec5836b90c4789a9848edef88c404143058a92f43 /gen_thumbs.php
parent642996d363598ad9b919f261e39c04f25ebabeb1 (diff)
issue98, add function to clean up phpfspot database
Signed-off-by: Andreas Unterkircher <unki@netshadow.at>
Diffstat (limited to 'gen_thumbs.php')
-rwxr-xr-xgen_thumbs.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/gen_thumbs.php b/gen_thumbs.php
index f6742e0..05b7d0c 100755
--- a/gen_thumbs.php
+++ b/gen_thumbs.php
@@ -37,10 +37,12 @@ $overwrite = false;
$short_options = "";
$short_options.= "h"; /* help */
$short_options.= "o"; /* overwrite */
+$short_options.= "c"; /* cleanup */
$long_options = array(
"help",
"overwrite",
+ "cleanup",
);
/* command line option specified? */
@@ -66,6 +68,11 @@ if(isset($_SERVER['argc']) && $_SERVER['argc'] > 1) {
print "Overwrite flag set!\n";
$overwrite = true;
break;
+ case 'c':
+ case '--cleanup':
+ $fspot->cleanup_phpfspot_db();
+ exit(0);
+ break;
default:
print "invalid option";
exit(1);