### Eclipse Workspace Patch 1.0
#P fast_gallery
Index: fast_gallery.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/fast_gallery/fast_gallery.module,v
retrieving revision 1.28
diff -u -r1.28 fast_gallery.module
--- fast_gallery.module	15 Aug 2008 09:38:56 -0000	1.28
+++ fast_gallery.module	18 Aug 2008 07:20:18 -0000
@@ -1,7 +1,7 @@
 <?php
 
 
-// $Id: fast_gallery.module,v 1.28 2008/08/15 09:38:56 rapsli Exp $
+// $Id: fast_gallery.module,v 1.11 2008/07/18 07:01:05 rapsli Exp $
 
 //This module is sponsered by Schär Webdesign: www.schaerwebdesign.ch or
 //the drupal related blog: www.rapsli.ch
@@ -286,6 +286,7 @@
     ' that this function is not bullet proof. Also if you hit this button multiple times ' .
     'you\'ll get multiple presets with the same name! So please be sure to still have a look ' .
     'at the Imagecache preset page: ') . $ic_link,
+
     
   );
 
@@ -526,7 +527,7 @@
 function theme_fast_gallery_lightbox_code($img_path, $exif, $value) {
   include_once (drupal_get_path('module', 'fast_gallery') . "/fast_gallery.cache.class.php");
   $cache = FastGalleryCache :: getInstance();
-  
+
   $output = '';
   $ar_tmp = explode("/", $value->path);
   $title = $ar_tmp[count($ar_tmp) - 1] . ' - ' . $exif['dateTaken'] . ' - ' . $exif['title'];
@@ -536,18 +537,24 @@
     $ar_img = explode("/", $value->path);
     $name = $ar_img[count($ar_img) - 1];
     $cache->createthumb($value->path, $name, 150, 100, 'jpg');
-    $img = theme('image', $value->path . '.thumb', '', '', array (/*'width'=>150,'height'=>100*/), TRUE);
+    $img = theme('image', $value->path . '.thumb', '', '', array (/*'width'=>150,'height'=>100*/
+    ), TRUE);
   }
-  $link = l($img, $img_path, array (
-    'html' => TRUE,
-    'attributes' => array (
-      'class' => 'lightbox',
-      'rel' => 'lightshow[fast_gallery]',
-      'title' => $title,
+  if ($_GET['q'] != '') {
+    $link = '<a href="' . $img_path . '" class="lightbox" rel="lightshow[fast_gallery]">' .
+    $img . '</a>';
+  } else {
+    $link = l($img, $img_path, array (
+      'html' => TRUE,
+      'attributes' => array (
+        'class' => 'lightbox',
+        'rel' => 'lightshow[fast_gallery]',
+        'title' => $title,
 
-      
-    )
-  ));
+        
+      )
+    ));
+  }
   $output .= '<div class="single-image">';
   $output .= $link;
   $output .= '</div>';
@@ -572,18 +579,24 @@
     $ar_img = explode("/", $value->path);
     $name = $ar_img[count($ar_img) - 1];
     $cache->createthumb($value->path, $name, 150, 100, 'jpg');
-    $img = theme('image', $value->path . '.thumb', '', '', array (/*'width'=>150,'height'=>100*/), TRUE);
+    $img = theme('image', $value->path . '.thumb', '', '', array (/*'width'=>150,'height'=>100*/
+    ), TRUE);
   }
-  $link = l($img, $img_path, array (
-    'html' => TRUE,
-    'attributes' => array (
-      'class' => 'thickbox',
-      'rel' => 'frontpage',
-      'title' => $title,
+  if ($_GET['q'] != '') {
+    $link = '<a href="' . $img_path . '" class="thickbox" rel="frontpage">' .
+    $img . '</a>';
+  } else {
+    $link = l($img, $img_path, array (
+      'html' => TRUE,
+      'attributes' => array (
+        'class' => 'thickbox',
+        'rel' => 'frontpage',
+        'title' => $title,
 
-      
-    )
-  ));
+        
+      )
+    ));
+  }
   $output .= '<div class="single-image">';
   $output .= $link;
   $output .= '</div>';
@@ -654,7 +667,8 @@
           $ar_img = explode("/", $value->path);
           $name = $ar_img[count($ar_img) - 1];
           $cache->createthumb($value->path, $name, 150, 100, 'jpg');
-          $img = theme('image', $value->path . '.thumb', '', '', array (/*'width'=>150,'height'=>100*/), TRUE);
+          $img = theme('image', $value->path . '.thumb', '', '', array (/*'width'=>150,'height'=>100*/
+          ), TRUE);
         }
         $link = l($img, 'fast_gallery/' . $path, array (
           'html' => TRUE,
