From b869c9a720249e8cd0a2db15ad09df6595692018 Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Wed, 18 Jul 2012 11:43:07 -0400
Subject: [PATCH] Moved inLightbox method to base class for wider availability.

---
 .../src/VuFind/Controller/AbstractBase.php     | 18 +++++++++++++++---
 .../VuFind/Controller/MyResearchController.php | 12 ------------
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/module/VuFind/src/VuFind/Controller/AbstractBase.php b/module/VuFind/src/VuFind/Controller/AbstractBase.php
index 60ea24da948..9da37ba197c 100644
--- a/module/VuFind/src/VuFind/Controller/AbstractBase.php
+++ b/module/VuFind/src/VuFind/Controller/AbstractBase.php
@@ -97,6 +97,18 @@ class AbstractBase extends AbstractActionController
         return $this->getAuthManager()->isLoggedIn();
     }
 
+    /**
+     * Are we running in a lightbox?
+     *
+     * @return bool
+     */
+    public function inLightbox()
+    {
+        // TODO
+        // return $this->_helper->layout->getLayout() != 'lightbox'
+        return false;
+    }
+
     /**
      * Redirect the user to the login screen.
      *
@@ -113,13 +125,13 @@ class AbstractBase extends AbstractActionController
             $msg = 'You must be logged in first';
         }
 
-        /* TODO:
         // Store the current URL as a login followup action unless we are in a
         // lightbox (since lightboxes use a different followup mechanism).
-        if ($this->_helper->layout->getLayout() != 'lightbox') {
+        if (!$this->inLightbox()) {
+            /* TODO:
             $this->_helper->followup->store($extras);
+            */
         }
-         */
         if (!empty($msg)) {
             $this->flashMessenger()->setNamespace('error')->addMessage($msg);
         }
diff --git a/module/VuFind/src/VuFind/Controller/MyResearchController.php b/module/VuFind/src/VuFind/Controller/MyResearchController.php
index 883c8898a45..1a625e7eaaf 100644
--- a/module/VuFind/src/VuFind/Controller/MyResearchController.php
+++ b/module/VuFind/src/VuFind/Controller/MyResearchController.php
@@ -136,18 +136,6 @@ class MyResearchController extends AbstractBase
         return $view;
     }
 
-    /**
-     * Are we running in a lightbox?
-     *
-     * @return bool
-     */
-    public function inLightbox()
-    {
-        // TODO
-        // return $this->_helper->layout->getLayout() != 'lightbox'
-        return false;
-    }
-
     /**
      * Login Action
      *
-- 
GitLab