[Fusionforge-commits] r10476 - trunk/src/www/account

Franck VILLAUME nerville at libremir.placard.fr.eu.org
Wed Sep 15 09:48:06 CEST 2010


Author: nerville
Date: 2010-09-15 09:48:05 +0200 (Wed, 15 Sep 2010)
New Revision: 10476

Modified:
   trunk/src/www/account/register.php
Log:
fix feedback message

Modified: trunk/src/www/account/register.php
===================================================================
--- trunk/src/www/account/register.php	2010-09-14 15:37:20 UTC (rev 10475)
+++ trunk/src/www/account/register.php	2010-09-15 07:48:05 UTC (rev 10476)
@@ -3,21 +3,22 @@
  * Register new account page
  *
  * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2010 (c) FusionForge Team
  *
- * This file is part of GForge.
+ * This file is part of FusionForge.
  *
- * GForge is free software; you can redistribute it and/or modify
+ * FusionForge 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.
  *
- * GForge is distributed in the hope that it will be useful,
+ * FusionForge 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 GForge; if not, write to the Free Software
+ * along with FusionForge; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
@@ -71,7 +72,7 @@
 	}
 	
 	if ($GLOBALS['sys_require_accept_conditions'] && ! $accept_conditions) {
-		$feedback = _("You can't register an account unless you accept the terms of use.") ;
+		$warning = _("You can't register an account unless you accept the terms of use.") ;
 	} else {
 		$new_user = new GFUser();
 		$register = $new_user->create($unix_name,$firstname,$lastname,$password1,$password2,
@@ -84,23 +85,19 @@
 			echo $HTML->footer(array());
 			exit;
 		} else {
-			$feedback = $new_user->getErrorMessage();
+			$error = $new_user->getErrorMessage();
 		}
 	}
 }
 
 $HTML->header(array('title'=>'User Account Registration'));
 
-if (isset($feedback)) {
+if (!empty($error))
+	print "<div class='error'>$error</div>";
 
-	print "<div class=\"error\">$feedback";
+if (!empty($warning))
+	print "<div class='warning'>$warning</div>";
 
-	if (isset($register_error)) {
-		print " $register_error";
-	}
-
-	print "</div>";
-} 
 if (!isset($timezone) || empty($timezone) || !preg_match('/^[-a-zA-Z0-9_\/\.+]+$/', $timezone)) {
 	$timezone = forge_get_config('default_timezone') ? forge_get_config('default_timezone') : 'GMT' ;
 }




More information about the Fusionforge-commits mailing list