issue24, some stylesheet changes
[phpfspot.git] / gen_thumbs.php
index 1912a54b8f3a44deb02ee154e872090573f72f39..8ea9b17d4a2421ba5db2f04d94cf9c0057365a90 100755 (executable)
@@ -1,9 +1,20 @@
 #!/usr/bin/php
 <?php
 
+if(!isset($_SERVER["TERM"])) {
+   print "<br /><br />This script should only be invoked from command line!<br />\n";
+   die;
+}
+
 require_once "phpfspot.class.php";
 
 $fspot = new PHPFSPOT;
-$fspot->gen_thumbs('fromcmd');
+$fspot->fromcmd = true;
+
+$all = $fspot->getPhotoSelection();
+
+foreach($all as $photo) {
+   $fspot->gen_thumb($photo);
+}
 
 ?>