[Fusionforge-commits] r10643 - in trunk/src: common/include www/account

Franck VILLAUME nerville at libremir.placard.fr.eu.org
Thu Sep 23 09:26:25 CEST 2010


Author: nerville
Date: 2010-09-23 09:26:24 +0200 (Thu, 23 Sep 2010)
New Revision: 10643

Modified:
   trunk/src/common/include/User.class.php
   trunk/src/common/include/pre.php
   trunk/src/www/account/index.php
Log:
enable theme selection

Modified: trunk/src/common/include/User.class.php
===================================================================
--- trunk/src/common/include/User.class.php	2010-09-22 21:07:17 UTC (rev 10642)
+++ trunk/src/common/include/User.class.php	2010-09-23 07:26:24 UTC (rev 10643)
@@ -1504,9 +1504,10 @@
 		} else {
 			$this->theme=$this->data_array['dirname'];
 		}
-		if (is_file(forge_get_config('themes_root').$this->theme.'/Theme.class.php')) {
+		if (is_file(forge_get_config('themes_root').'/'.$this->theme.'/Theme.class.php')) {
 			$GLOBALS['sys_theme']=$this->theme;
 		} else {
+			echo "icicici";
 			$this->theme=forge_get_config('default_theme');
 		}
 		return $this->theme;

Modified: trunk/src/common/include/pre.php
===================================================================
--- trunk/src/common/include/pre.php	2010-09-22 21:07:17 UTC (rev 10642)
+++ trunk/src/common/include/pre.php	2010-09-23 07:26:24 UTC (rev 10643)
@@ -235,14 +235,16 @@
 
 	// If logged in, set up a $LUSER var referencing
 	// the logged in user's object
+	// and setup theme
 	if (session_loggedin()) {
 		$LUSER =& session_get_user();
 		$LUSER->setUpTheme();
 		putenv ('TZ='. $LUSER->getTimeZone());
 		header ('Cache-Control: private');
+		require_once forge_get_config('themes_root').'/'.$LUSER->setUpTheme().'/Theme.class.php';
+	} else {
+		require_once forge_get_config('themes_root').'/'.forge_get_config('default_theme').'/Theme.class.php';
 	}
-
-	require_once forge_get_config('themes_root').'/'.forge_get_config('default_theme').'/Theme.class.php';
 	$HTML = new Theme () ;
 } else {		     // Script run from cron or a command line
 	require_once $gfcommon.'include/squal_exit.php';

Modified: trunk/src/www/account/index.php
===================================================================
--- trunk/src/www/account/index.php	2010-09-22 21:07:17 UTC (rev 10642)
+++ trunk/src/www/account/index.php	2010-09-23 07:26:24 UTC (rev 10643)
@@ -34,14 +34,14 @@
 // get global users vars
 $u =& user_get_object(user_getid());
 if (!$u || !is_object($u)) {
-    exit_error('Error','Could Not Get User');
+    exit_error(_('Could Not Get User'));
 } elseif ($u->isError()) {
-    exit_error('Error',$u->getErrorMessage());
+    exit_error($u->getErrorMessage(),'my');
 }
 
 if (getStringFromRequest('submit')) {
 	if (!form_key_is_valid(getStringFromRequest('form_key'))) {
-		exit_form_double_submit();
+		exit_form_double_submit('my');
 	}
 
 




More information about the Fusionforge-commits mailing list