Commit d1a7a313 authored by Skia's avatar Skia
Browse files

Update convert path

parent e839ff8b
...@@ -49,6 +49,11 @@ $timing=array( ...@@ -49,6 +49,11 @@ $timing=array(
'mysql'=>0, 'mysql'=>0,
'mysql.counter'=>0); 'mysql.counter'=>0);
/**
* Chemin vers les differents programmes externes
*/
$CONVERT="/usr/bin/convert ";
/** Convertit la date en une chaîne human readable /** Convertit la date en une chaîne human readable
* *
......
...@@ -495,7 +495,7 @@ if ( $_REQUEST["action"] == "setphotos" && $can_edit && is_dir("/".$matmatronche ...@@ -495,7 +495,7 @@ if ( $_REQUEST["action"] == "setphotos" && $can_edit && is_dir("/".$matmatronche
($site->user->is_asso_role ( 27, 1 )) || // ou MMT ($site->user->is_asso_role ( 27, 1 )) || // ou MMT
($site->user->is_in_group("gestion_ae"))) // ou gestion_ae ($site->user->is_in_group("gestion_ae"))) // ou gestion_ae
{ {
exec("/usr/share/php5/exec/convert " . escapeshellcmd($src) . " -thumbnail 225x300 " . escapeshellcmd($dest_idt)); exec($CONVERT . escapeshellcmd($src) . " -thumbnail 225x300 " . escapeshellcmd($dest_idt));
} }
} }
...@@ -505,7 +505,7 @@ if ( $_REQUEST["action"] == "setphotos" && $can_edit && is_dir("/".$matmatronche ...@@ -505,7 +505,7 @@ if ( $_REQUEST["action"] == "setphotos" && $can_edit && is_dir("/".$matmatronche
if ( is_uploaded_file($_FILES['mmtfile']['tmp_name']) ) if ( is_uploaded_file($_FILES['mmtfile']['tmp_name']) )
{ {
$src = $_FILES['mmtfile']['tmp_name']; $src = $_FILES['mmtfile']['tmp_name'];
exec("/usr/share/php5/exec/convert " . escapeshellcmd($src) . " -thumbnail 225x300 " . escapeshellcmd($dest_mmt)); exec($CONVERT . escapeshellcmd($src) . " -thumbnail 225x300 " . escapeshellcmd($dest_mmt));
} }
$dest_idt = "/".$matmatronche_folder.intval($user->id).".identity.jpg"; $dest_idt = "/".$matmatronche_folder.intval($user->id).".identity.jpg";
...@@ -530,8 +530,8 @@ if ( $_REQUEST["action"] == "setblouse" && $can_edit ) ...@@ -530,8 +530,8 @@ if ( $_REQUEST["action"] == "setblouse" && $can_edit )
if ( is_uploaded_file($_FILES['blousefile']['tmp_name']) ) if ( is_uploaded_file($_FILES['blousefile']['tmp_name']) )
{ {
$src = $_FILES['blousefile']['tmp_name']; $src = $_FILES['blousefile']['tmp_name'];
exec("/usr/share/php5/exec/convert " . escapeshellcmd($src) . " -thumbnail 1600x1600 -quality 80 " . escapeshellcmd($dest)); exec($CONVERT . escapeshellcmd($src) . " -thumbnail 1600x1600 -quality 80 " . escapeshellcmd($dest));
exec("/usr/share/php5/exec/convert " . escapeshellcmd($src) . " -thumbnail 225x300 -quality 90 " . escapeshellcmd($dest_mini)); exec($CONVERT . escapeshellcmd($src) . " -thumbnail 225x300 -quality 90 " . escapeshellcmd($dest_mini));
} }
$_REQUEST["page"] = "edit"; $_REQUEST["page"] = "edit";
$_REQUEST["open"] = "blouse"; $_REQUEST["open"] = "blouse";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment