# HG changeset patch # User Matti Hamalainen # Date 1417249555 -7200 # Node ID 9c93a3c4f95c398779d95df4e9a1a74f1e46bec1 # Parent 26ae3f21a3bbced1c9a008c2f8d45b402f55df86 Clean out the debug code, etc. diff -r 26ae3f21a3bb -r 9c93a3c4f95c faptool.php --- a/faptool.php Sat Nov 29 10:13:20 2014 +0200 +++ b/faptool.php Sat Nov 29 10:25:55 2014 +0200 @@ -22,7 +22,8 @@ $isTemp = TRUE; if (wtExec( "/usr/local/bin/gfxconv", - escapeshellarg($inFilename)." -f png -o ".escapeshellarg($tmpFilename)) === false) + escapeshellarg($inFilename)." -f png -o ".escapeshellarg($tmpFilename), + 0) === false) return FALSE; if (!file_exists($tmpFilename)) @@ -249,7 +250,7 @@ return TRUE; } else - if ($mode != "upd") + if ($mode != "gen") die("ERROR: Unsupported previews mode ".$mode."\n"); // Check validity of previews @@ -321,9 +322,6 @@ $found = wtEntryToSource($compo, $filename, $edata, $filename, $pdata, $outFilename); } - printf("X: %d, %d\n", $edata["class"], $compo["preview_type"]); - print_r($edata); - if (!$found) { echo "WARNING: Could not generate preview from entry ".wtNiceName($compo, $entry, $efile)."\n"; @@ -547,7 +545,7 @@ " previews [args]\n". " Where is one of:\n". " status [cid] - List files and show what is missing, etc. (All or )\n". - " update - Generate preview files that are missing OR out of date.\n". + " generate - Generate preview files that are missing OR out of date.\n". " (older then preview source file OR entry file where appropriate)\n". // " add - Add file as preview for entry_id.\n". "\n". @@ -738,7 +736,7 @@ $mode = substr(stCArgLC(2), 0, 3); switch ($mode) { - case "upd": + case "gen": case "sta": case "lis": $sql = (stCArg(3) != "") ? " AND id=".intval(stCArg(3)) : "";