mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 20:40:49 +08:00
fix common undefined constant error
This commit is contained in:
@@ -49,7 +49,17 @@ if ($_SERVER["REQUEST_METHOD"] == "POST")
|
||||
stderr($lang_bitbucketupload['std_image_processing_failed'],$lang_bitbucketupload['std_sorry_the_uploaded']."$imgtypes[$it]".$lang_bitbucketupload['std_failed_processing']);
|
||||
$thumb = imagecreatetruecolor($newwidth, $newheight);
|
||||
imagecopyresized($thumb, $orig, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
|
||||
$ret=($it==1)?imagegif($thumb, $tgtfile): ($it==2)?imagejpeg($thumb, $tgtfile):imagepng($thumb, $tgtfile);
|
||||
switch ($it) {
|
||||
case 1:
|
||||
$ret = imagegif($thumb, $tgtfile);
|
||||
break;
|
||||
case 2:
|
||||
$ret = imagejpeg($thumb, $tgtfile);
|
||||
break;
|
||||
default:
|
||||
$ret = imagepng($thumb, $tgtfile);
|
||||
}
|
||||
// $ret=($it==1)?imagegif($thumb, $tgtfile): ($it==2)?imagejpeg($thumb, $tgtfile):imagepng($thumb, $tgtfile);
|
||||
|
||||
$url = str_replace(" ", "%20", htmlspecialchars(get_protocol_prefix()."$BASEURL/bitbucket/$filename"));
|
||||
$name = sqlesc($filename);
|
||||
|
||||
Reference in New Issue
Block a user