[xoops-cvslog 6021] CVS update: xoops2jp/html/modules/legacy/preload

Back to archive index

NobuNobu nobun****@users*****
2006年 12月 8日 (金) 23:14:01 JST


Index: xoops2jp/html/modules/legacy/preload/ThemeSelect.class.php
diff -u xoops2jp/html/modules/legacy/preload/ThemeSelect.class.php:1.1.2.6 xoops2jp/html/modules/legacy/preload/ThemeSelect.class.php:1.1.2.7
--- xoops2jp/html/modules/legacy/preload/ThemeSelect.class.php:1.1.2.6	Fri Nov 17 20:21:51 2006
+++ xoops2jp/html/modules/legacy/preload/ThemeSelect.class.php	Fri Dec  8 23:14:01 2006
@@ -1,7 +1,7 @@
 <?php
 /**
  * @package Legacy
- * @version $Id: ThemeSelect.class.php,v 1.1.2.6 2006/11/17 11:21:51 minahito Exp $
+ * @version $Id: ThemeSelect.class.php,v 1.1.2.7 2006/12/08 14:14:01 nobunobu Exp $
  */
 
 if (!defined('XOOPS_ROOT_PATH')) exit();
@@ -44,10 +44,13 @@
 	 */
 	function doChangeTheme(&$principal, &$controller, &$context)
 	{
-		if (!empty($_POST['xoops_theme_select']) && $this->_isSelectableTheme($_POST['xoops_theme_select'])) {
-			$this->mRoot->mContext->setThemeName($_POST['xoops_theme_select']);
-			$_SESSION['xoopsUserTheme'] = $_POST['xoops_theme_select'];
-			$controller->executeForward($GLOBALS['xoopsRequestUri']);
+		if (!empty($_POST['xoops_theme_select'])) {
+		    $xoops_theme_select = explode('!-!', $_POST['xoops_theme_select']);
+		    if ($this->_isSelectableTheme($xoops_theme_select[0])) {
+    			$this->mRoot->mContext->setThemeName($xoops_theme_select[0]);
+    			$_SESSION['xoopsUserTheme'] = $xoops_theme_select[0];
+    			$controller->executeForward($GLOBALS['xoopsRequestUri']);
+    		}
 		} elseif (!empty($_SESSION['xoopsUserTheme']) && $this->_isSelectableTheme($_SESSION['xoopsUserTheme'])) {
 			$this->mRoot->mContext->setThemeName($_SESSION['xoopsUserTheme']);
 		}


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