[xoops-cvslog 3782] CVS update: xoops2jp/html/modules/base/preload

Back to archive index

Minahito minah****@users*****
2006年 7月 31日 (月) 19:34:15 JST


Index: xoops2jp/html/modules/base/preload/ThemeSelect.class.php
diff -u xoops2jp/html/modules/base/preload/ThemeSelect.class.php:1.1.2.4 xoops2jp/html/modules/base/preload/ThemeSelect.class.php:1.1.2.5
--- xoops2jp/html/modules/base/preload/ThemeSelect.class.php:1.1.2.4	Tue Jul 11 19:06:58 2006
+++ xoops2jp/html/modules/base/preload/ThemeSelect.class.php	Mon Jul 31 19:34:14 2006
@@ -1,29 +1,8 @@
 <?php
-// $Id: ThemeSelect.class.php,v 1.1.2.4 2006/07/11 10:06:58 minahito Exp $
-//  ------------------------------------------------------------------------ //
-//                XOOPS - PHP Content Management System                      //
-//                    Copyright (c) 2000 XOOPS.org                           //
-//                       <http://www.xoops.org/>                             //
-//  ------------------------------------------------------------------------ //
-//  This program is free software; you can redistribute it and/or modify     //
-//  it under the terms of the GNU General Public License as published by     //
-//  the Free Software Foundation; either version 2 of the License, or        //
-//  (at your option) any later version.                                      //
-//                                                                           //
-//  You may not change or alter any portion of this comment or credits       //
-//  of supporting developers from this source code or any supporting         //
-//  source code which is considered copyrighted (c) material of the          //
-//  original comment or credit authors.                                      //
-//                                                                           //
-//  This program is distributed in the hope that it will be useful,          //
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
-//  GNU General Public License for more details.                             //
-//                                                                           //
-//  You should have received a copy of the GNU General Public License        //
-//  along with this program; if not, write to the Free Software              //
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
-//  ------------------------------------------------------------------------ //
+/**
+ * @package Legacy
+ * @version $Id: ThemeSelect.class.php,v 1.1.2.5 2006/07/31 10:34:14 minahito Exp $
+ */
 
 if (!defined('XOOPS_ROOT_PATH')) exit();
 
@@ -56,25 +35,16 @@
 			$this->mController->setMainTheme($_SESSION['xoopsUserTheme']);
 		}
 		
-		$delegate = new XCube_Delegate("Base_ThemeSelect","callbackCheckLoginSuccess");
-		$this->mController->mRoot->mEventManager->add("Site.CheckLogin.Success",$delegate);
+		$this->mController->mRoot->mDelegateManager->add("Site.CheckLogin.Success", "Base_ThemeSelect::callbackCheckLoginSuccess");
 	}
 
-	function callbackCheckLoginSuccess(&$controller,&$eventArgs)
+	function callbackCheckLoginSuccess(&$xoopsUser)
 	{
 		//
-		// This check is not needed. :)
-		//
-		if(!is_object($eventArgs['xoopsUser']))
-			return;
-
-		$user=&$eventArgs['xoopsUser'];
-
-		//
 		// Check Theme and set it to session.
 		//
-		$userTheme=$eventArgs['xoopsUser']->getVar('theme');
-		if(is_array($userTheme) && in_array($userTheme,$controller->getConfig('theme_set_allowed'))) {
+		$userTheme = $xoopsUser->get('theme');
+		if (is_array($userTheme) && in_array($userTheme, $this->mController->getConfig('theme_set_allowed'))) {
 			$_SESSION['xoopsUserTheme'] = $userTheme;
 		}
 	}


xoops-cvslog メーリングリストの案内
Back to archive index