[evolvis-commits] r18730: upstream pending merges:↵ nerville 2012-10-18 fix cleanup: delete file once the job is done↵ nerville 2012-10-18 fix retrieve data↵ nerville 2012-10-17 fix indent↵ nerville 2012-10-17 remove call to unexistant function↵ nerville 2012-10-17 remove useless var & use htmlspecialchars when needed↵ nerville 2012-10-17 fix sendNotice to make it compliant with mailman & fix missing update data_a...↵ nerville 2012-10-17 fix typo↵ nerville 2012-10-16 check for use_project_full_list when needed↵ nerville 2012-10-16 disable trove link if forge does not use trove↵ nerville 2012-10-16 fix wrong url, remove useless amp;↵ Roland Mas 2012-10-12 Install xfonts-base for the testsuite

mirabilos at evolvis.org mirabilos at evolvis.org
Wed Oct 24 15:56:25 CEST 2012


Author: mirabilos
Date: 2012-10-24 15:56:24 +0200 (Wed, 24 Oct 2012)
New Revision: 18730

Modified:
   trunk/gforge_base/evolvisforge-5.1/src/common/docman/Document.class.php
   trunk/gforge_base/evolvisforge-5.1/src/common/docman/DocumentManager.class.php
   trunk/gforge_base/evolvisforge-5.1/src/common/docman/Parsedata.class.php
   trunk/gforge_base/evolvisforge-5.1/src/cronjobs/update_docdata_dataword.php
   trunk/gforge_base/evolvisforge-5.1/src/www/include/features_boxes.php
   trunk/gforge_base/evolvisforge-5.1/src/www/softwaremap/full_list.php
   trunk/gforge_base/evolvisforge-5.1/src/www/themes/css/fusionforge.css
   trunk/gforge_base/evolvisforge-5.1/src/www/tracker/include/ArtifactHtml.class.php
   trunk/gforge_base/evolvisforge-5.1/tests/scripts/fusionforge-build-and-test-deb.sh
Log:
upstream pending merges:
  nerville 2012-10-18 fix cleanup: delete file once the job is done
    nerville 2012-10-18 fix retrieve data
    nerville 2012-10-17 fix indent
    nerville 2012-10-17 remove call to unexistant function
    nerville 2012-10-17 remove useless var & use htmlspecialchars when needed
    nerville 2012-10-17 fix sendNotice to make it compliant with mailman & fix missing update data_a...
    nerville 2012-10-17 fix typo
    nerville 2012-10-16 check for use_project_full_list when needed
    nerville 2012-10-16 disable trove link if forge does not use trove
    nerville 2012-10-16 fix wrong url, remove useless amp;
    Roland Mas 2012-10-12 Install xfonts-base for the testsuite

explicitly not merged, but marked as:
    aljeux 2012-10-16 Fix [#509] Bugtracker eats newlines in descrition and comment
 ⇒ fixed via descriptive.php and util_sanitise_multiline_submission()
    Julien HEYMAN 2012-10-15 Fix bullet in mediawiki summary
 ⇒ fixed by upgrading to MW 1.19 and redoing the integration

Modified: trunk/gforge_base/evolvisforge-5.1/src/common/docman/Document.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/common/docman/Document.class.php	2012-10-23 14:06:52 UTC (rev 18729)
+++ trunk/gforge_base/evolvisforge-5.1/src/common/docman/Document.class.php	2012-10-24 13:56:24 UTC (rev 18730)
@@ -7,6 +7,7 @@
  * Copyright 2009, Roland Mas
  * Copyright 2010, Franck Villaume - Capgemini
  * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
+ * Copyright 2012, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -62,7 +63,7 @@
 	function Document(&$Group, $docid = false, $arr = false, $engine = '') {
 		$this->Error();
 		if (!$Group || !is_object($Group)) {
-			$this->setNotValidGroupObjectError();
+			$this->setError('Document:: '. _('No Valid Group Object'));
 			return false;
 		}
 		if ($Group->isError()) {
@@ -762,7 +763,7 @@
 				}
 			}
 		}
-
+		$this->fetchData($this->getID());
 		$this->sendNotice(false);
 		return true;
 	}
@@ -772,28 +773,31 @@
 	 *
 	 * @param	boolean	true = new document (default value)
 	 */
-	function sendNotice ($new=true) {
+	function sendNotice($new = true) {
 		$BCC = $this->Group->getDocEmailAddress();
 		if ($this->isMonitoredBy('ALL')) {
 			$BCC .= $this->getMonitoredUserEmailAddress();
 		}
 		if (strlen($BCC) > 0) {
-			if ($new) {
-				$status = _('New document');
-			} else {
-				$status = _('Updated document');
+			$BCCarray = explode(',',$BCC);
+			foreach ($BCCarray as $dest_email) {
+				if ($new) {
+					$status = _('New document');
+				} else {
+					$status = _('Updated document');
+				}
+				$subject = '['.$this->Group->getPublicName().'] '.$status.' - '.$this->getName();
+				$body = _('Project:').' '.$this->Group->getPublicName()."\n";
+				$body .= _('Directory:').' '.$this->getDocGroupName()."\n";
+				$body .= _('Document title:').' '.$this->getName()."\n";
+				$body .= _('Document description:').' '.util_unconvert_htmlspecialchars($this->getDescription())."\n";
+				$body .= _('Submitter:').' '.$this->getCreatorRealName()." (".$this->getCreatorUserName().") \n";
+				$body .= "\n\n-------------------------------------------------------\n".
+					_('For more info, visit:').
+					"\n\n" . util_make_url('/docman/?group_id='.$this->Group->getID().'&view=listfile&dirid='.$this->getDocGroupID());
+
+				util_send_message($dest_email, $subject, $body, 'noreply@'.forge_get_config('web_host'), '', _('Docman'));
 			}
-			$subject = '['.$this->Group->getPublicName().'] '.$status.' - '.$this->getName();
-			$body = _('Project:').' '.$this->Group->getPublicName()."\n";
-			$body .= _('Directory:').' '.$this->getDocGroupName()."\n";
-			$body .= _('Document title:').' '.$this->getName()."\n";
-			$body .= _('Document description:').' '.util_unconvert_htmlspecialchars($this->getDescription())."\n";
-			$body .= _('Submitter:').' '.$this->getCreatorRealName()." (".$this->getCreatorUserName().") \n";
-			$body .= "\n\n-------------------------------------------------------\n".
-				_('For more info, visit:').
-				"\n\n" . util_make_url('/docman/?group_id='.$this->Group->getID().'&view=listfile&dirid='.$this->getDocGroupID());
-
-			util_send_message('', $subject, $body, '', $BCC);
 		}
 
 		return true;

Modified: trunk/gforge_base/evolvisforge-5.1/src/common/docman/DocumentManager.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/common/docman/DocumentManager.class.php	2012-10-23 14:06:52 UTC (rev 18729)
+++ trunk/gforge_base/evolvisforge-5.1/src/common/docman/DocumentManager.class.php	2012-10-24 13:56:24 UTC (rev 18730)
@@ -2,7 +2,7 @@
 /**
  * FusionForge document manager
  *
- * Copyright 2011, Franck Villaume - TrivialDev
+ * Copyright 2011-2012, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -49,7 +49,7 @@
 	function DocumentManager(&$Group) {
 		$this->Error();
 		if (!$Group || !is_object($Group)) {
-			$this->setNotValidGroupObjectError();
+			$this->setError('DocumentManager:: '. _('No Valid Group Object'));
 			return false;
 		}
 		if ($Group->isError()) {

Modified: trunk/gforge_base/evolvisforge-5.1/src/common/docman/Parsedata.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/common/docman/Parsedata.class.php	2012-10-23 14:06:52 UTC (rev 18729)
+++ trunk/gforge_base/evolvisforge-5.1/src/common/docman/Parsedata.class.php	2012-10-24 13:56:24 UTC (rev 18730)
@@ -5,6 +5,7 @@
  * Copyright 2005, Fabio Bertagnin
  * Copyright 2009-2010, Franck Villaume - Capgemini
  * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
+ * Copyright 2012, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -56,7 +57,7 @@
 				unlink($filename);
 			}
 		}
-		// always parse titre and description
+		// always parse title and description
 		$data2 = utf8_decode("$title $description");
 		// temporary file for treatement
 		$filename = tempnam("/tmp", "tmp");
@@ -66,6 +67,9 @@
 		$cmd = $this->p_path.$this->parsers["text/plain"];
 		$cmd = "php -f $cmd $filename";
 		$rep1 = shell_exec ($cmd);
+		if ( file_exists ($filename ) ) {
+			unlink($filename);
+		}
 		// dont need to unlink the filename because parser_text already remove it
 		return preg_replace("/\n/", " ", "$rep $rep1");
 	}

Modified: trunk/gforge_base/evolvisforge-5.1/src/cronjobs/update_docdata_dataword.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/cronjobs/update_docdata_dataword.php	2012-10-23 14:06:52 UTC (rev 18729)
+++ trunk/gforge_base/evolvisforge-5.1/src/cronjobs/update_docdata_dataword.php	2012-10-24 13:56:24 UTC (rev 18730)
@@ -31,8 +31,7 @@
 require_once $gfcommon.'docman/DocumentFactory.class.php';
 require_once $gfcommon.'docman/DocumentGroupFactory.class.php';
 
-$engine_path = dirname(__FILE__).'/../common/docman/engine/';
-$p = new Parsedata($engine_path);
+$p = new Parsedata();
 
 $timestarttrait = microtime_float();
 // documents list
@@ -54,13 +53,13 @@
 foreach ($resarr as $item) {
 	$compt++;
 	$timestart = microtime_float();
-	$doc_dataData = db_query_params('SELECT data from doc_data where docid = $1', array($item["docid"]));
+	$doc_dataData = db_query_params('SELECT data from doc_data where docid = $1', array($item['docid']));
 	if (!$doc_dataData) {
 		die("unable to get data: ".db_error());
 	}
-	$data1 = base64_decode($doc_dataData["data"]);
+	$data1 = base64_decode(db_result($doc_dataData, 0, 'data');
 	$lenin = strlen($data1);
-	$res = $p->get_parse_data($data1, $item["title"], $item["description"], $item["filetype"]);
+	$res = $p->get_parse_data($data1, htmlspecialchars($item['title']), htmlspecialchars($item['description']), $item["filetype"]);
 	$len = strlen($res);
 	$resUp = db_query_params('UPDATE doc_data SET data_words=$1 WHERE docid=$2',
 			 array ($res, $item["docid"]));

Modified: trunk/gforge_base/evolvisforge-5.1/src/www/include/features_boxes.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/include/features_boxes.php	2012-10-23 14:06:52 UTC (rev 18729)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/include/features_boxes.php	2012-10-24 13:56:24 UTC (rev 18730)
@@ -3,6 +3,7 @@
  *
  * Copyright 1999-2001 (c) VA Linux Systems
  * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
+ * Copyright 2012, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -159,11 +160,11 @@
 	$gforge = new FusionForge();
 	$return = '<p>';
 	$return .= _('Hosted Projects').': ';
-	if (forge_get_config('use_trove')) {
+	if (forge_get_config('use_project_full_list')) {
 		$return .= '<a href="softwaremap/full_list.php">';
 	}
 	$return .= '<strong>'.number_format($gforge->getNumberOfPublicHostedProjects()).'</strong>';
-	if (forge_get_config('use_trove')) {
+	if (forge_get_config('use_project_full_list')) {
 		$return .= '</a>';
 	}
 	$return .= "</p><p>";
@@ -199,8 +200,10 @@
 		$t_return = $return;
 		$return = '<table summary="">' . $t_return . "</table>\n"; 
 	}
-	
-	$return .= '<div class="align-center">'.util_make_link ('/softwaremap/full_list.php', _('All newest projects'), array('class' => 'dot-link')).'</div>';
+
+	if (forge_get_config('use_project_full_list')) {
+		$return .= '<div class="align-center">'.util_make_link ('/softwaremap/full_list.php', _('All newest projects'), array('class' => 'dot-link')).'</div>';
+	}
 	return $return;
 }
 

Modified: trunk/gforge_base/evolvisforge-5.1/src/www/softwaremap/full_list.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/softwaremap/full_list.php	2012-10-23 14:06:52 UTC (rev 18729)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/softwaremap/full_list.php	2012-10-24 13:56:24 UTC (rev 18730)
@@ -1,7 +1,8 @@
 <?php
-/*
+/**
  * Copyright (C) 2008-2009 Alcatel-Lucent
  * Copyright (C) 2010 Alain Peyrat - Alcatel-Lucent
+ * Copyright 2012, Franck Villaume - TrivialDev
  *
  * This file is part of FusionForge. FusionForge is free software;
  * you can redistribute it and/or modify it under the terms of the
@@ -19,7 +20,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-/*
+/**
  * Standard Alcatel-Lucent disclaimer for contributing to open source
  *
  * "The Full List ("Contribution") has not been tested and/or
@@ -164,7 +165,9 @@
 		// extra description
 		print '</td></tr><tr valign="top"><td>';
 		// list all trove categories
-		print trove_getcatlisting($row_grp['group_id'],0,1,1);
+		if (forge_get_config('use_trove')) {
+			print trove_getcatlisting($row_grp['group_id'],0,1,1);
+		}
 		print '</td>';
 		print '<td valign="bottom" style="text-align:right;"><br />'._('Register Date:').' <strong>'.date(_('Y-m-d H:i'),$row_grp['register_time']).'</strong></td>';
 		print '</tr>';

Modified: trunk/gforge_base/evolvisforge-5.1/tests/scripts/fusionforge-build-and-test-deb.sh
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tests/scripts/fusionforge-build-and-test-deb.sh	2012-10-23 14:06:52 UTC (rev 18729)
+++ trunk/gforge_base/evolvisforge-5.1/tests/scripts/fusionforge-build-and-test-deb.sh	2012-10-24 13:56:24 UTC (rev 18730)
@@ -122,7 +122,7 @@
 if $REMOTESELENIUM
 then
 	echo "Run phpunit test on $HOST"
-	ssh root@$HOST "apt-get -y install vnc4server ; mkdir -p /root/.vnc"
+	ssh root@$HOST "apt-get -y install xfonts-base vnc4server ; mkdir -p /root/.vnc"
 	ssh root@$HOST "cat > /root/.vnc/xstartup ; chmod +x /root/.vnc/xstartup" <<EOF
 #! /bin/bash
 : > /root/phpunit.exitcode



More information about the evolvis-commits mailing list