[evolvis-commits] r17712: bm:taramir51/upstream pending merges:↵ Roland Mas 2011-11-04 Protect against template project not having an admin role↵ Roland Mas 2011-11-04 Backported bugfix from trunk↵ jheyman 2011-11-04 Change description for clone tracker↵ mirabilos 2011-11-03 as in r14737 we didn’t implement user_is_super_user(); add this as compat↵ mirabilos 2011-10-31 fix debpkg versioning; I think require_once always operates on global scope?↵ Roland Mas 2011-10-25 5.1.1-2 uploaded to Debian↵ Roland Mas 2011-10-24 Remove some escaping in project labels — we actually want the admin to pro...↵ Roland Mas 2011-10-24 Fixed projectlabels plugin: the project summary page didn't call the hook ...↵ mirabilos 2011-10-21 lintian says to use “dummy” in the description↵ mirabilos 2011-10-21 drop the extra GPLv2 copy from funky theme, too (lintian)

mirabilos at evolvis.org mirabilos at evolvis.org
Mon Nov 7 16:30:52 CET 2011


Author: mirabilos
Date: 2011-11-07 16:30:52 +0100 (Mon, 07 Nov 2011)
New Revision: 17712

Modified:
   trunk/gforge_base/evolvisforge-5.1/src/common/include/FusionForge.class.php
   trunk/gforge_base/evolvisforge-5.1/src/common/include/Group.class.php
   trunk/gforge_base/evolvisforge-5.1/src/common/include/RBAC.php
   trunk/gforge_base/evolvisforge-5.1/src/common/include/utils.php
   trunk/gforge_base/evolvisforge-5.1/src/debian/README.source
   trunk/gforge_base/evolvisforge-5.1/src/debian/changelog
   trunk/gforge_base/evolvisforge-5.1/src/debian/rules
   trunk/gforge_base/evolvisforge-5.1/src/packaging/control/040web-apache
   trunk/gforge_base/evolvisforge-5.1/src/packaging/control/040web-apache.shortdesc
   trunk/gforge_base/evolvisforge-5.1/src/plugins/projectlabels/common/ProjectLabelsPlugin.class.php
   trunk/gforge_base/evolvisforge-5.1/src/plugins/projectlabels/www/index.php
   trunk/gforge_base/evolvisforge-5.1/src/www/include/project_home.php
   trunk/gforge_base/evolvisforge-5.1/src/www/tracker/admin/tracker.php
Log:
bm:taramir51/upstream pending merges:
  Roland Mas 2011-11-04 Protect against template project not having an admin role
    Roland Mas 2011-11-04 Backported bugfix from trunk
    jheyman 2011-11-04 Change description for clone tracker
    mirabilos 2011-11-03 as in r14737 we didn’t implement user_is_super_user(); add this as compat
    mirabilos 2011-10-31 fix debpkg versioning; I think require_once always operates on global scope?
    Roland Mas 2011-10-25 5.1.1-2 uploaded to Debian
    Roland Mas 2011-10-24 Remove some escaping in project labels — we actually want the admin to pro...
    Roland Mas 2011-10-24 Fixed projectlabels plugin: the project summary page didn't call the hook ...
    mirabilos 2011-10-21 lintian says to use “dummy” in the description
    mirabilos 2011-10-21 drop the extra GPLv2 copy from funky theme, too (lintian)


Modified: trunk/gforge_base/evolvisforge-5.1/src/common/include/Group.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/common/include/Group.class.php	2011-11-07 15:30:47 UTC (rev 17711)
+++ trunk/gforge_base/evolvisforge-5.1/src/common/include/Group.class.php	2011-11-07 15:30:52 UTC (rev 17712)
@@ -2474,7 +2474,7 @@
 
 		$template = $this->getTemplateProject() ;
 		$id_mappings = array ();
-		$seen_local_roles = false ;
+		$seen_admin_role = false ;
 		if ($template) {
 			// Copy roles from template project
 			foreach ($template->getRoles() as $oldrole) {
@@ -2484,7 +2484,9 @@
 					// Need to use a different role name so that the permissions aren't set from the hardcoded defaults
 					$role->create ('TEMPORARY ROLE NAME', $data, true) ;
 					$role->setName ($oldrole->getName()) ;
-					$seen_local_roles = true ;
+					if ($oldrole->getSetting ('project_admin', $template->getID())) {
+						$seen_admin_role = true ;
+					}
 				} else {
 					$role = $oldrole ;
 					$role->linkProject ($this) ;
@@ -2495,7 +2497,7 @@
 			}
 		}
 
-		if (!$seen_local_roles) {
+		if (!$seen_admin_role) {
 			$role = new Role($this);
 			$adminperms = array ('project_admin' => array ($this->getID() => 1)) ;
 			$role_id = $role->create ('Admin', $adminperms, true) ;
@@ -2504,6 +2506,9 @@
 		if (USE_PFO_RBAC) {
 			$roles = $this->getRoles() ;
 			foreach ($roles as $r) {
+				if ($r->getHomeProject() == NULL) {
+					continue;
+				}
 				if ($r->getSetting ('project_admin', $this->getID())) {
 					$r->addUser (user_get_object ($idadmin_group)) ;
 				}

Modified: trunk/gforge_base/evolvisforge-5.1/src/common/include/RBAC.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/common/include/RBAC.php	2011-11-07 15:30:47 UTC (rev 17711)
+++ trunk/gforge_base/evolvisforge-5.1/src/common/include/RBAC.php	2011-11-07 15:30:52 UTC (rev 17712)
@@ -503,6 +503,11 @@
 	}
 
 	function setSetting ($section, $reference, $value) {
+		$cur = $this->getSettingRaw($section, $reference);
+		if (($value == $cur) && ($cur != NULL)) {
+			return true;
+		}
+
 		$role_id = $this->getID () ;
 
 		$res = db_query_params ('DELETE FROM pfo_role_setting WHERE role_id=$1 AND section_name=$2 AND ref_id=$3',
@@ -595,6 +600,14 @@
 	}
 
         function getSetting($section, $reference) {
+	    $r = $this->getSettingRaw($section, $reference);
+	    if ($r == NULL) {
+		    return 0;
+	    }
+	    return $r;
+    }
+
+    function getSettingRaw($section, $reference) {
                 if (isset ($this->perms_array[$section][$reference])) {
 			$value = $this->perms_array[$section][$reference] ;
 		} else {
@@ -706,7 +719,7 @@
 			$hook_params['section'] = $section ;
 			$hook_params['reference'] = $reference ;
 			$hook_params['value'] = $value ;
-			$hook_params['result'] = 0 ;
+			$hook_params['result'] = NULL ;
 			plugin_hook_by_reference ("role_get_setting", $hook_params);
 			return $hook_params['result'] ;
 			break ;

Modified: trunk/gforge_base/evolvisforge-5.1/src/debian/README.source
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/debian/README.source	2011-11-07 15:30:47 UTC (rev 17711)
+++ trunk/gforge_base/evolvisforge-5.1/src/debian/README.source	2011-11-07 15:30:52 UTC (rev 17712)
@@ -15,6 +15,7 @@
 outside debian/ too, as direct patches to upstream sources.
 
 More precisely :
+ - fusionforge-5.1.1-2 is in sync with upstream SVN contents as of rev. 14705;
  - fusionforge-5.1.1-1 is in sync with upstream SVN contents as of rev. 14498;
  - fusionforge-5.1-7 is in sync with upstream SVN contents as of rev. 14445;
  - fusionforge-5.1-6 is in sync with upstream SVN contents as of rev. 14319;
@@ -33,4 +34,4 @@
 upstream main version and Debian's packaging :
 http://patch-tracker.debian.org/package/fusionforge
 
- -- Roland Mas <lolando at debian.org>, Thu, 29 Sep 2011 14:07:27 +0200
+ -- Roland Mas <lolando at debian.org>, Tue, 25 Oct 2011 10:42:39 +0200

Modified: trunk/gforge_base/evolvisforge-5.1/src/debian/changelog
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/debian/changelog	2011-11-07 15:30:47 UTC (rev 17711)
+++ trunk/gforge_base/evolvisforge-5.1/src/debian/changelog	2011-11-07 15:30:52 UTC (rev 17712)
@@ -36,11 +36,12 @@
 
  -- Thorsten Glaser <t.glaser at tarent.de>  Fri, 04 Nov 2011 12:59:19 +0100
 
-fusionforge (5.1.1-1+) UNRELEASED; urgency=low
+fusionforge (5.1.1-2) unstable; urgency=low
 
+  * New upstream SVN snapshot.
   * Added logrotate config file for web-apache2.
 
- -- Roland Mas <lolando at debian.org>  Tue, 04 Oct 2011 11:37:30 +0200
+ -- Roland Mas <lolando at debian.org>  Tue, 25 Oct 2011 10:42:19 +0200
 
 fusionforge (5.1.1-1) unstable; urgency=low
 

Modified: trunk/gforge_base/evolvisforge-5.1/src/debian/rules
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/debian/rules	2011-11-07 15:30:47 UTC (rev 17711)
+++ trunk/gforge_base/evolvisforge-5.1/src/debian/rules	2011-11-07 15:30:52 UTC (rev 17712)
@@ -207,7 +207,8 @@
 # Remove Windows files
 	rm -rf $(CURDIR)/debian/$(OLDPACKAGE)-web-apache2/usr/share/*/www/scm/viewvc/windows
 
-	rm -f $(CURDIR)/debian/$(OLDPACKAGE)-web-apache2/usr/share/*/www/themes/$(OLDPACKAGE)/COPYING
+# Remove extra copies of the GNU GPLv2
+	rm -f $(CURDIR)/debian/$(OLDPACKAGE)-web-apache2/usr/share/*/www/themes/*/COPYING
 
 # Remove Snoopy class from binary packages (provided by libphp-snoopy)
 	find $(addprefix $(CURDIR)/debian/,$(shell dh_listpackages)) -name Snoopy.class.php | xargs -r rm

Modified: trunk/gforge_base/evolvisforge-5.1/src/packaging/control/040web-apache
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/packaging/control/040web-apache	2011-11-07 15:30:47 UTC (rev 17711)
+++ trunk/gforge_base/evolvisforge-5.1/src/packaging/control/040web-apache	2011-11-07 15:30:52 UTC (rev 17712)
@@ -1,4 +1,4 @@
 Package: @OLDPACKAGE at -web-apache
 Architecture: all
 Depends: @OLDPACKAGE at -web-apache2, ${misc:Depends}
-Description: transition package to @OLDPACKAGE at -web-apache2
+Description: transitional package to @OLDPACKAGE at -web-apache2

Modified: trunk/gforge_base/evolvisforge-5.1/src/packaging/control/040web-apache.shortdesc
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/packaging/control/040web-apache.shortdesc	2011-11-07 15:30:47 UTC (rev 17711)
+++ trunk/gforge_base/evolvisforge-5.1/src/packaging/control/040web-apache.shortdesc	2011-11-07 15:30:52 UTC (rev 17712)
@@ -1,5 +1,2 @@
- This package exists only as a means to make transitions to apache2
- easier. You can safely uninstall it.
- .
- This package is not part of the Evolvis platform; it
- may or may not work; it even may break things.
+ This dummy package exists only as a means to make transitions
+ to apache2 easier. You can safely uninstall it.

Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/projectlabels/common/ProjectLabelsPlugin.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/projectlabels/common/ProjectLabelsPlugin.class.php	2011-11-07 15:30:47 UTC (rev 17711)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/projectlabels/common/ProjectLabelsPlugin.class.php	2011-11-07 15:30:52 UTC (rev 17712)
@@ -5,7 +5,7 @@
 		$this->Plugin() ;
 		$this->name = "projectlabels" ;
 		$this->text = "Project labels";
-		$this->hooks[] = "project_before_description" ;
+		$this->hooks[] = "project_before_widgets" ;
 		$this->hooks[] = "site_admin_option_hook" ;
 	}
 
@@ -15,7 +15,7 @@
 		if ($hookname == "site_admin_option_hook") {
 			echo '<li>' . util_make_link ('/plugins/projectlabels/index.php',
 						      _('Project labels')) . '</li>';
-		} elseif ($hookname == "project_before_description") {
+		} elseif ($hookname == "project_before_widgets") {
 			$group_id=$params['group_id'];
 			$project = &group_get_object($group_id);
 			if (!$project || !is_object($project))

Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/projectlabels/www/index.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/projectlabels/www/index.php	2011-11-07 15:30:47 UTC (rev 17711)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/projectlabels/www/index.php	2011-11-07 15:30:52 UTC (rev 17712)
@@ -15,7 +15,7 @@
 
 if ($func == 'addlabel') {
 	$label_name = addslashes (getStringFromRequest ('label_name')) ;
-	$label_text = addslashes (getStringFromRequest ('label_text')) ;
+	$label_text = getStringFromRequest ('label_text') ;
 	$res = db_query_params ('INSERT INTO plugin_projectlabels_labels (label_name, label_text)
                          VALUES($1,$2)',
 			array($label_name,
@@ -93,7 +93,7 @@
 if ($func == 'editlabel') {
 	$label_id = getIntFromRequest ('label_id', 0) ;
 	$label_name = addslashes (getStringFromRequest ('label_name')) ;
-	$label_text = addslashes (getStringFromRequest ('label_text')) ;
+	$label_text = getStringFromRequest ('label_text') ;
 	$res = db_query_params ('UPDATE plugin_projectlabels_labels SET label_name = $1, label_text = $2
 		         WHERE label_id=$3',
 			array($label_name,
@@ -121,8 +121,8 @@
 <input type="text" size="15" maxlength="32" name="label_name" value="<?php echo stripslashes ($row['label_name']) ; ?>"/> <br/>
 						  <?php echo _('Displayed text (or HTML) for the label:') ; ?><br/>
 <textarea tabindex='1' accesskey="," name="label_text" rows='5'
-														       cols='80'><?php echo stripslashes($row['label_text']) ; ?></textarea><br/>
-																							   <?php echo _('This label currently looks like this:') ." " . stripslashes($row['label_text']) ; ?>
+														       cols='80'><?php echo $row['label_text'] ; ?></textarea><br/>
+																							   <?php echo _('This label currently looks like this:') ." " . $row['label_text'] ; ?>
 <input type="submit" value="<?php echo _('Save this label') ?>" />
 </form>
 <?php
@@ -143,7 +143,7 @@
 	while ($row = db_fetch_array($res)) {
 		echo "<h3>".stripslashes ($row['label_name'])."</h3>" ;
 		echo "<br />" . _('This label currently looks like this:') ." ";
-		echo stripslashes ($row['label_text']) . "<br />" ;
+		echo $row['label_text'] . "<br />" ;
 		
 		$res2 = db_query_params ('SELECT groups.unix_group_name, groups.group_name, groups.group_id FROM groups, plugin_projectlabels_group_labels
                  WHERE plugin_projectlabels_group_labels.group_id = groups.group_id

Modified: trunk/gforge_base/evolvisforge-5.1/src/www/include/project_home.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/include/project_home.php	2011-11-07 15:30:47 UTC (rev 17711)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/include/project_home.php	2011-11-07 15:30:52 UTC (rev 17712)
@@ -88,6 +88,9 @@
 site_project_header(array('title'=>$title, 'h1' => '', 'group'=>$group_id, 'toptab' => 'home',
 	'submenu' => $params['submenu']));
 
+$params = array('group_id' => $group_id);
+plugin_hook('project_before_widgets', $params);
+
 $lm = new WidgetLayoutManager();
 $lm->displayLayout($group_id, WidgetLayoutManager::OWNER_TYPE_GROUP);
 

Modified: trunk/gforge_base/evolvisforge-5.1/src/www/tracker/admin/tracker.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/tracker/admin/tracker.php	2011-11-07 15:30:47 UTC (rev 17711)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/tracker/admin/tracker.php	2011-11-07 15:30:52 UTC (rev 17712)
@@ -58,8 +58,8 @@
 echo '</p>';
 
 echo '<p>' . util_make_link ('/tracker/admin/?group_id='.$group_id.'&atid='.$ath->getID().'&clone_tracker=1',
-			     '<strong>'._('Clone Tracker').'</strong>').'<br />' ;
-echo _('Create a new tracker as a copy of this one.') ;
+			     '<strong>'._('Apply Template Tracker').'</strong>').'<br />' ;
+echo _('Duplicate parameters and fields from a template trackers in this one.') ;
 echo '</p>';
 
 echo '<p>' . util_make_link ('/tracker/admin/?group_id='.$group_id.'&atid='.$ath->getID().'&delete=1',



More information about the evolvis-commits mailing list