[evolvis-commits] r17734: better UI for “only one theme exists on the forge”

mirabilos at evolvis.org mirabilos at evolvis.org
Wed Nov 30 15:02:29 CET 2011


Author: mirabilos
Date: 2011-11-30 15:02:29 +0100 (Wed, 30 Nov 2011)
New Revision: 17734

Modified:
   trunk/gforge_base/evolvisforge-5.1/src/www/include/html.php
Log:
better UI for “only one theme exists on the forge”


Modified: trunk/gforge_base/evolvisforge-5.1/src/www/include/html.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/include/html.php	2011-11-30 13:57:10 UTC (rev 17733)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/include/html.php	2011-11-30 14:02:29 UTC (rev 17734)
@@ -159,10 +159,12 @@
 	$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);
+	} else if ($nbTheme < 1) {
 		return("");
-	}
-	else {
+	} else {
 		return html_build_select_box($res,$title,$selected,false);
 	}
 }



More information about the evolvis-commits mailing list