diff options
Diffstat (limited to 'imagecache_auto.module')
-rw-r--r-- | imagecache_auto.module | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/imagecache_auto.module b/imagecache_auto.module index 22e077f..f55fcd5 100644 --- a/imagecache_auto.module +++ b/imagecache_auto.module @@ -3,9 +3,9 @@ /** * @file - * Imagecache Auto. + * ImageCache Auto. * - * Creates imagecache presets on the fly. + * Create ImageCache presets on the fly. */ /** @@ -14,6 +14,16 @@ function imagecache_auto_menu() { $items = array(); + $items['admin/settings/imagecache/auto'] = array( + 'title' => 'ImageCache Auto Configuration', + 'description' => 'Adjust ImageCache Auto settings.', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('imagecache_auto_admin_settings'), + 'access arguments' => array('administer site configuration'), + 'type' => MENU_LOCAL_TASK, + 'file' => 'imagecache_auto.admin.inc', + ); + $items[file_directory_path() .'/imagecache_auto'] = array( 'page callback' => 'imagecache_auto', 'access callback' => TRUE, @@ -24,10 +34,9 @@ function imagecache_auto_menu() { } /** - * Automatically create imagecache presets. + * Automatically create ImageCache presets. * * @todo - * Check if width and heigh are integers. * Specify maximum and minimum dimensions. */ function imagecache_auto() { @@ -35,8 +44,8 @@ function imagecache_auto() { $args = func_get_args(); $options = array( - 'width' => check_plain(array_shift($args)), - 'height' => check_plain(array_shift($args)), + 'width' => (int) check_plain(array_shift($args)), + 'height' => (int) check_plain(array_shift($args)), 'path' => implode('/', $args), ); |