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 d84d3b88b316056284558e1e5151643cc8f92154 (commit)
via 606c90909369249abcc1a40e0b665346a441eccd (commit)
from 4eed63ec91d0b6301bf924d76efca357abe1d9bf (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 -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=d84d3b88b316056284558e1e5151643cc8f92154
commit d84d3b88b316056284558e1e5151643cc8f92154
Author: Marc-Etienne Vargenau <[email protected]>
Date: Wed Jul 12 16:38:12 2017 +0200
Coding style for braces
diff --git a/src/common/import/import_users.php
b/src/common/import/import_users.php
index febf34d..d5e19bf 100644
--- a/src/common/import/import_users.php
+++ b/src/common/import/import_users.php
@@ -93,13 +93,13 @@ global $cache_frs;
//$cache_frs=array();
/*
-function get_role_by_name($role,$group_id){
+function get_role_by_name($role,$group_id) {
$role_id = FALSE;
$res = db_query_params('SELECT role_id
FROM role
WHERE group_id=$1 AND role_name=$2',
array($group_id, $role));
//TODO:Cleanup, there must be a function to catch only one result
- while ($row=db_fetch_array($res)){
+ while ($row=db_fetch_array($res)) {
$role_id=$row['role_id'];
}
return $role_id;
@@ -107,20 +107,19 @@ function get_role_by_name($role,$group_id){
*/
/*
-function check_roles(&$roles, $group_id){
+function check_roles(&$roles, $group_id) {
$rolestodelete = array();
$res = db_query_params('SELECT role_id,role_name
FROM role
WHERE group_id=$1', array($group_id));
- while ($row_roles=db_fetch_array($res)){
+ while ($row_roles=db_fetch_array($res)) {
$res_roles[]=array($row_roles['role_name'],$row_roles['role_id']);
}
- foreach($res_roles as $nameid){
- if(isset($roles[$nameid[0]])){
+ foreach($res_roles as $nameid) {
+ if(isset($roles[$nameid[0]])) {
$roles[$nameid[0]]["role_id"]=$nameid[1];
- }
- else{
+ } else {
$rolestodelete[]=$nameid[1];
}
}
@@ -128,103 +127,101 @@ function check_roles(&$roles, $group_id){
}
*/
/*
-function get_forum_id($forumname,$group_id,$i){
+function get_forum_id($forumname,$group_id,$i) {
$forum_id=-1;
- if(array_key_exists($forumname,$cache_forums)){
+ if(array_key_exists($forumname,$cache_forums)) {
$cache_forums[$forumname][1]=1;
$forum_id = $cache_forums[$forumname];
}
else {
$res = db_query_params('SELECT group_forum_id,forum_name
FROM forum_group_list WHERE
group_id=$1', array($group_id));
- while ($row=db_fetch_array($res)){
- if ($row['forum_name']==$forumname){
+ while ($row=db_fetch_array($res)) {
+ if ($row['forum_name']==$forumname) {
$cache_forums[$row['forum_name']]=array($row['group_forum_id'],1);
$forum_id = $row['group_forum_id'];
}
- else{
+ else {
$cache_forums[$row['forum_name']]=array($row['group_forum_id'],0);
}
}
}
- if($forum_id==-1){
+ if($forum_id==-1) {
//TODO:Create forum
}
return $forum_id;
}
*/
/*
-function get_tasks_id($taskname,$group_id,$i){
+function get_tasks_id($taskname,$group_id,$i) {
$task_id=-1;
- if(array_key_exists($taskname,$cache_tasks)){
+ if(array_key_exists($taskname,$cache_tasks)) {
$cache_tasks[$taskname][1]=1;
$task_id = $cache_tasks[$taskname][0];
}
else {
$res = db_query_params('SELECT group_project_id,project_name
FROM project_group_list WHERE
group_id=$1', array($group_id));
- while ($row=db_fetch_array($res)){
- if ($row['project_name']==$taskname){
+ while ($row=db_fetch_array($res)) {
+ if ($row['project_name']==$taskname) {
$cache_tasks[$row['project_name']]=array($row['group_project_id'],1);
$task_id = $row['group_project_id'];
}
- else{
+ else {
$cache_forums[$row['project_name']]=array($row['group_project_id'],0);
}
}
}
- if ($task_id==-1){
+ if ($task_id==-1) {
//TODO:Create Task tracker
}
return $task_id;
}
*/
/*
-function get_tracker_id($trackername,$group_id,$i){
+function get_tracker_id($trackername,$group_id,$i) {
$tracker_id=-1;
- if(array_key_exists($trackername,$cache_trackers)){
+ if(array_key_exists($trackername,$cache_trackers)) {
$cache_trackers[$trackername][1]=1;
$tracker_id = $cache_trackers[$trackername][0];
}
else {
$res = db_query_params('SELECT group_artifact_id,name
FROM artifact_group_list WHERE group_id=$1',
array($group_id));
- while ($row=db_fetch_array($res)){
- if ($row['name']==$trackername){
+ while ($row=db_fetch_array($res)) {
+ if ($row['name']==$trackername) {
$cache_trackers[$row['name']]=array($row['group_artifact_id'],1);
$tracker_id = $row['group_artifact_id'];
- }
- else{
+ } else {
$cache_trackers[$row['name']]=array($row['group_artifact_id'],0);
}
}
}
- if ($tracker_id==-1){
+ if ($tracker_id==-1) {
//TODO:Create Tracker
}
return $tracker_id;
}
*/
/*
-function get_frs_id($frsname, $group_id){
+function get_frs_id($frsname, $group_id) {
$frs_id=-1;
- if(array_key_exists($trackername,$cache_frs)){
+ if(array_key_exists($trackername,$cache_frs)) {
$cache_frs[$frsname][1]=1;
$frs_id = $cache_frs[$frsname][0];
}
else {
$res = db_query_param('SELECT package_id,name
FROM frs_package WHERE group_id=$1',
array($group_id));
- while ($row=db_fetch_array($res)){
- if ($row['name']==$frsname){
+ while ($row=db_fetch_array($res)) {
+ if ($row['name']==$frsname) {
$cache_frs[$row['name']]=array($row['package_id'],1);
$frs_id = $row['package_id'];
- }
- else{
+ } else {
$cache_frs[$row['name']]=array($row['package_id'],0);
}
}
@@ -234,7 +231,7 @@ function get_frs_id($frsname, $group_id){
}
*/
/*
-function role_update($group_id, $rolename, $role_id, $data){
+function role_update($group_id, $rolename, $role_id, $data) {
if ($role_id=='observer') {
@@ -251,8 +248,7 @@ function role_update($group_id, $rolename, $role_id, $data){
$feedback = _('Successfully Updated Role');
}
- }
- else{
+ } else {
echo "update de : ".$role_id." ".$rolename."<br>";
$role = new Role(group_get_object($group_id),$role_id);
if (!$role || !is_object($role)) {
@@ -270,7 +266,7 @@ function role_update($group_id, $rolename, $role_id, $data){
}
*/
-//function role_create($group_id, $rolename, $data){
+//function role_create($group_id, $rolename, $data) {
// $role = new Role(group_get_object($group_id),false);
// if (!$role || !is_object($role)) {
// exit_error('Error',_('Could Not Get Role'));
@@ -294,82 +290,70 @@ function role_update($group_id, $rolename, $role_id,
$data){
// }
//}
/* TODO : reactivate or get rid, depending if still of any use
-function role_fill($roles,$group_id, $equivs_text_value,$equivs_name_value,
$observer_equivs_text_value, $observer_equivs_name_value ){
+function role_fill($roles,$group_id, $equivs_text_value,$equivs_name_value,
$observer_equivs_text_value, $observer_equivs_name_value) {
// $debugdata=array();
- foreach($roles as $rolename => $rights){
+ foreach($roles as $rolename => $rights) {
$data = array(array());
$i=0;
- if($rolename=='Observer'){
+ if($rolename=='Observer') {
$j=0;
- foreach($rights as $rightname => $right){
- if(substr($rightname, 0, 6)=='Forum:'){
- if(substr($rightname,6, 9)=='AnonPost:'){
+ foreach($rights as $rightname => $right) {
+ if(substr($rightname, 0, 6)=='Forum:') {
+ if(substr($rightname,6, 9)=='AnonPost:') {
$forum_id = get_forum_id(substr($rightname, 15),$group_id,$j);
$data['forumanon'][$forum_id]=$observer_equivs_text_value['forumanon'][$right];
- }
- else{
+ } else {
$forum_id = get_forum_id(substr($rightname, 6),$group_id,$j);
$data['forumpublic'][$forum_id]=$observer_equivs_text_value['forumpublic'][$right];
}
- }
- elseif(substr($rightname, 0, 8)=='Tracker:'){
- if(substr($rightname,8, 9)=='AnonPost:'){
+ } elseif(substr($rightname, 0, 8)=='Tracker:') {
+ if(substr($rightname,8, 9)=='AnonPost:') {
$tracker_id = get_tracker_id(substr($rightname, 17),$group_id, $j);
$data['trackeranon'][$tracker_id]=$observer_equivs_text_value['trackeranon'][$right];
- }
- else{
+ } else {
$tracker_id = get_tracker_id(substr($rightname, 6), $group_id, $j);
$data['trackerpublic'][$tracker_id]=$observer_equivs_text_value['trackerpublic'][$right];
}
- }
- elseif(substr($rightname, 0, 6)=='Tasks:'){
+ } elseif(substr($rightname, 0, 6)=='Tasks:') {
$tasks_id = get_tasks_id(substr($rightname, 6),$group_id,$j);
$data['pmpublic'][$tasks_id]=$observer_equivs_text_value['pmpublic'][$right];
- }
- elseif(substr($rightname, 0, 6)=='Files:'){
+ } elseif(substr($rightname, 0, 6)=='Files:') {
$frs_id = get_frs_id(substr($rightname, 6),$group_id);
$data['frspackage'][$frs_id]=$observer_equivs_text_value['frspackage'][$right];
- }
- elseif($rightname!='role_id'){
+ } elseif($rightname!='role_id') {
$data[$observer_equivs_name_value[$rightname]][0]=$observer_equivs_text_value[$observer_equivs_name_value[$rightname]][$right];
}
$j++;
}
- if(array_key_exists("role_id", $rights)){
+ if(array_key_exists("role_id", $rights)) {
role_update($group_id, $rolename, $rights['role_id'], $data);
- }
- else{
+ } else {
role_create($group_id, $rolename, $data);
}
// $debugdata[]=array($rolename,$data);
- }
- else{
+ } else {
- foreach($rights as $rightname => $right){
- if(substr($rightname, 0, 6)=='Forum:'){
+ foreach($rights as $rightname => $right) {
+ if(substr($rightname, 0, 6)=='Forum:') {
$forum_id = get_forum_id(substr($rightname, 6),$group_id,$i);
$data['forum'][(int)
$forum_id]=$equivs_text_value['forum'][(string)$right];
- }
- elseif(substr($rightname, 0, 8)=='Tracker:'){
+ } elseif(substr($rightname, 0, 8)=='Tracker:') {
$tracker_id = get_tracker_id(substr($rightname, 8),$group_id,$i);
$data['tracker'][$tracker_id]=$equivs_text_value['tracker'][$right];
- }
- elseif(substr($rightname, 0, 6)=='Tasks:'){
+ } elseif(substr($rightname, 0, 6)=='Tasks:') {
$tasks_id = get_tasks_id(substr($rightname, 6),$group_id,$i);
$data['pm'][$tasks_id]=$equivs_text_value['pm'][$right];
- }
- elseif($rightname!='role_id'){
+ } elseif($rightname!='role_id') {
$data[$equivs_name_value[$rightname]][0]=$equivs_text_value[$equivs_name_value[$rightname]][$right];
}
$i++;
}
- if(array_key_exists("role_id", $rights)){
+ if(array_key_exists("role_id", $rights)) {
role_update($group_id, $rolename, $rights['role_id'], $data);
- }
- else{
+ } else {
role_create($group_id,$rolename, $data);
}
// $debugdata[]=array($rolename,$data);
@@ -385,7 +369,7 @@ function role_fill($roles,$group_id,
$equivs_text_value,$equivs_name_value, $obs
* @param int $group_id group to insert users into
* @param bool $check
*/
-function user_fill($users, $group_id, $check=false){
+function user_fill($users, $group_id, $check=false) {
global $feedback;
global $message;
@@ -396,7 +380,7 @@ function user_fill($users, $group_id, $check=false){
exit_error('Error',$group->getErrorMessage());
}
- foreach ($users as $user => $role){
+ foreach ($users as $user => $role) {
$user_object = user_get_object_by_name($user);
if (!$user_object) {
$feedback .= sprintf(_('Failed to find user %s'),
$user);
diff --git a/src/common/include/escapingUtils.php
b/src/common/include/escapingUtils.php
index 0517df6..ca76520 100644
--- a/src/common/include/escapingUtils.php
+++ b/src/common/include/escapingUtils.php
@@ -203,11 +203,9 @@ function _getIntFromArray( $array, $key, $defaultValue =
0) {
if(isset($array[$key]) && is_numeric($array[$key]) &&
$array[$key] <= 2147483647 && $array[$key] >= -2147483648 ) {
return (int) $array[$key];
- }
- elseif(is_numeric($defaultValue)) {
+ } elseif(is_numeric($defaultValue)) {
return (int) $defaultValue;
- }
- else {
+ } else {
return 0;
}
}
diff --git a/src/common/tracker/Roadmap.class.php
b/src/common/tracker/Roadmap.class.php
index b8e3bbf..353417b 100644
--- a/src/common/tracker/Roadmap.class.php
+++ b/src/common/tracker/Roadmap.class.php
@@ -382,8 +382,7 @@ class Roadmap extends FFError {
}
}
$this->data_array = $this->getList();
- }
- elseif (isset($this->roadmap_id) && $this->roadmap_id) {
+ } elseif (isset($this->roadmap_id) && $this->roadmap_id) {
$result = db_query_params ('SELECT * FROM roadmap WHERE
roadmap_id=$1',
array ($this->roadmap_id));
if (! $result) {
@@ -467,14 +466,11 @@ class Roadmap extends FFError {
private function _setList($artifact_type_id, $field_id) {
if (! $field_id) {
$result = $this->_deleteList($artifact_type_id);
- }
- elseif (array_key_exists($artifact_type_id, $this->data_array))
{
+ } elseif (array_key_exists($artifact_type_id,
$this->data_array)) {
$result = $this->_updateList($artifact_type_id,
$field_id);
- }
- else {
+ } else {
$result = $this->_insertList($artifact_type_id,
$field_id);
}
-
return $result;
}
diff --git a/src/common/tracker/actions/tracker.php
b/src/common/tracker/actions/tracker.php
index 4566fa3..226bc5d 100644
--- a/src/common/tracker/actions/tracker.php
+++ b/src/common/tracker/actions/tracker.php
@@ -446,11 +446,11 @@ switch (getStringFromRequest('func')) {
} elseif ($ah->isError()) {
exit_error($ah->getErrorMessage(),'tracker');
} else {
- if ($start && $ah->isMonitoring())
+ if ($start && $ah->isMonitoring()) {
$feedback = _('Monitoring Started');
- elseif ($stop && !$ah->isMonitoring())
+ } elseif ($stop && !$ah->isMonitoring()) {
$feedback = _('Monitoring Stopped');
- else {
+ } else {
$ah->setMonitor();
}
include $gfcommon.'tracker/actions/browse.php';
@@ -462,11 +462,11 @@ switch (getStringFromRequest('func')) {
} elseif ($at->isError()) {
exit_error($at->getErrorMessage(),'tracker');
} else {
- if ($start && $at->isMonitoring())
+ if ($start && $at->isMonitoring()) {
$feedback = _('Monitoring Started');
- elseif ($stop && !$at->isMonitoring())
+ } elseif ($stop && !$at->isMonitoring()) {
$feedback = _('Monitoring Deactivated');
- else {
+ } else {
$at->setMonitor();
$at->clearError();
}
diff --git a/src/www/export/rss20_tracker.php b/src/www/export/rss20_tracker.php
index 2479cc9..7ab1ffc 100644
--- a/src/www/export/rss20_tracker.php
+++ b/src/www/export/rss20_tracker.php
@@ -46,8 +46,7 @@ if
(isset($_GET['group_id'])&&!empty($_GET['group_id'])&&is_numeric($_GET['group
} elseif ($group->isError()) {
beginFeed();
endOnError($group->getErrorMessage());
- }
- elseif (!$group->isPublic()){
+ } elseif (!$group->isPublic()){
beginFeed();
endOnError('No RSS feed available as group status is set to
private.');
}
diff --git a/src/www/pm/task.php b/src/www/pm/task.php
index e76eb2b..f995530 100644
--- a/src/www/pm/task.php
+++ b/src/www/pm/task.php
@@ -284,8 +284,7 @@ switch (getStringFromRequest('func')) {
}
if ($count == 0) {
$warning_msg = _('No task selected');
- }
- elseif (isset($was_error) && !$was_error) {
+ } elseif (isset($was_error) && !$was_error) {
$feedback = _('Task Updated Successfully');
}
include $gfwww.'pm/browse_task.php';
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=606c90909369249abcc1a40e0b665346a441eccd
commit 606c90909369249abcc1a40e0b665346a441eccd
Author: Marc-Etienne Vargenau <[email protected]>
Date: Wed Jul 12 16:37:29 2017 +0200
Add alt for image
diff --git a/src/www/tracker/roadmap.php b/src/www/tracker/roadmap.php
index a25ca7f..da0ab95 100644
--- a/src/www/tracker/roadmap.php
+++ b/src/www/tracker/roadmap.php
@@ -126,8 +126,7 @@ function nrange($col1, $col2, $nb) {
function color_gradient($colors, $nb_colors) {
if (! is_array($colors)) {
return array();
- }
- elseif (count($colors) < 2 || $nb_colors <= 2) {
+ } elseif (count($colors) < 2 || $nb_colors <= 2) {
return $colors;
}
@@ -368,8 +367,7 @@ if (!$at_arr || count($at_arr) < 1) {
// Icon
if ($artifact->getStatusID() == 1) {
$icon =
html_image('ic/ticket-open.png','','',array('alt' => $custom_status_name,
'title' => $custom_status_name));
- }
- else {
+ } else {
$icon =
html_image('ic/ticket-closed.png','','',array('alt' => $custom_status_name,
'title' => $custom_status_name));
}
$rmap[$release_value_id][$artifact_type_name] .=
sprintf($templates[$template]['ticket_icon'], $icon);
@@ -475,7 +473,7 @@ if (!$at_arr || count($at_arr) < 1) {
$roadmap_name._(': '),
util_make_uri('/tracker/roadmap.php?group_id='.$group_id.'&roadmap_id='.$roadmap_id.'&release='.urlencode($release_value)),
$release_value,
- '
'.html_image("ic/file-txt.png",'','',array("title"=>_('Display as text'),
"onclick"=>"getReleaseTxt('".addslashes($release_value)."')")));
+ '
'.html_image("ic/file-txt.png",'','',array("alt"=>_('Display as text'),
"title"=>_('Display as text'),
"onclick"=>"getReleaseTxt('".addslashes($release_value)."')")));
// Graph
if ($display_graph && $templates[$template]['display_graph']) {
-----------------------------------------------------------------------
Summary of changes:
src/common/import/import_users.php | 132 +++++++++++++++------------------
src/common/include/escapingUtils.php | 6 +-
src/common/tracker/Roadmap.class.php | 10 +--
src/common/tracker/actions/tracker.php | 12 +--
src/www/export/rss20_tracker.php | 3 +-
src/www/pm/task.php | 3 +-
src/www/tracker/roadmap.php | 8 +-
7 files changed, 74 insertions(+), 100 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits