Skip to content
Snippets Groups Projects
Commit b869c9a7 authored by Demian Katz's avatar Demian Katz
Browse files

Moved inLightbox method to base class for wider availability.

parent ee26a0e7
No related merge requests found
......@@ -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);
}
......
......@@ -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
*
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment