changeset 251:19dab8b0c340

Remove clean command suboptions 'thumbnails' and 'mediums' and replace them with 'images'.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 12 Dec 2018 12:40:57 +0200
parents 3af3b3f50cb0
children f85870271f51
files mgtool.php
diffstat 1 files changed, 8 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/mgtool.php	Sat Dec 08 15:51:02 2018 +0200
+++ b/mgtool.php	Wed Dec 12 12:40:57 2018 +0200
@@ -34,8 +34,7 @@
 define("GCMD_CLEAN"       , 3);
 
 define("GCLEAN_CACHES"    , 0x01);
-define("GCLEAN_THUMBNAILS", 0x02);
-define("GCLEAN_MEDIUMS"   , 0x04);
+define("GCLEAN_IMAGES"    , 0x02);
 define("GCLEAN_ALL"       , 0x0f);
 
 define("GUPD_MED_IMAGE"   , 0x01);
@@ -513,11 +512,11 @@
       if ($galCleanFlags & GCLEAN_CACHES)
         mgDelete($cacheFilename, TRUE);
 
-      if ($galCleanFlags & GCLEAN_THUMBNAILS)
+      if ($galCleanFlags & GCLEAN_IMAGES)
+      {
         mgDelete($path."/".$galTNPath, FALSE);
-
-      if ($galCleanFlags & GCLEAN_MEDIUMS)
         mgDelete($path."/".$galMedPath, FALSE);
+      }
     }
   }
   else
@@ -806,9 +805,9 @@
     "    and EXIF/caption/etc information to be re-scanned even\n".
     "    if the file timestamps do not justify re-scanning.\n".
     "\n".
-    "  clean <all|caches|thumbnails|mediums|generated> [path]\n".
-    "    Delete all generated files or selectively cache files or\n".
-    "    everything inside thumbnail directories.\n".
+    "  clean <all|caches|images> [path]\n".
+    "    Delete all generated files, or data cache files or\n".
+    "    everything inside medium/thumbnail image directories.\n".
     "\n".
     "  config|dump\n".
     "    Display configuration values (with extra information) or\n".
@@ -871,9 +870,7 @@
     {
       case "al": $galCleanFlags = GCLEAN_ALL; break;
       case "ca": $galCleanFlags = GCLEAN_CACHES; break;
-      case "th": $galCleanFlags = GCLEAN_THUMBNAILS; break;
-      case "me": $galCleanFlags = GCLEAN_MEDIUMS; break;
-      case "ge": $galCleanFlags = GCLEAN_THUMBNAILS | GCLEAN_MEDIUMS; break;
+      case "im": $galCleanFlags = GCLEAN_IMAGES; break;
       case FALSE:
         mgFatal("Cleaning requires a mode argument.\n");