[Fusionforge-commits] r10456 - in trunk/src: common/survey www/survey/admin www/survey/include

Franck VILLAUME nerville at libremir.placard.fr.eu.org
Sun Sep 12 12:59:51 CEST 2010


Author: nerville
Date: 2010-09-12 12:59:51 +0200 (Sun, 12 Sep 2010)
New Revision: 10456

Modified:
   trunk/src/common/survey/Survey.class.php
   trunk/src/common/survey/SurveyResponseFactory.class.php
   trunk/src/www/survey/admin/add_question.php
   trunk/src/www/survey/admin/edit_question.php
   trunk/src/www/survey/admin/question.php
   trunk/src/www/survey/include/SurveyHTML.class.php
Log:
fix copyrights and warning

Modified: trunk/src/common/survey/Survey.class.php
===================================================================
--- trunk/src/common/survey/Survey.class.php	2010-09-12 10:52:16 UTC (rev 10455)
+++ trunk/src/common/survey/Survey.class.php	2010-09-12 10:59:51 UTC (rev 10456)
@@ -124,7 +124,7 @@
 		} 
 
 		/* Load question to data array */
-		$survey_id=db_insertid($res,'surveys','survey_id');
+		$survey_id=db_insertid($result,'surveys','survey_id');
 		return $this->fetchData($survey_id);
 	}
 

Modified: trunk/src/common/survey/SurveyResponseFactory.class.php
===================================================================
--- trunk/src/common/survey/SurveyResponseFactory.class.php	2010-09-12 10:52:16 UTC (rev 10455)
+++ trunk/src/common/survey/SurveyResponseFactory.class.php	2010-09-12 10:59:51 UTC (rev 10456)
@@ -158,7 +158,7 @@
          *                       
  	 *	@return	int      the number of survey responses
 	 */
-	function &getNumberOfSurveyResponsess() {
+	function getNumberOfSurveyResponses() {
 		$arr = &$this->getSurveyResponses();
 		if (!$arr || !is_array($arr)) {
 			return 0;
@@ -176,8 +176,8 @@
          *              for comments, we return arr[1], ...arr[n] with comments
 	 */
 	function &getResults() {
-		if ($this->Results) {
-			return $this->Results;
+		if ($this->Result) {
+			return $this->Result;
 		}
 
 		$arr = &$this->getSurveyResponses();

Modified: trunk/src/www/survey/admin/add_question.php
===================================================================
--- trunk/src/www/survey/admin/add_question.php	2010-09-12 10:52:16 UTC (rev 10455)
+++ trunk/src/www/survey/admin/add_question.php	2010-09-12 10:59:51 UTC (rev 10456)
@@ -1,25 +1,25 @@
 <?php
 /**
- * GForge Survey Facility
+ * FusionForge Survey Facility
  *
  * Portions Copyright 1999-2001 (c) VA Linux Systems
  * The rest Copyright 2002-2004 (c) GForge Team
  * http://gforge.org/
  *
- * This file is part of GForge.
+ * This file is part of FusionForge.
  *
- * GForge is free software; you can redistribute it and/or modify
+ * 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.
  *
- * GForge is distributed in the hope that it will be useful,
+ * 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 GForge; if not, write to the Free Software
+ * along with FusionForge; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 

Modified: trunk/src/www/survey/admin/edit_question.php
===================================================================
--- trunk/src/www/survey/admin/edit_question.php	2010-09-12 10:52:16 UTC (rev 10455)
+++ trunk/src/www/survey/admin/edit_question.php	2010-09-12 10:59:51 UTC (rev 10456)
@@ -1,25 +1,26 @@
 <?php
 /**
- * GForge Survey Facility
+ * FusionForge Survey Facility
  *
  * Portions Copyright 1999-2001 (c) VA Linux Systems
  * The rest Copyright 2002-2004 (c) GForge Team
- * http://gforge.org/
+ * Copyright 2008-2010 (c) FusionForge Team
+ * http://fusionforge.org/
  *
- * This file is part of GForge.
+ * This file is part of FusionForge.
  *
- * GForge is free software; you can redistribute it and/or modify
+ * 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.
  *
- * GForge is distributed in the hope that it will be useful,
+ * 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 GForge; if not, write to the Free Software
+ * along with FusionForge; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
@@ -82,7 +83,7 @@
 
 <h2><?php echo _('Editing Question'); ?> #<?php echo $question_id; ?></h2>
 
-<span class="warning"><?php echo _('WARNING! It is a bad idea to change a question after responses to it have been submitted'); ?></span>
+<div class="warning"><?php echo _('WARNING! It is a bad idea to change a question after responses to it have been submitted'); ?></div>
 
 <p><?php echo _('If you change a question after responses have been posted, your results pages may be misleading'); ?>.</p>
 

Modified: trunk/src/www/survey/admin/question.php
===================================================================
--- trunk/src/www/survey/admin/question.php	2010-09-12 10:52:16 UTC (rev 10455)
+++ trunk/src/www/survey/admin/question.php	2010-09-12 10:59:51 UTC (rev 10456)
@@ -1,13 +1,29 @@
 <?php
 /**
-  *
-  * GForge Survey Facility: Question handle program
-  *
-  * Copyright 2004 (c) GForge
-  * http://gforge.org
-  *
-  *
-  */
+ * FusionForge Survey Facility: Question handle program
+ *
+ * Portions Copyright 1999-2001 (c) VA Linux Systems
+ * The rest Copyright 2002-2004 (c) GForge Team
+ * Copyright 2008-2010 (c) 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
 require_once('../../env.inc.php');
 require_once $gfcommon.'include/pre.php';
 require_once $gfcommon.'survey/SurveyQuestion.class.php';

Modified: trunk/src/www/survey/include/SurveyHTML.class.php
===================================================================
--- trunk/src/www/survey/include/SurveyHTML.class.php	2010-09-12 10:52:16 UTC (rev 10455)
+++ trunk/src/www/survey/include/SurveyHTML.class.php	2010-09-12 10:59:51 UTC (rev 10456)
@@ -1,17 +1,29 @@
 <?php
 /**
- * GForge Survey HTML Facility
+ * FusionForge Survey HTML Facility
  *
- * Copyright 2004 GForge, LLC
- * http://gforge.org/
+ * Portions Copyright 1999-2001 (c) VA Linux Systems
+ * The rest Copyright 2002-2004 (c) GForge Team - Sung Kim
+ * Copyright 2008-2010 (c) 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-/*
-	Survey related HTML
-	By Sung Kim, GForge, 02/2004
-*/
-
 require_once $gfcommon.'include/pre.php';
 require_once $gfwww.'include/note.php';
 
@@ -101,9 +113,9 @@
 		/* If we have a question object, it is a Modify */
 		if ($q && is_object($q) && !$q->isError() && $q->getID()) {
 			$title = _('Edit A Question');
-			$warning = '<span class="warning">'. 
+			$warning = '<div class="warning">'. 
 				_('WARNING! It is a bad idea to change a question after responses to it have been submitted').
-				'</span>';
+				'</div>';
 			$question_id = $q->getID();
 			$question = $q->getQuestion();
 			$question_type = $q->getQuestionType();
@@ -163,8 +175,8 @@
 		/* If we have a survey object, it is a Modify */
 		if ($s && is_object($s) && !$s->isError() && $s->getID()) {
 			$title = _('Edit A Survey');
-			$warning = '<span class="warning">'. 
-				_('WARNING! It is a bad idea to edit a survey after responses have been posted').'</span>';
+			$warning = '<div class="warning">'. 
+				_('WARNING! It is a bad idea to edit a survey after responses have been posted').'</div>';
 			$survey_id = $s->getID();
 			$survey_title = $s->getTitle();
 			$survey_questions = $s->getQuestionString();
@@ -449,7 +461,7 @@
 		global $survey_id;
 		
 		if (!$s->isActive()) {
-			return '<span class="error">'. _('Error - you can\'t vote for inactive survey').'</span>';
+			return '<div class="error">'. _('Error - you can\'t vote for inactive survey').'</div>';
 		}
 		/* Get questions of this survey */
 		$questions = & $s->getQuestionInstances();
@@ -569,7 +581,7 @@
 			echo ($sr->getErrorMessage());
 		}
 		
-		$totalCount = $sr->getNumberOfSurveyResponsess();
+		$totalCount = $sr->getNumberOfSurveyResponses();
 		$votes = $Survey->getNumberOfVotes();
 		
 		/* No votes, no result to show */




More information about the Fusionforge-commits mailing list