fix Horde::fullSrcImg to work correctly with Horde_Themes
authorMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 8 May 2010 20:24:36 +0000 (16:24 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 8 May 2010 20:24:36 +0000 (16:24 -0400)
ansel/templates/view/image.inc
framework/Core/lib/Horde.php

index fa33c55..6b040f4 100644 (file)
@@ -83,7 +83,7 @@ function arrowHandler(e)
         }
 ?>
     <div class="slideControls">
-     <?php echo Horde::fullSrcImg('loading.gif', array('dir' => Horde_Themes::img(null, 'horde'), 'attr' => 'class="imgloading"'));?>
+     <?php echo Horde::fullSrcImg(Horde_Themes::img('loading.gif', array('app' => 'horde')), array('attr' => 'class="imgloading"'));?>
      <?php
      if (empty($this->_params['hide_slideshow'])) {
          echo '<a style="display:none;" href="' . $this->_urls['slideshow'] . '" class="ssPlay" title="' . _("Start Slideshow") . '">' .
@@ -110,7 +110,7 @@ function arrowHandler(e)
      </div>
     </div>
     <div class="slideControls">
-     <?php echo Horde::fullSrcImg('loading.gif', array('dir' => Horde_Themes::img(null, 'horde'), 'attr' => 'class="imgloading"'));?>
+     <?php echo Horde::fullSrcImg(Horde_Themes::img('loading.gif', array('app' => 'horde')), array('attr' => 'class="imgloading"'));?>
      <?php
      if (empty($this->_params['hide_slideshow'])) {
          echo '<a style="display:none;" href="' . $this->_urls['slideshow'] . '" class="ssPlay" title="' . _("Start Slideshow") . '">' .
index c0acb7c..fa2f36a 100644 (file)
@@ -1368,12 +1368,12 @@ HTML;
         }
 
         /* If no directory has been specified, get it from the registry. */
-        $dir = empty($options['dir'])
-            ? Horde_Themes::img()
-            : $options['dir'];
+        if (!($src instanceof Horde_Themes_Image) && ($src[0] != '/')) {
+            $src = Horde_Themes::img($src, $options);
+        }
 
         /* If we can send as data, no need to get the full path */
-        $src = self::base64ImgData($dir . '/' . $src);
+        $src = self::base64ImgData($src);
         if (substr($src, 0, 10) != 'data:image') {
             $src = self::url($src, true, -1);
         }