From aff249efa6c5c9ef0331d2a571a56840119c295f Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Wed, 10 Oct 2012 10:37:22 -0400
Subject: [PATCH] Renamed tab variable to activeTab for greater clarity.

---
 module/VuFind/src/VuFind/Controller/AbstractRecord.php   | 2 +-
 themes/blueprint/templates/record/view.phtml             | 4 ++--
 themes/jquerymobile/templates/record/header-navbar.phtml | 2 +-
 themes/jquerymobile/templates/record/view.phtml          | 4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/module/VuFind/src/VuFind/Controller/AbstractRecord.php b/module/VuFind/src/VuFind/Controller/AbstractRecord.php
index 5ad9aa364cd..546f140728c 100644
--- a/module/VuFind/src/VuFind/Controller/AbstractRecord.php
+++ b/module/VuFind/src/VuFind/Controller/AbstractRecord.php
@@ -495,7 +495,7 @@ class AbstractRecord extends AbstractBase
 
         $driver = $this->loadRecord();
         $view = $this->createViewModel();
-        $view->tab = strtolower($tab);
+        $view->activeTab = strtolower($tab);
         $view->defaultTab = strtolower($this->defaultTab);
 
         // Set up next/previous record links (if appropriate)
diff --git a/themes/blueprint/templates/record/view.phtml b/themes/blueprint/templates/record/view.phtml
index 4dd2a68b888..cc0d5d8a9ea 100644
--- a/themes/blueprint/templates/record/view.phtml
+++ b/themes/blueprint/templates/record/view.phtml
@@ -86,7 +86,7 @@
     <ul>
       <? foreach ($tabs as $tab => $desc): ?>
       <? // add current tab to breadcrumbs if applicable:
-         $isCurrent = (strtolower($this->tab) == strtolower($tab));
+         $isCurrent = (strtolower($this->activeTab) == strtolower($tab));
          if ($isCurrent) {
              $this->layout()->breadcrumbs .= '<span>&gt;</span><em>' . $this->transEsc($desc) . '</em>';
          }
@@ -102,7 +102,7 @@
 
 
   <div class="recordsubcontent">
-    <?=$this->record($this->driver)->getTab($this->tab)?>
+    <?=$this->record($this->driver)->getTab($this->activeTab)?>
   </div>
 
   <span class="Z3988" title="<?=$this->escapeHtml($this->driver->getOpenURL())?>"></span>
diff --git a/themes/jquerymobile/templates/record/header-navbar.phtml b/themes/jquerymobile/templates/record/header-navbar.phtml
index 1425e6f345b..e72dae19608 100644
--- a/themes/jquerymobile/templates/record/header-navbar.phtml
+++ b/themes/jquerymobile/templates/record/header-navbar.phtml
@@ -8,7 +8,7 @@
     <ul>
       <? foreach ($tabs as $tab => $desc): ?>
         <li>
-          <a rel="external"<?=(strtolower(isset($this->tab) ? $this->tab : '') == strtolower($tab)) ? ' class="ui-btn-active"' : ''?> href="<?=$this->recordLink()->getTabUrl($this->driver, $tab)?>"><?=$this->transEsc($desc)?></a>
+          <a rel="external"<?=(strtolower(isset($this->activeTab) ? $this->activeTab : '') == strtolower($tab)) ? ' class="ui-btn-active"' : ''?> href="<?=$this->recordLink()->getTabUrl($this->driver, $tab)?>"><?=$this->transEsc($desc)?></a>
         </li>
       <? endforeach; ?>
     </ul>
diff --git a/themes/jquerymobile/templates/record/view.phtml b/themes/jquerymobile/templates/record/view.phtml
index a352ca0530b..8eafb0afd7f 100644
--- a/themes/jquerymobile/templates/record/view.phtml
+++ b/themes/jquerymobile/templates/record/view.phtml
@@ -1,13 +1,13 @@
 <?
     // Grab tab contents up front -- this will set the page title, which we need to
     // do before we display the page header below.
-    $tab = $this->record($this->driver)->getTab($this->tab);
+    $tab = $this->record($this->driver)->getTab($this->activeTab);
 ?>
 <div data-role="page" id="Record-view">
   <?=$this->mobileMenu()->header(array('searchLink' => $this->searchOptions($this->searchClassId)->getSearchHomeAction()))?>
   <div class="record" data-role="content" data-record-id="<?=$this->escapeHtml($this->driver->getUniqueId())?>">
     <?=$this->flashmessages()?>
-    <? if ($this->tab == $this->defaultTab): ?>
+    <? if ($this->activeTab == $this->defaultTab): ?>
       <?=$this->record($this->driver)->getCoreMetadata()?>
     <? else: ?>
       <h3><?=$this->escapeHtml($this->driver->getBreadcrumb())?></h3>
-- 
GitLab