[Fusionforge-commits] r10457 - in trunk/src: common/pm www/include www/pm www/pm/include

Franck VILLAUME nerville at libremir.placard.fr.eu.org
Sun Sep 12 19:24:23 CEST 2010


Author: nerville
Date: 2010-09-12 19:24:22 +0200 (Sun, 12 Sep 2010)
New Revision: 10457

Modified:
   trunk/src/common/pm/ProjectTask.class.php
   trunk/src/www/include/Layout.class.php
   trunk/src/www/pm/include/ProjectTaskHTML.class.php
   trunk/src/www/pm/t_lookup.php
   trunk/src/www/pm/task.php
Log:
fix warning

Modified: trunk/src/common/pm/ProjectTask.class.php
===================================================================
--- trunk/src/common/pm/ProjectTask.class.php	2010-09-12 10:59:51 UTC (rev 10456)
+++ trunk/src/common/pm/ProjectTask.class.php	2010-09-12 17:24:22 UTC (rev 10457)
@@ -1031,7 +1031,7 @@
 				}
 				$has_changes = true;
 		}
-		$old_array =& array_keys($this->getDependentOn());			
+		$old_array = array_keys($this->getDependentOn());			
 		$diff_array=array_diff($old_array,array_keys($depend_arr));
 		if (count($diff_array)>0) { 
 			for ($tmp=0;$tmp<count($old_array);$tmp++) {
@@ -1116,13 +1116,21 @@
 		}
 
 		$body = "Task #". $this->getID() ." has been updated. ".
-			"\n\nProject: ". $this->ProjectGroup->Group->getPublicName() 
-			."\n". $arrChangedAndInNotice['subproject']."Subproject: ". $this->ProjectGroup->getName() 
-			."\n". $arrChangedAndInNotice['summary']. "Summary: ".util_unconvert_htmlspecialchars( $this->getSummary() )
-			."\n". $arrChangedAndInNotice['complete']. "Complete: ". $this->getPercentComplete() ."%"
-			."\n". $arrChangedAndInNotice['status']. "Status: ". $this->getStatusName() .
-			"\n\nDescription: ". util_unconvert_htmlspecialchars( $this->getDetails() );
+			"\n\nProject: ". $this->ProjectGroup->Group->getPublicName(); 
+			if (isset($arrChangedAndInNotice['subproject']))
+				$body .= "\n". $arrChangedAndInNotice['subproject']."Subproject: ". $this->ProjectGroup->getName();
 
+			if (isset($arrChangedAndInNotice['summary']))
+				$body .= "\n". $arrChangedAndInNotice['summary']. "Summary: ".util_unconvert_htmlspecialchars( $this->getSummary() );
+
+			if (isset($arrChangedAndInNotice['complete']))
+				$body .= "\n". $arrChangedAndInNotice['complete']. "Complete: ". $this->getPercentComplete() ."%";
+
+			if (isset($arrChangedAndInNotice['status']))
+				$body .= "\n". $arrChangedAndInNotice['status']. "Status: ". $this->getStatusName();
+
+			$body .= "\n\nDescription: ". util_unconvert_htmlspecialchars( $this->getDetails() );
+
 		/*
 			Now get the followups to this task
 		*/

Modified: trunk/src/www/include/Layout.class.php
===================================================================
--- trunk/src/www/include/Layout.class.php	2010-09-12 10:59:51 UTC (rev 10456)
+++ trunk/src/www/include/Layout.class.php	2010-09-12 17:24:22 UTC (rev 10457)
@@ -117,6 +117,12 @@
 
 
 	/**
+	 * The color bars in pm reporting
+	 */
+	var $COLOR_LTBACK1 = '#C0C0C0';
+
+
+	/**
 	 * Layout() - Constructor
 	 */
 	function Layout() {

Modified: trunk/src/www/pm/include/ProjectTaskHTML.class.php
===================================================================
--- trunk/src/www/pm/include/ProjectTaskHTML.class.php	2010-09-12 10:59:51 UTC (rev 10456)
+++ trunk/src/www/pm/include/ProjectTaskHTML.class.php	2010-09-12 17:24:22 UTC (rev 10457)
@@ -1,20 +1,28 @@
 <?php
 /**
- * GForge Project Management Facility
+ * FusionForge Project Management Facility
  *
+ * Copyright 1999/2000, Tim Perdue - Sourceforge
  * Copyright 2002 GForge, LLC
- * http://gforge.org/
+ * Copyright 2010, FusionForge Team
+ * http://fusionforge.org
  *
+ * This file is part of FusionForge. 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.
+ *
+ * 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 FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-/*
 
-	Tasks
-	By Tim Perdue, Sourceforge, 11/99
-	Heavy rewrite by Tim Perdue April 2000
-
-	Total rewrite in OO and GForge coding guidelines 12/2002 by Tim Perdue
-*/
-
 require_once $gfcommon.'include/Error.class.php';
 require_once $gfcommon.'pm/ProjectTask.class.php';
 
@@ -27,7 +35,7 @@
 	function multipleDependBox ($name='dependent_on[]') {
 		$result=$this->getOtherTasks();
 		//get the data so we can mark items as SELECTED
-		$arr2 =& array_keys($this->getDependentOn());
+		$arr2 = array_keys($this->getDependentOn());
 		return html_build_multiple_select_box ($result,$name,$arr2);
 	}
 

Modified: trunk/src/www/pm/t_lookup.php
===================================================================
--- trunk/src/www/pm/t_lookup.php	2010-09-12 10:59:51 UTC (rev 10456)
+++ trunk/src/www/pm/t_lookup.php	2010-09-12 17:24:22 UTC (rev 10457)
@@ -53,7 +53,7 @@
 	$asformat = "application/json; charset=\"UTF-8\"";
 
 $islogin = session_loggedin();
-$isadmin = session_checkperm(array('group'=>'1','admin_flags'=>'A'));
+$isadmin = forge_check_global_perm ('forge_admin');
 $ishttps = session_issecure();
 $ispublic = isProjectTaskInfoPublic($tid);
 

Modified: trunk/src/www/pm/task.php
===================================================================
--- trunk/src/www/pm/task.php	2010-09-12 10:59:51 UTC (rev 10456)
+++ trunk/src/www/pm/task.php	2010-09-12 17:24:22 UTC (rev 10457)
@@ -1,20 +1,30 @@
 <?php
 /**
- * GForge Project Management Facility
+ * FusionForge Project Management Facility : Tasks
  *
- * Copyright 2002 GForge, LLC
- * http://gforge.org/
+ * Copyright 1999-2000, Tim Perdue/Sourceforge
+ * Copyright 2002, Tim Perdue/GForge, LLC
+ * Copyright 2009, Roland Mas
+ * http://fusionforge.org
  *
+ * This file is part of FusionForge.
+ *
+ * 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.
+ * 
+ * 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 FusionForge; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
  */
-/*
 
-	Tasks
-	By Tim Perdue, Sourceforge, 11/99
-	Heavy rewrite by Tim Perdue April 2000
-
-	Total rewrite in OO and GForge coding guidelines 12/2002 by Tim Perdue
-*/
-
 require_once('../env.inc.php');
 require_once $gfcommon.'include/pre.php';
 require_once $gfwww.'pm/include/ProjectGroupHTML.class.php';
@@ -265,7 +275,7 @@
 		if ($count == 0) {
 			$warning_msg = _('No task selected');
 		}
-		elseif (!$was_error) {
+		elseif (isset($was_error) && !$was_error) {
 			$feedback = _('Task Updated Successfully');
 		}
 		include $gfwww.'pm/browse_task.php';




More information about the Fusionforge-commits mailing list