$sourceFile = trim($sourceFile, '\\"'); $sourceFile = trim($sourceFile, '"'); echo " Unquoted: " . $sourceFile; } echo "Received parameters=> File:" . $sourceFile . " Ext:" . $ext . " Cat:" . $id_category . " Type:" . $image_on_server . " Version:" . $Version; //Gestion des images passées par URL HTTP OU FTP if ($image_on_server == 2 || $image_on_server == 3) { $url = $sourceFile; echo " register_globals: " . ini_get('register_globals'); echo " safe_mode: " . ini_get('safe_mode'); echo " allow_url_fopen: " . ini_get('allow_url_fopen'); if ($Version >= 12000 && $Version < 13000) { copyImg12($id_category, null, $url, $entity = 'categories'); } if ($Version >= 13000 && $Version < 14000) { copyImg13($id_category, null, $url, $entity = 'categories'); } if ($Version >= 14000 && $Version < 15000) { copyImg14($id_category, null, $url, $entity = 'categories'); } if ($Version >= 15000) { // && $Version < 16000) copyImg15($id_category, null, $url, $entity = 'categories'); } return true; } if ($image_on_server == 1) { $sourceFile = $sourceFile . '.' . $ext; //rajout de l'extension envoyée à part if ($image_on_server == 1 and $id_category = (int) Tools::getValue('id_category') and file_exists($chemin_images_category . $sourceFile)) { echo "Resizing:" . $chemin_images_category . $sourceFile;
$sourceFile = trim($sourceFile, '\\"'); $sourceFile = trim($sourceFile, '"'); echo " Unquoted: " . $sourceFile; } echo "Received parameters=> File:" . $sourceFile . " Ext:" . $ext . " Cat:" . $id_product . " Type:" . $image_on_server . " Version:" . $Version; //Gestion des images passées par URL HTTP OU FTP if ($image_on_server == 2 || $image_on_server == 3) { $url = $sourceFile; echo " register_globals: " . ini_get('register_globals'); echo " safe_mode: " . ini_get('safe_mode'); echo " allow_url_fopen: " . ini_get('allow_url_fopen'); if ($Version >= 12000 && $Version < 13000) { copyImg12($id_product, $id_image, $url, $entity = 'products'); } if ($Version >= 13000 && $Version < 14000) { copyImg13($id_product, $id_image, $url, $entity = 'products'); } if ($Version >= 14000 && $Version < 15000) { copyImg14($id_product, $id_image, $url, $entity = 'products'); } if ($Version >= 15000) { // && $Version < 16000) copyImg15($id_product, $id_image, $url, $entity = 'products'); } return true; } //cas des images locales uploadées if ($image_on_server == 1) { $sourceFile = $sourceFile . '.' . $ext; //rajout de l'extension envoyée à part $old_image_model = Configuration::get('PS_LEGACY_IMAGES');