# HG changeset patch # User Matti Hamalainen # Date 1544611257 -7200 # Node ID 19dab8b0c34070bad266478d7e5e4f1db39ab879 # Parent 3af3b3f50cb079a27b7bb43a40a27c0330553d43 Remove clean command suboptions 'thumbnails' and 'mediums' and replace them with 'images'. diff -r 3af3b3f50cb0 -r 19dab8b0c340 mgtool.php --- 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 [path]\n". - " Delete all generated files or selectively cache files or\n". - " everything inside thumbnail directories.\n". + " clean [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");