--- a/busui/owa/modules/base/overlayLauncher.php +++ b/busui/owa/modules/base/overlayLauncher.php @@ -1,1 +1,60 @@ - + + * @copyright Copyright © 2006 Peter Adams + * @license http://www.gnu.org/copyleft/gpl.html GPL v2.0 + * @category owa + * @package owa + * @version $Revision$ + * @since owa 1.0.0 + */ + +class owa_overlayLauncherController extends owa_controller { + + function action() { + + // setup overlay cookiestate + //owa_coreAPI::setState('overlay', '', urldecode($this->getParam('overlay_params')), 'cookie'); + + + + // load entity for document id to get URL + $d = owa_coreAPI::entityFactory('base.document'); + $d->load($this->getParam('document_id')); + + $url = trim( $d->get( 'url' ) ); + + if ( strpos( $url, '#' ) ) { + $parts = explode( '#', $url ); + $url = $parts[0]; + } + + $url = $url.'#owa_overlay.' . trim( base64_encode( urlencode($this->getParam( 'overlay_params' ) ) ), '\u0000' ); + + // redirect browser + $this->redirectBrowserToUrl($url); + } +} + +?>