From 34184ce9384e8ae1877e10fe21588faa210ca0ec Mon Sep 17 00:00:00 2001
From: Chris Hallberg <crhallberg@gmail.com>
Date: Tue, 21 Jun 2016 10:13:39 -0400
Subject: [PATCH] Simplification of GA lightbox. Removed dev code.

---
 module/VuFind/src/VuFind/Controller/AbstractBase.php          | 1 -
 module/VuFind/src/VuFind/View/Helper/Root/GoogleAnalytics.php | 1 -
 themes/bootstrap3/templates/layout/lightbox.phtml             | 2 +-
 3 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/module/VuFind/src/VuFind/Controller/AbstractBase.php b/module/VuFind/src/VuFind/Controller/AbstractBase.php
index 923badbdcec..58b2428cde0 100644
--- a/module/VuFind/src/VuFind/Controller/AbstractBase.php
+++ b/module/VuFind/src/VuFind/Controller/AbstractBase.php
@@ -118,7 +118,6 @@ class AbstractBase extends AbstractActionController
             'layout', $this->params()->fromQuery('layout', false)
         )) {
             $this->layout()->setTemplate('layout/lightbox');
-            $this->layout()->lburl = $_SERVER["REQUEST_URI"];
         }
         return new ViewModel($params);
     }
diff --git a/module/VuFind/src/VuFind/View/Helper/Root/GoogleAnalytics.php b/module/VuFind/src/VuFind/View/Helper/Root/GoogleAnalytics.php
index f994dbefb0a..9373b3b2f52 100644
--- a/module/VuFind/src/VuFind/View/Helper/Root/GoogleAnalytics.php
+++ b/module/VuFind/src/VuFind/View/Helper/Root/GoogleAnalytics.php
@@ -73,7 +73,6 @@ class GoogleAnalytics extends \Zend\View\Helper\AbstractHelper
      */
     public function __invoke($customUrl = false)
     {
-        error_log($customUrl);
         if (!$this->key) {
             return '';
         }
diff --git a/themes/bootstrap3/templates/layout/lightbox.phtml b/themes/bootstrap3/templates/layout/lightbox.phtml
index 635d7cca9ea..3317ac41c96 100644
--- a/themes/bootstrap3/templates/layout/lightbox.phtml
+++ b/themes/bootstrap3/templates/layout/lightbox.phtml
@@ -1,2 +1,2 @@
 <?=$this->layout()->content?>
-<?=$this->googleanalytics($this->layout()->lburl)?>
+<?=$this->googleanalytics($this->serverUrl(true))?>
-- 
GitLab