@@ 443-450 (lines=8) @@ | ||
440 | } |
|
441 | ||
442 | // Support width as % of original width |
|
443 | if ($newWidth && $newWidth[strlen($newWidth)-1] == '%') { |
|
444 | is_numeric(substr($newWidth, 0, -1)) |
|
445 | or errorPage('Width % not numeric.', 404); |
|
446 | } else { |
|
447 | is_null($newWidth) |
|
448 | or ($newWidth > 10 && $newWidth <= $maxWidth) |
|
449 | or errorPage('Width out of range.', 404); |
|
450 | } |
|
451 | ||
452 | verbose("new width = $newWidth"); |
|
453 | ||
@@ 468-475 (lines=8) @@ | ||
465 | } |
|
466 | ||
467 | // height |
|
468 | if ($newHeight && $newHeight[strlen($newHeight)-1] == '%') { |
|
469 | is_numeric(substr($newHeight, 0, -1)) |
|
470 | or errorPage('Height % out of range.', 404); |
|
471 | } else { |
|
472 | is_null($newHeight) |
|
473 | or ($newHeight > 10 && $newHeight <= $maxHeight) |
|
474 | or errorPage('Height out of range.', 404); |
|
475 | } |
|
476 | ||
477 | verbose("new height = $newHeight"); |
|
478 |