[pLog-svn] r3208 - plog/trunk/class/action/admin

oscar at devel.lifetype.net oscar at devel.lifetype.net
Sat Apr 8 12:03:50 GMT 2006


Author: oscar
Date: 2006-04-08 12:03:49 +0000 (Sat, 08 Apr 2006)
New Revision: 3208

Modified:
   plog/trunk/class/action/admin/adminaction.class.php
Log:
honor logout_destination_url in all situations, even when the session has expired.


Modified: plog/trunk/class/action/admin/adminaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminaction.class.php	2006-04-08 11:57:03 UTC (rev 3207)
+++ plog/trunk/class/action/admin/adminaction.class.php	2006-04-08 12:03:49 UTC (rev 3208)
@@ -182,9 +182,19 @@
          */
         function mustAuthenticatePage()
         {
-			$view = new AdminDefaultView();
-			$locale = $this->getLocale();
-			$view->setErrorMessage( $locale->tr("error_access_forbidden" ));
+			$locale = $this->getLocale();		
+			$config =& Config::getConfig();			
+			$destinationUrl = $config->getValue( "logout_destination_url", "" );
+            if( $destinationUrl == "" ) {
+				$view = new AdminDefaultView();
+			}
+			else {
+				// nothing else to do, just redirect the browser once we've cleaned up the session
+				include_once( PLOG_CLASS_PATH."class/view/redirectview.class.php" );				
+				$view = new RedirectView( $destinationUrl );							
+			}
+			$view->setErrorMessage( $locale->tr("error_access_forbidden" ));			
+			
 			return $view->render();
         }
 		



More information about the pLog-svn mailing list