Pass $gallery to Ansel::getBreadCrumbs() whenever possible since otherwise we may...
authorChuck Hagenbuch <chuck@horde.org>
Sun, 22 Aug 2010 02:47:54 +0000 (22:47 -0400)
committerChuck Hagenbuch <chuck@horde.org>
Sun, 22 Aug 2010 02:47:54 +0000 (22:47 -0400)
ansel/img/upload.php
ansel/lib/Ansel.php
ansel/templates/view/gallery.inc
ansel/templates/view/gallerylightbox.inc
ansel/templates/view/image.inc

index d490f69..4a87ca2 100644 (file)
@@ -241,7 +241,7 @@ if ($gallery->countImages() && $browser->hasFeature('javascript')) {
     $haveImages = true;
 }
 
-$breadcrumbs = Ansel::getBreadCrumbs(' &raquo; ', $gallery);
+$breadcrumbs = Ansel::getBreadCrumbs($gallery);
 $title = _("Add Photo");
 require ANSEL_TEMPLATES . '/common-header.inc';
 require ANSEL_TEMPLATES . '/menu.inc';
index 1459156..1be99cb 100644 (file)
@@ -600,7 +600,7 @@ class Ansel
      *
      * @return string
      */
-    static public function getBreadCrumbs($separator = ' &raquo; ', $gallery = null)
+    static public function getBreadCrumbs($gallery = null, $separator = ' &raquo; ')
     {
         global $prefs;
 
index 353183a..4eca846 100644 (file)
@@ -105,7 +105,7 @@ function downloadSelected()
   <?php echo $this->numTiles > $this->perpage ? sprintf(_("%d to %d of %d items"), $this->pagestart, $this->pageend, $this->numTiles) : sprintf(ngettext("%d item", "%d items", $this->numTiles), $this->numTiles) ?>
   </span>
   <?php endif; ?>
-  <?php echo Ansel::getBreadCrumbs(); ?>
+  <?php echo Ansel::getBreadCrumbs($this->view->gallery) ?>
 </div>
 <?php if ($this->view->gallery->get('desc')): ?>
     <div id="galleryDescription" class="gallery-desc">
index b3f05b2..5db59cd 100644 (file)
@@ -122,7 +122,7 @@ function downloadSelected()
     <?php endif; ?>
 </script>
 <div class="header" id="galleryHeader">
- <?php echo ($this->numTiles ? '<span class="rightFloat">' . ($this->numTiles > $this->perpage ? sprintf(_("%d to %d of %d Items"), $this->pagestart, $this->pageend, $this->numTiles) : sprintf(ngettext("%d Item", "%d Items", $this->numTiles), $this->numTiles)) . '</span>' : '') . Ansel::getBreadCrumbs(); ?>
+ <?php echo ($this->numTiles ? '<span class="rightFloat">' . ($this->numTiles > $this->perpage ? sprintf(_("%d to %d of %d Items"), $this->pagestart, $this->pageend, $this->numTiles) : sprintf(ngettext("%d Item", "%d Items", $this->numTiles), $this->numTiles)) . '</span>' : '') . Ansel::getBreadCrumbs($this->view->gallery) ?>
 </div>
 <?php if ($this->view->gallery->get('desc')): ?>
 <div class="gallery-desc" id="galleryDescription">
index 382708b..e137027 100644 (file)
@@ -47,7 +47,7 @@ function arrowHandler(e)
     }
 }
 </script>
-<h1 class="header" id="PhotoName"><?php echo Ansel::getBreadCrumbs(); ?></h1>
+<h1 class="header" id="PhotoName"><?php echo Ansel::getBreadCrumbs($this->gallery) ?></h1>
 <table style="width: 100%; border-collapse: collapse">
  <tr>
   <td valign="top" style="background-color:<?php echo $this->_style['background']; ?>;">