$imageToEdit = $fs->makeFileNameOK($imageToEdit); $temp = $fs->makeFileNameOK($temp); // check memory limit if (!stristr($task, 'sav') && !strstr($task, 'next') && !strstr($task, 'prev')) { // check memory limit if (!$im->_setMemoryForImage($directory . $imageToEdit)) { $response->addAlert($DIALOG->langEngine->get('wproCore_fileBrowser', 'JSEditMemoryError')); list($origwidth, $origheight) = getimagesize($directory . $imageToEdit); $response->addScriptCall('editFinished', $file, $file, $origwidth, $origheight, false); return $response; } } if (!empty($file) && !empty($temp) && is_file($directory . $imageToEdit)) { if ($task == 'rotate') { if ($options == 90 || $options == 270) { if ($resized = $im->rotate($directory . $imageToEdit, $directory . $temp, intval($options))) { $width = $resized[0]; $height = $resized[1]; $temp = basename($resized[2]); $WPRO_SESS->data['imageEditor'][$editorID]['temp'] = $temp; $response->addScriptCall('editFinished', $file, $temp, $width, $height, true); //$WPRO_SESS->save(); $WPRO_SESS->doSave = true; $response->addScriptCall("dialog.hideLoadMessage", ''); return $response; } else { array_push($failed, $file); } } } else { if ($task == 'resize') {