1
0
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:
Mikael Roos
2014-12-13 00:12:39 +01:00
parent 9680cd421b
commit 00dca21be0
5 changed files with 84 additions and 10 deletions

View File

@@ -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");

View File

@@ -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>

View 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";