mirror of
https://github.com/mosbth/cimage.git
synced 2025-08-16 13:04:13 +02:00
Corrected behaviour for skip-original. Fix #60
This commit is contained in:
@@ -341,7 +341,7 @@ verbose("area = $area");
|
||||
/**
|
||||
* skip-original, so - skip the original image and always process a new image
|
||||
*/
|
||||
$useOriginal = getDefined(array('save-as', 'sa'), false, true);
|
||||
$useOriginal = getDefined(array('skip-original', 'so'), false, true);
|
||||
|
||||
verbose("use original = $useOriginal");
|
||||
|
||||
|
@@ -11,7 +11,7 @@
|
||||
window.getDetails = function (url, id) {
|
||||
$.getJSON(url, function(data) {
|
||||
element = document.getElementById(id);
|
||||
element.innerHTML = "width: " + data.width + "\nheigh: " + data.height + "\naspect-ratio: " + data.aspectRatio;
|
||||
element.innerHTML = "filename: " + data.filename + "\nsize: " + data.size + "\nwidth: " + data.width + "\nheigh: " + data.height + "\naspect-ratio: " + data.aspectRatio;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
33
webroot/test/test_issue60.php
Normal file
33
webroot/test/test_issue60.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
// Include config for all testcases
|
||||
include __DIR__ . "/config.php";
|
||||
|
||||
|
||||
|
||||
// The title of the test case
|
||||
$title = "Testing issue 60 - skip original";
|
||||
|
||||
|
||||
|
||||
// Provide a short description of the testcase.
|
||||
$description = "Always use the original if suitable, use skip-original to force using the cached version.";
|
||||
|
||||
|
||||
|
||||
// Use these images in the test
|
||||
$images = array(
|
||||
'car.png',
|
||||
);
|
||||
|
||||
|
||||
|
||||
// For each image, apply these testcases
|
||||
$testcase = array(
|
||||
'',
|
||||
'&so',
|
||||
);
|
||||
|
||||
|
||||
|
||||
// Apply testcases and present results
|
||||
include __DIR__ . "/template.php";
|
Reference in New Issue
Block a user