| 1 |
<?php |
<?php |
| 2 |
// $Id: image_exact.module,v 1.3.2.2 2006/06/26 19:04:34 joshk Exp $ |
// $Id: image_exact.module,v 1.4 2007/05/27 20:19:50 joshk Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Implementation of hook_help(). |
* Implementation of hook_help(). |
| 88 |
if ($node->type == 'image' && $op == 'validate' && variable_get('image_exact_thumbs', 1)) { |
if ($node->type == 'image' && $op == 'validate' && variable_get('image_exact_thumbs', 1)) { |
| 89 |
$sizes = _image_get_sizes(); |
$sizes = _image_get_sizes(); |
| 90 |
foreach(variable_get('image_exact_size', array(0)) as $i) { |
foreach(variable_get('image_exact_size', array(0)) as $i) { |
|
// for ($i = 0; $i < 5; $i++) { |
|
| 91 |
$source = file_create_path($node->images['_original']); |
$source = file_create_path($node->images['_original']); |
| 92 |
$destination = file_create_path($node->images[$sizes[$i]['label']]); |
$destination = file_create_path($node->images[$i]); |
| 93 |
$final_w = $sizes[$i]['width']; |
$final_w = $sizes[$i]['width']; |
| 94 |
$final_h = $sizes[$i]['height']; |
$final_h = $sizes[$i]['height']; |
| 95 |
if ($final_w && $final_h) { |
if ($final_w && $final_h) { |