另一個方法要改程式,你要不要試試:
修改 /calss/action/admin/adminlogoutaction.class.php:
1. 在程式上的 include 多加一個, include_once( PLOG_CLASS_PATH."class/view/redirectview.class.php" );
2. 把
function perform()
{
$this->_view = new AdminDefaultView();
$this->notifyEvent( EVENT_PRE_LOGOUT );
// remove all the information from the session
$session = HttpVars::getSession();
$session["SessionInfo"] = null;
unset($session["SessionInfo"]);
$session = Array();
HttpVars::setSession( $session );
session_destroy();
// and pass the locale to the template
$config =& Config::getConfig();
$locale =& Locales::getLocale( $config->getValue( "default_locale" ));
$url =& $this->_blogInfo->getBlogRequestGenerator();
$blogTitle = $this->_blogInfo->getBlog();
$logoutMessage = $this->_locale->tr("logout_message")."<br/>".$locale->pr("logout_message_2", $url->blogLink(), $blogTitle);
$this->_view->setSuccessMessage( $logoutMessage );
$this->notifyEvent( EVENT_POST_LOGOUT );
// better to return true if everything fine
return true;
}
換成
function perform()
{
$this->notifyEvent( EVENT_PRE_LOGOUT );
// remove all the information from the session
$session = HttpVars::getSession();
$session["SessionInfo"] = null;
unset($session["SessionInfo"]);
$session = Array();
HttpVars::setSession( $session );
session_destroy();
$this->_view = new RedirectView( ''http://your-logout-page" ); $this->notifyEvent( EVENT_POST_LOGOUT );
// better to return true if everything fine
return true;
}
Mark