[evolvis-commits] r18409: upstream pending merges:↵ Thorsten Glaser 2012-05-14 prevent tempfile leak on each install/upgrade↵ Thorsten Glaser 2012-05-14 unlimit things when running as CLI script or cronjob (outside the web):↵ Thorsten Glaser 2012-05-14 use semicolones, not hash signs, for comments in .ini files↵ mirabilos 2012-05-11 add a small RBAC demo listing the unixnames of all forge admins↵ mirabilos 2012-05-11 no, you do not put a number into an array to output that as string…↵ mirabilos 2012-05-11 fix broken commit in r15354 by jheyman:

mirabilos at evolvis.org mirabilos at evolvis.org
Wed May 16 12:26:33 CEST 2012


Author: mirabilos
Date: 2012-05-16 12:26:32 +0200 (Wed, 16 May 2012)
New Revision: 18409

Added:
   trunk/gforge_base/evolvisforge-5.1/src/utils/list-admins.php
Modified:
   trunk/gforge_base/evolvisforge-5.1/src/common/include/Group.class.php
   trunk/gforge_base/evolvisforge-5.1/src/common/include/env.inc.php
   trunk/gforge_base/evolvisforge-5.1/src/common/widget/Widget_MySurveys.class.php
   trunk/gforge_base/evolvisforge-5.1/src/deb-specific/install-db.sh
   trunk/gforge_base/evolvisforge-5.1/src/packaging/install/common
   trunk/gforge_base/evolvisforge-5.1/src/utils/migrate-to-ini-files.sh
Log:
upstream pending merges:
  Thorsten Glaser 2012-05-14 prevent tempfile leak on each install/upgrade
    Thorsten Glaser 2012-05-14 unlimit things when running as CLI script or cronjob (outside the web):
    Thorsten Glaser 2012-05-14 use semicolones, not hash signs, for comments in .ini files
    mirabilos 2012-05-11 add a small RBAC demo listing the unixnames of all forge admins
    mirabilos 2012-05-11 no, you do not put a number into an array to output that as string…
    mirabilos 2012-05-11 fix broken commit in r15354 by jheyman:

Modified: trunk/gforge_base/evolvisforge-5.1/src/common/widget/Widget_MySurveys.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/common/widget/Widget_MySurveys.class.php	2012-05-14 09:36:29 UTC (rev 18408)
+++ trunk/gforge_base/evolvisforge-5.1/src/common/widget/Widget_MySurveys.class.php	2012-05-16 10:26:32 UTC (rev 18409)
@@ -109,7 +109,7 @@
 					}
 				}
 
-				$html_hdr .= '['.count($surveys).($count_new ? ", <b>".sprintf(_('%s new'), $count_new)."</b>]" : ']').'</td></tr>';
+				$html_hdr .= '['.count($surveys).($count_new ? ", <b>".sprintf(_('%d new'), $count_new)."</b>]" : ']').'</td></tr>';
 				$html_my_surveys .= $html_hdr.$html;
 			}
 			$html_my_surveys .= '</table>';
@@ -127,5 +127,3 @@
 		return _("List the surveys you have not answered.");
 	}
 }
-
-?>

Modified: trunk/gforge_base/evolvisforge-5.1/src/deb-specific/install-db.sh
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/deb-specific/install-db.sh	2012-05-14 09:36:29 UTC (rev 18408)
+++ trunk/gforge_base/evolvisforge-5.1/src/deb-specific/install-db.sh	2012-05-16 10:26:32 UTC (rev 18409)
@@ -204,9 +204,9 @@
 	fi
 	
         # Create the appropriate database
-	tmp1=$(mktemp /tmp/$pattern)
-	tmp2=$(mktemp /tmp/$pattern)
 	if ! exist_db $db_name ; then
+		tmp1=$(mktemp /tmp/$pattern)
+		tmp2=$(mktemp /tmp/$pattern)
 		if su -s /bin/sh postgres -c "/usr/bin/psql template1" 1> $tmp1 2> $tmp2 <<EOF \
 	    	    && [ "$(tail -n +2 $tmp1 | head -1)" = 'CREATE DATABASE' ] ; 
 SET LC_MESSAGES = 'C' ;

Modified: trunk/gforge_base/evolvisforge-5.1/src/packaging/install/common
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/packaging/install/common	2012-05-14 09:36:29 UTC (rev 18408)
+++ trunk/gforge_base/evolvisforge-5.1/src/packaging/install/common	2012-05-16 10:26:32 UTC (rev 18409)
@@ -34,3 +34,4 @@
 utils/user-del.php                     usr/share/@OLDPACKAGE@/bin/
 utils/scm-newsubrepo.php               usr/share/@OLDPACKAGE@/bin/
 utils/unlocale.sh                      usr/share/@OLDPACKAGE@/bin/
+utils/list-admins.php                  usr/share/@OLDPACKAGE@/bin/

Added: trunk/gforge_base/evolvisforge-5.1/src/utils/list-admins.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/utils/list-admins.php	                        (rev 0)
+++ trunk/gforge_base/evolvisforge-5.1/src/utils/list-admins.php	2012-05-16 10:26:32 UTC (rev 18409)
@@ -0,0 +1,7 @@
+#!/usr/bin/php -f
+<?php
+require "/usr/share/gforge/common/include/env.inc.php";
+require_once $gfcommon."include/pre.php";
+$admins = RBACEngine::getInstance()->getUsersByAllowedAction("forge_admin", -1);
+$anames = array_map(create_function("\$x", "return \$x->getUnixName();"), $admins);
+sort($anames); echo join(" ", $anames) . "\n";


Property changes on: trunk/gforge_base/evolvisforge-5.1/src/utils/list-admins.php
___________________________________________________________________
Added: svn:executable
   + *

Modified: trunk/gforge_base/evolvisforge-5.1/src/utils/migrate-to-ini-files.sh
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/utils/migrate-to-ini-files.sh	2012-05-14 09:36:29 UTC (rev 18408)
+++ trunk/gforge_base/evolvisforge-5.1/src/utils/migrate-to-ini-files.sh	2012-05-16 10:26:32 UTC (rev 18409)
@@ -38,8 +38,8 @@
 lastsection=''
 tmp=$(mktemp)
 cat > $tmp <<EOF
-# This is a generated file with values migrated from your previous configuration
-# You may want to move the values in here to the main configuration files
+; This is a generated file with values migrated from your previous configuration
+; You may want to move the values in here to the main configuration files
 EOF
 
 add_config core account_manager_type >> $tmp
@@ -154,8 +154,8 @@
 lastsection=''
 tmp=$(mktemp)
 cat > $tmp <<EOF
-# This is a generated file with values migrated from your previous configuration
-# You may want to move the values in here to the main configuration files
+; This is a generated file with values migrated from your previous configuration
+; You may want to move the values in here to the main configuration files
 EOF
 
 add_config core database_host >> $tmp



More information about the evolvis-commits mailing list