[Fusionforge-commits] FusionForge branch master updated. 5b3a24cc367efef0ebfd58cf5ed65884bae417b5

Franck VILLAUME nerville at fusionforge.org
Wed Feb 5 15:54:18 CET 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  5b3a24cc367efef0ebfd58cf5ed65884bae417b5 (commit)
      from  b7e1d9759036d2c047d09610ae96d0d4521dfe24 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5b3a24cc367efef0ebfd58cf5ed65884bae417b5
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Wed Feb 5 15:51:32 2014 +0100

    merge from Branch_5_3

diff --git a/src/www/people/createjob.php b/src/www/people/createjob.php
index a7ad5c3..7c586fd 100644
--- a/src/www/people/createjob.php
+++ b/src/www/people/createjob.php
@@ -4,6 +4,7 @@
  *
  * Copyright 1999-2001 (c) VA Linux Systems
  * Copyright 2002-2004 (c) GForge Team
+ * Copyright 2014, Franck Villaume - TrivialDev
  * http://fusionforge.org/
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -41,7 +42,7 @@ if ($group_id && (forge_check_perm('project_admin', $group_id))) {
 		Fill in the info to create a job
 	*/
 	echo '
-		<p>'._('Start by filling in the fields below. When you click continue, you will be shown a list of skills and experience levels that this job requires.').'	</p>
+		<p>'._('Start by filling in the fields below. When you click continue, you will be shown a list of skills and experience levels that this job requires.').'</p>
 		<p>
 		<form action="'.util_make_url ('/people/editjob.php').'" method="post">
 		<input type="hidden" name="group_id" value="'.$group_id.'" />
diff --git a/src/www/people/editjob.php b/src/www/people/editjob.php
index 1df39db..af12717 100644
--- a/src/www/people/editjob.php
+++ b/src/www/people/editjob.php
@@ -48,7 +48,7 @@ if ($group_id && (forge_check_perm('project_admin', $group_id))) {
 		/*
 			create a new job
 		*/
-		if (!$title || !$description || $category_id==100) {
+		if (!$title || !$description || $category_id == 'xzxz') {
 			exit_missing_param('',array(_('Title'),_('Description'),_('Category')),'admin');
 		}
 		if (!form_key_is_valid(getStringFromRequest('form_key'))) {
@@ -69,7 +69,7 @@ if ($group_id && (forge_check_perm('project_admin', $group_id))) {
 		/*
 			update the job's description, status, etc
 		*/
-		if (!$title || !$description || $category_id==100 || $status_id==100 || !$job_id) {
+		if (!$title || !$description || $category_id== 'xzxz' || $status_id== 'xzxz' || !$job_id) {
 			//required info
 			exit_missing_param('',array(_('Title'),_('Description'),_('Category'),_('Status'),_('Job')),'admin');
 		}
@@ -86,7 +86,7 @@ if ($group_id && (forge_check_perm('project_admin', $group_id))) {
 		/*
 			add item to job inventory
 		*/
-		if ($skill_id == "xyxy" || $skill_level_id==100 || $skill_year_id==100  || !$job_id) {
+		if ($skill_id == 'xzxz' || $skill_level_id == 'xzxz' || $skill_year_id== 'xzxz'  || !$job_id) {
 			//required info
 			exit_missing_param('',array(_('Skill'),_('Skill Level'),_('Skill Year'),_('Job')),'admin');
 		}
@@ -103,7 +103,7 @@ if ($group_id && (forge_check_perm('project_admin', $group_id))) {
 		/*
 			Change Skill level, experience etc.
 		*/
-		if ($skill_level_id==100 || $skill_year_id==100  || !$job_id || !$job_inventory_id) {
+		if ($skill_level_id == 'xzxz' || $skill_year_id == 'xzxz'  || !$job_id || !$job_inventory_id) {
 			//required info
 			exit_missing_param('',array(_('Skill Level'),_('Skill Year'),_('Job'),_('Job Inventory')),'admin');
 		}
diff --git a/src/www/people/editprofile.php b/src/www/people/editprofile.php
index 33f6e56..d56e490 100644
--- a/src/www/people/editprofile.php
+++ b/src/www/people/editprofile.php
@@ -4,7 +4,7 @@
  *
  * Copyright 1999-2001 (c) VA Linux Systems
  * Copyright 2002 (c) Silicon and Software Systems (S3)
- * Copyright 2010 (c) Franck Villaume
+ * Copyright 2010-2014, Franck Villaume - TrivialDev
  * http://fusionforge.org/
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -48,7 +48,7 @@ if (session_loggedin()) {
 		}
 
 		$result=db_query_params('UPDATE users SET people_view_skills=$1
-WHERE user_id=$2', array($people_view_skills, user_getid()));
+					WHERE user_id=$2', array($people_view_skills, user_getid()));
 		if (!$result || db_affected_rows($result) < 1) {
 			form_release_key(getStringFromRequest("form_key"));
 			$error_msg .= sprintf(_('User update failed: %s'),db_error());
@@ -81,18 +81,19 @@ WHERE user_id=$2', array($people_view_skills, user_getid()));
 
 
 			$result = db_query_params("SELECT * from skills_data where user_id = $1
-				   AND type=$2
-				   AND title=$3
-				   AND start=$4
-				   AND finish=$5
-				   AND keywords=$6",
+						AND type=$2
+						AND title=$3
+						AND start=$4
+						AND finish=$5
+						AND keywords=$6",
 					 array(user_getid(), $type, $title, $start, $finish, $keywords));
 
 			if (db_numrows($result) >= 1) {
 				$feedback .= '';	/* don't tell them anything! */
 			} else {
-				$result = db_query_params("INSERT into skills_data (user_id, type, title, start, finish, keywords) values
-($1, $2, $3, $4, $5, $6)",array(user_getid(), $type, $title, $start, $finish, $keywords));
+				$result = db_query_params("INSERT into skills_data (user_id, type, title, start, finish, keywords)
+									values ($1, $2, $3, $4, $5, $6)",
+									array(user_getid(), $type, $title, $start, $finish, $keywords));
 
 				if (!$result || db_affected_rows($result) < 1) {
 					form_release_key(getStringFromRequest("form_key"));
@@ -141,7 +142,7 @@ WHERE user_id=$2', array($people_view_skills, user_getid()));
 						$error_msg = sprintf(_('Failed to update skills: %s'),db_error());
 						break;
 					} else {
-						$feedback = ngettext ('Skill updated', 'Skills updated', db_affected_rows($result));
+						$feedback = ngettext (_('Skill updated'), _('Skills updated'), db_affected_rows($result));
 					}
 				}   /* end for */
 
@@ -185,7 +186,7 @@ WHERE user_id=$2', array($people_view_skills, user_getid()));
 				if (!$result || db_affected_rows($result) < 1) {
 					$error_msg .= sprintf(_('Failed to delete any skills: %s'),db_error());
 				} else {
-					$feedback = ngettext ('Skill deleted successfully', 'Skills deleted successfully', db_affected_rows($result));
+					$feedback = ngettext (_('Skill deleted successfully'), _('Skills deleted successfully'), db_affected_rows($result));
 				}
 			} else {
 				$result = db_query_params ('SELECT title FROM skills_data where skills_data_id = ANY ($1)',
@@ -197,7 +198,7 @@ WHERE user_id=$2', array($people_view_skills, user_getid()));
 					people_header(array('title'=>_('Confirm skill delete')));
 
 					echo '<span class="important">'._('Confirm Delete').'</span>';
-					print ngettext('You are about to delete the following skill from the skills database:', 'You are about to delete the following skills from the skills database:', $rows) ;
+					print ngettext(_('You are about to delete the following skill from the skills database:'), _('You are about to delete the following skills from the skills database:'), $rows) ;
 					echo "<br />";
 					for($i = 0; $i < $rows; $i++) {
 						echo "<strong>   " .db_result($result, $i, 'title') . "</strong><br />";
@@ -282,32 +283,32 @@ WHERE user_id=$2', array($people_view_skills, user_getid()));
 				$HTML->multiTableRow('',$cell_data,TRUE);
 
 		echo	"<tr>
-<td>".html_build_select_box($skills, "type", 1, false, "")."</td>
-<td>".html_build_select_box_from_arrays($monthArrayVals,$monthArray, "startM", date("m"), false, "").
-						html_build_select_box_from_arrays($yearArray,$yearArray, "startY", 0, false, "")."</td>
-<td>".html_build_select_box_from_arrays($monthArrayVals,$monthArray, "endM", date("m"), false, "").
-						html_build_select_box_from_arrays($yearArray,$yearArray, "endY", 0, false, "")."</td>
-</tr>
-</table>
-<table>";
-
-				$cell_data = array();
-				$cell_data[] = array(_('Title (max 100 characters)'));
-				echo $HTML->multiTableRow('',$cell_data,TRUE);
-
-				echo "<tr>
-<td><input type=text name=\"title\" size=100></td>
-</tr>";
-				$cell_data = array();
-				$cell_data[] = array(_('Keywords (max 255 characters)'));
-				echo $HTML->multiTableRow('',$cell_data,TRUE);
-				echo "<tr>
-<td><textarea name=\"keywords\" rows=\"3\" cols=\"85\" wrap=\"soft\"></textarea></td>
-</tr>
-<tr>
-<td><input type=submit name=\"AddSkill\" value=\""._('Add This Skill')."\"></td>
-</tr>
-</table>";
+				<td>".html_build_select_box($skills, "type", 1, false, "")."</td>
+				<td>".html_build_select_box_from_arrays($monthArrayVals,$monthArray, "startM", date("m"), false, "").
+										html_build_select_box_from_arrays($yearArray,$yearArray, "startY", 0, false, "")."</td>
+				<td>".html_build_select_box_from_arrays($monthArrayVals,$monthArray, "endM", date("m"), false, "").
+										html_build_select_box_from_arrays($yearArray,$yearArray, "endY", 0, false, "")."</td>
+			</tr>
+			</table>
+			<table>";
+
+		$cell_data = array();
+		$cell_data[] = array(_('Title (max 100 characters)'));
+		echo $HTML->multiTableRow('',$cell_data,TRUE);
+
+		echo '<tr>
+			<td><input type="text" name="title" size="100" /></td>
+			</tr>';
+		$cell_data = array();
+		$cell_data[] = array(_('Keywords (max 255 characters)'));
+		echo $HTML->multiTableRow('',$cell_data,TRUE);
+		echo '<tr>
+				<td><textarea name="keywords" rows="3" cols="85" wrap="soft"></textarea></td>
+			</tr>
+			<tr>
+				<td><input type="submit" name="AddSkill" value="'._('Add This Skill').'" /></td>
+			</tr>
+			</table>';
 
 		echo '</form>';
 
diff --git a/src/www/people/helpwanted-latest.php b/src/www/people/helpwanted-latest.php
index e5cbda6..050b3c4 100644
--- a/src/www/people/helpwanted-latest.php
+++ b/src/www/people/helpwanted-latest.php
@@ -35,18 +35,14 @@ $job_id = getIntFromRequest('job_id');
 
 people_header(array('title'=>_('Help Wanted Latest Posts')));
 
-{
-        echo '<p>';
-
-	$result=db_query_params('SELECT people_job.group_id,people_job.job_id,groups.group_name,groups.unix_group_name,people_job.title,people_job.post_date,people_job_category.name AS category_name
-FROM people_job,people_job_category,groups
-WHERE people_job.group_id=groups.group_id
-AND people_job.category_id=people_job_category.category_id
-AND people_job.status_id=1
-ORDER BY post_date DESC',
-array(),30);
-        echo people_show_job_list($result) . '</p>';
-
-}
+echo '<p>';
+$result=db_query_params('SELECT people_job.group_id,people_job.job_id,groups.group_name,groups.unix_group_name,people_job.title,people_job.post_date,people_job_category.name AS category_name
+			FROM people_job,people_job_category,groups
+			WHERE people_job.group_id=groups.group_id
+			AND people_job.category_id=people_job_category.category_id
+			AND people_job.status_id=1
+			ORDER BY post_date DESC',
+			array(),30);
+echo people_show_job_list($result) . '</p>';
 
 people_footer();
diff --git a/src/www/people/index.php b/src/www/people/index.php
index 01aae0a..fdeceec 100644
--- a/src/www/people/index.php
+++ b/src/www/people/index.php
@@ -54,7 +54,7 @@ if ($group_id) {
 
 	echo '
 		<p>'._('Click job titles for more detailed descriptions.').'</p>
-';
+	';
 	echo people_show_category_jobs($category_id);
 
 } else {
@@ -86,11 +86,11 @@ if ($group_id) {
 	echo '<h2>'._('Last posts').'</h2>';
 
 	$result=db_query_params('SELECT people_job.group_id,people_job.job_id,groups.group_name,groups.unix_group_name,people_job.title,people_job.post_date,people_job_category.name AS category_name
-FROM people_job,people_job_category,groups
-WHERE people_job.group_id=groups.group_id
-AND people_job.category_id=people_job_category.category_id
-AND people_job.status_id=1
-ORDER BY post_date DESC', array(), 5);
+				FROM people_job,people_job_category,groups
+				WHERE people_job.group_id=groups.group_id
+				AND people_job.category_id=people_job_category.category_id
+				AND people_job.status_id=1
+				ORDER BY post_date DESC', array(), 5);
         echo people_show_job_list($result);
         echo '<p><a href="helpwanted-latest.php">['._('more latest posts').']</a></p>';
 
diff --git a/src/www/people/people_utils.php b/src/www/people/people_utils.php
index 108827b..a517256 100644
--- a/src/www/people/people_utils.php
+++ b/src/www/people/people_utils.php
@@ -49,16 +49,16 @@ function people_footer($params = array()) {
 	$HTML->footer($params);
 }
 
-function people_skill_box($name='skill_id') {
+function people_skill_box($name='skill_id',$checked='xzxz') {
 	global $PEOPLE_SKILL;
 	if (!$PEOPLE_SKILL) {
 		//will be used many times potentially on a single page
 		$PEOPLE_SKILL=db_query_params("SELECT * FROM people_skill ORDER BY name ASC", array());
 	}
-	return html_build_select_box($PEOPLE_SKILL,$name,'xzxz',false);
+	return html_build_select_box($PEOPLE_SKILL,$name,$checked,false);
 }
 
-function people_skill_level_box($name='skill_level_id',$checked='xyxy') {
+function people_skill_level_box($name='skill_level_id',$checked='xzxz') {
 	global $PEOPLE_SKILL_LEVEL;
 	if (!$PEOPLE_SKILL_LEVEL) {
 		//will be used many times potentially on a single page
@@ -67,7 +67,7 @@ function people_skill_level_box($name='skill_level_id',$checked='xyxy') {
 	return html_build_select_box($PEOPLE_SKILL_LEVEL,$name,$checked, false);
 }
 
-function people_skill_year_box($name='skill_year_id',$checked='xyxy') {
+function people_skill_year_box($name='skill_year_id',$checked='xzxz') {
 	global $PEOPLE_SKILL_YEAR;
 	if (!$PEOPLE_SKILL_YEAR) {
 		//will be used many times potentially on a single page
@@ -76,12 +76,12 @@ function people_skill_year_box($name='skill_year_id',$checked='xyxy') {
 	return html_build_select_box ($PEOPLE_SKILL_YEAR,$name,$checked, false);
 }
 
-function people_job_status_box($name='status_id',$checked='xyxy') {
+function people_job_status_box($name='status_id',$checked='xzxz') {
 	$result=db_query_params("SELECT * FROM people_job_status", array());
 	return html_build_select_box ($result,$name,$checked);
 }
 
-function people_job_category_box($name='category_id',$checked='xyxy') {
+function people_job_category_box($name='category_id',$checked='xzxz') {
 	$result=db_query_params("SELECT category_id,name FROM people_job_category WHERE private_flag=0", array());
 	return html_build_select_box($result, $name, $checked, false);
 }
@@ -91,7 +91,7 @@ function people_add_to_skill_inventory($skill_id,$skill_level_id,$skill_year_id)
 	global $error_msg;
 	if (session_loggedin()) {
 		// check required fields
-		if (!$skill_id || $skill_id == "xyxy") {
+		if (!$skill_id || $skill_id == 'xzxz') {
 			$feedback .= _('Must select a skill ID');
 		} else {
 		//check if they've already added this skill
@@ -111,17 +111,17 @@ VALUES ($1, $2, $3, $4)", array(user_getid() ,$skill_id, $skill_level_id, $skill
 		}
 		}
 	} else {
-		echo '<p class="error">You must be logged in first</p>';
+		echo '<p class="error">'._('You must be logged in first').'</p>';
 	}
 }
 
 function people_show_skill_inventory($user_id) {
 	$result = db_query_params("SELECT people_skill.name AS skill_name, people_skill_level.name AS level_name, people_skill_year.name AS year_name
-FROM people_skill_year,people_skill_level,people_skill,people_skill_inventory
-WHERE people_skill_year.skill_year_id=people_skill_inventory.skill_year_id
-AND people_skill_level.skill_level_id=people_skill_inventory.skill_level_id
-AND people_skill.skill_id=people_skill_inventory.skill_id
-AND people_skill_inventory.user_id=$1", array($user_id));
+				FROM people_skill_year,people_skill_level,people_skill,people_skill_inventory
+				WHERE people_skill_year.skill_year_id=people_skill_inventory.skill_year_id
+				AND people_skill_level.skill_level_id=people_skill_inventory.skill_level_id
+				AND people_skill.skill_id=people_skill_inventory.skill_id
+				AND people_skill_inventory.user_id=$1", array($user_id));
 
 	$title_arr=array();
 	$title_arr[]=_('Skill');
@@ -207,7 +207,8 @@ function people_add_to_job_inventory($job_id,$skill_id,$skill_level_id,$skill_ye
 		if (!$result || db_numrows($result) < 1) {
 			// job is not yet in this inventory
 			$result=db_query_params('INSERT INTO people_job_inventory (job_id,skill_id,skill_level_id,skill_year_id)
-VALUES ($1, $2, $3, $4)', array($job_id, $skill_id, $skill_level_id, $skill_year_id));
+							VALUES ($1, $2, $3, $4)',
+							array($job_id, $skill_id, $skill_level_id, $skill_year_id));
 			if (!$result || db_affected_rows($result) < 1) {
 				$error_msg .= _('Error inserting into job inventory: ');
 				$error_msg .= db_error();
@@ -217,7 +218,7 @@ VALUES ($1, $2, $3, $4)', array($job_id, $skill_id, $skill_level_id, $skill_year
 				return true;
 			}
 		} else {
-			$error_msg .= _('Error: job already in your inventory');
+			$error_msg .= _('Error: Skill already in your inventory.');
 			return false;
 		}
 
diff --git a/src/www/people/skills_utils.php b/src/www/people/skills_utils.php
index d0bee9b..80b74b2 100644
--- a/src/www/people/skills_utils.php
+++ b/src/www/people/skills_utils.php
@@ -3,6 +3,7 @@
  * Skills support functions.
  *
  * Copyright 2002 (c) Silicon and Software Systems (S3)
+ * Copyright 2014, Franck Villaume - TrivialDev
  * http://fusionforge.org/
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -36,14 +37,14 @@ function displayUserSkills($user_id, $allowEdit) {
 	$rows = db_numrows($result);
 	if (!$result || $rows < 1) {
 		echo db_error();
-		$feedback = 'No skills listed ';
-		echo '<tr><td>This user has not entered any skills.</td></tr>';
+		$feedback = _('No skills listed.');
+		echo '<tr><td>'._('This user has not entered any skills.').'</td></tr>';
 	} else {
 
 		echo '<tr class="tableheading">';				 /* headings for the columns */
 		if($allowEdit) {
 			echo '<td>'._('Edit').'</td>'.
-				 '<td>'._('Delete').'</td>';
+				'<td>'._('Delete').'</td>';
 		}
 		echo '<td>'._('Type').'</td>'.
 			 '<td>'._('Title').'</td>'.
@@ -163,7 +164,6 @@ function handle_multi_edit($skill_ids = array()) {
 					'</tr>'.
 				'</table>'.
 				'</td></tr>'.
-
 				'<tr '.$HTML->boxGetAltRowStyle($i+1).'><td>'.
 				'<table>'.
 					'<tr class="tableheading">'.
@@ -179,7 +179,6 @@ function handle_multi_edit($skill_ids = array()) {
 					'<tr>'.
 						'<td><textarea name="keywords[]" rows="3" cols="85">'.db_result($result, $i,'keywords').'</textarea></td>'.
 					'</tr>'.
-
 				 '</table>';
 			echo '</td></tr>';
 			echo '</table><br />';
diff --git a/src/www/people/viewjob.php b/src/www/people/viewjob.php
index bbe907f..64585dd 100644
--- a/src/www/people/viewjob.php
+++ b/src/www/people/viewjob.php
@@ -41,15 +41,15 @@ if ($group_id && $job_id) {
 
 	//for security, include group_id
 	$result=db_query_params("SELECT groups.group_name,people_job_category.name AS category_name,
-people_job_status.name AS status_name,people_job.title,
-people_job.description,people_job.post_date,users.user_name,users.user_id
-FROM people_job,groups,people_job_status,people_job_category,users
-WHERE people_job_category.category_id=people_job.category_id
-AND people_job_status.status_id=people_job.status_id
-AND users.user_id=people_job.created_by
-AND groups.group_id=people_job.group_id
-AND people_job.job_id=$1 AND people_job.group_id=$2",
-array($job_id, $group_id));
+				people_job_status.name AS status_name,people_job.title,
+				people_job.description,people_job.post_date,users.user_name,users.user_id
+				FROM people_job,groups,people_job_status,people_job_category,users
+				WHERE people_job_category.category_id=people_job.category_id
+				AND people_job_status.status_id=people_job.status_id
+				AND users.user_id=people_job.created_by
+				AND groups.group_id=people_job.group_id
+				AND people_job.job_id=$1 AND people_job.group_id=$2",
+				array($job_id, $group_id));
 	if (!$result || db_numrows($result) < 1) {
 		$error_msg .= _('Posting fetch failed: No such posting for this project:').db_error();
 		people_header(array('title'=>_('View a Job')));

-----------------------------------------------------------------------

Summary of changes:
 src/www/people/createjob.php         |    3 +-
 src/www/people/editjob.php           |    8 ++--
 src/www/people/editprofile.php       |   77 +++++++++++++++++-----------------
 src/www/people/helpwanted-latest.php |   22 ++++------
 src/www/people/index.php             |   12 +++---
 src/www/people/people_utils.php      |   31 +++++++-------
 src/www/people/skills_utils.php      |    9 ++--
 src/www/people/viewjob.php           |   18 ++++----
 8 files changed, 89 insertions(+), 91 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list