summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lightbox2.module12
1 files changed, 6 insertions, 6 deletions
diff --git a/lightbox2.module b/lightbox2.module
index b26410f..21fad72 100644
--- a/lightbox2.module
+++ b/lightbox2.module
@@ -497,7 +497,7 @@ function lightbox2_auto_image_handling_settings_form() {
'#multiple' => TRUE,
'#title' => t('Image trigger size'),
'#options' => $size_options,
- '#default_value' => variable_get('lightbox2_trigger_image_size', array('thumbnail' => t('Thumbnail'))),
+ '#default_value' => variable_get('lightbox2_trigger_image_size', array('thumbnail')),
'#description' => t('Select which image size, when clicked on, will automatically trigger the lightbox. This only applies to images uploaded with the Image module.'),
);
@@ -784,8 +784,8 @@ function lightbox2_add_files() {
// Image nodes.
if ($image_node_handler) {
- $trigger_sizes = variable_get('lightbox2_trigger_image_size', array('thumbnail' => t('Thumbnail')));
- foreach ($trigger_sizes as $size => $size_name) {
+ $trigger_sizes = variable_get('lightbox2_trigger_image_size', array('thumbnail'));
+ foreach ($trigger_sizes as $size) {
$triggers = "img.$size, img.image-$size,";
if (empty($size)) {
$triggers = "img._original, img.image-_original,";
@@ -1095,9 +1095,9 @@ function lightbox2_imagecache_create_url($preset, $filepath) {
else {
$dirpath = file_directory_path();
$dirlen = strlen($dirpath);
- if (substr($path, 0, $dirlen + 1) == $dirpath .'/') {
- $filepath = substr($path, $dirlen + 1);
+ if (substr($filepath, 0, $dirlen + 1) == $dirpath .'/') {
+ $filepath = substr($filepath, $dirlen + 1);
}
- return file_create_url(file_directory_path() .'/imagecache/'. $preset .'/'. $filepath);
+ return file_create_url(file_directory_path() .'/imagecache/'. $preset .'/'. $filepath);
}
}