[Fusionforge-commits] r15448 - branches/Branch_5_1/src/www/include

Thorsten Glaser mirabilos at fusionforge.org
Wed May 2 09:53:51 CEST 2012


Author: mirabilos
Date: 2012-05-02 09:53:51 +0200 (Wed, 02 May 2012)
New Revision: 15448

Modified:
   branches/Branch_5_1/src/www/include/html.php
Log:
[#401] fix error when there is only one theme

from Evolvis


Modified: branches/Branch_5_1/src/www/include/html.php
===================================================================
--- branches/Branch_5_1/src/www/include/html.php	2012-05-02 07:52:00 UTC (rev 15447)
+++ branches/Branch_5_1/src/www/include/html.php	2012-05-02 07:53:51 UTC (rev 15448)
@@ -158,10 +158,16 @@
 	$res=db_query_params ('SELECT theme_id, fullname FROM themes WHERE enabled=true',
 			array());
 	$nbTheme = db_numrows($res);
-	if($nbTheme < 2) {
+	if ($nbTheme == 1) {
+		$thetheme = db_result($res, 0, 'fullname');
+		return util_html_secure($thetheme) . html_e('input', array(
+			'type' => 'hidden',
+			'name' => $title,
+			'value' => db_result($res, 0, 'theme_id'),
+		    ));
+	} else if ($nbTheme < 1) {
 		return("");
-	}
-	else {
+	} else {
 		return html_build_select_box($res,$title,$selected,false);
 	}
 }




More information about the Fusionforge-commits mailing list