0.7.12.6pre
This commit is contained in:
@@ -32,7 +32,7 @@ switch ($mode) {
|
||||
|
||||
$stmt = $dbp->prepare("INSERT INTO icons VALUES (:fid, :hash, :created, :relative_path, :tool)");
|
||||
|
||||
$cmd = $bin_qltool." di ".$shellpath." ".$p['thumb_size']." ".$p['thumb_size']." | base64 --decode | ".$bin_magick." convert - -scale 50% -strip -define png:compression-level=9 ".$tfile;
|
||||
$cmd = $bin_qltool." di ".$shellpath." ".$p['thumb_size']." ".$p['thumb_size']." | base64 --decode > ".$tfile;
|
||||
shell_exec($cmd);
|
||||
|
||||
$stmt->BindValue(":fid",$fid);
|
||||
@@ -46,7 +46,7 @@ switch ($mode) {
|
||||
} else {
|
||||
$dfile = $bpath."/icons/".substr($hash, 0, 2)."/".$hash.".png";
|
||||
if (!is_dir(dirname($dfile))) { mkdir(dirname($dfile)); }
|
||||
rename($tfile,$dfile);
|
||||
shell_exec("sips -z ".$p['thumb_size']." ".$p['thumb_size']." ".$tfile." --out ".$dfile);
|
||||
$stmt->BindValue(":created",time());
|
||||
$stmt->BindValue(":relative_path",substr($dfile,strlen($bpath)));
|
||||
$stmt->BindValue(":tool","qltool");
|
||||
|
||||
Reference in New Issue
Block a user