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 97f12cd2cc274e51d47eaf891cc98383c1ba0811 (commit)
from a56db75110f765fbaaa73b081dc561fd6c0250ba (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=97f12cd2cc274e51d47eaf891cc98383c1ba0811
commit 97f12cd2cc274e51d47eaf891cc98383c1ba0811
Author: Marc-Etienne Vargenau <[email protected]>
Date: Tue May 23 14:27:06 2017 +0200
coding style
diff --git a/src/common/dao/include/DataAccessResult.class.php
b/src/common/dao/include/DataAccessResult.class.php
index 8c0c014..5c1af9c 100644
--- a/src/common/dao/include/DataAccessResult.class.php
+++ b/src/common/dao/include/DataAccessResult.class.php
@@ -52,10 +52,11 @@ class DataAccessResult implements Iterator {
*/
function isError() {
$error=db_error();
- if (!empty($error))
+ if (!empty($error)) {
return $error;
- else
+ } else {
return false;
+ }
}
// {{{ Iterator
diff --git a/src/common/include/Plugin.class.php
b/src/common/include/Plugin.class.php
index f772eeb..b0efb64 100644
--- a/src/common/include/Plugin.class.php
+++ b/src/common/include/Plugin.class.php
@@ -78,10 +78,11 @@ class Plugin extends FFError {
* @return string the directory where the plugin should be linked.
*/
function getInstallDir() {
- if (isset($this->installdir) && $this->installdir)
+ if (isset($this->installdir) && $this->installdir) {
return $this->installdir;
- else
+ } else {
return 'plugins/'.$this->name;
+ }
}
/**
@@ -101,10 +102,11 @@ class Plugin extends FFError {
* @return string the directory where the plugin should be linked.
*/
function getPluginPath() {
- if (isset($this->installdir) && $this->installdir)
+ if (isset($this->installdir) && $this->installdir) {
return $this->installdir;
- else
+ } else {
return 'plugins/'.$this->name;
+ }
}
/**
diff --git a/src/common/include/pre.php b/src/common/include/pre.php
index 8d51364..0671922 100644
--- a/src/common/include/pre.php
+++ b/src/common/include/pre.php
@@ -122,10 +122,11 @@ if (forge_get_config('use_ssl')) {
forge_define_config_item ('installation_environment', 'core', 'production') ;
$installation_environment = forge_get_config ('installation_environment') ;
-if ($installation_environment == 'development' || $installation_environment ==
'integration')
+if ($installation_environment == 'development' || $installation_environment ==
'integration') {
$default_sysdebug_enable = 'true';
-else
+} else {
$default_sysdebug_enable = 'false';
+}
forge_define_config_item ('sysdebug_enable', 'core', $default_sysdebug_enable)
;
forge_set_config_item_bool ('sysdebug_enable', 'core') ;
forge_define_config_item ('sysdebug_phphandler', 'core', 'true') ;
diff --git a/src/common/mail/Mail.class.php b/src/common/mail/Mail.class.php
index ba40e0b..40400b9 100644
--- a/src/common/mail/Mail.class.php
+++ b/src/common/mail/Mail.class.php
@@ -160,10 +160,11 @@ class Mail {
function setTo($to, $raw = false) {
- if ($raw)
+ if ($raw) {
$this->_to = $to;
- else
+ } else {
$this->_to = $this->_validateRecipient($to);
+ }
}
function getTo() {
@@ -174,10 +175,11 @@ class Mail {
}
function setBcc($bcc, $raw = false) {
- if ($raw)
+ if ($raw) {
$this->_bcc = $bcc;
- else
+ } else {
$this->_bcc = $this->_validateRecipient($bcc);
+ }
if (forge_get_config('bcc_all_emails') != '') {
$this->addBcc(forge_get_config('bcc_all_emails'));
@@ -200,10 +202,11 @@ class Mail {
}
function setCc($cc, $raw = false) {
- if($raw)
+ if($raw) {
$this->_cc = $cc;
- else
+ } else {
$this->_cc = $this->_validateRecipient($cc);
+ }
}
function getCc() {
diff --git a/src/common/tracker/Artifact.class.php
b/src/common/tracker/Artifact.class.php
index 98c4dcd..46b586d 100644
--- a/src/common/tracker/Artifact.class.php
+++ b/src/common/tracker/Artifact.class.php
@@ -1385,29 +1385,24 @@ class Artifact extends FFObject {
if (!array_key_exists($efid, $extra_fields)) {
if ($type ==
ARTIFACT_EXTRAFIELDTYPE_STATUS) {
$this->setError(_('Status
Custom Field Must Be Set'));
- }
- else {
+ } else {
$this->setMissingParamsError($ef[$efid]['field_name']);
}
return false;
- }
- else {
+ } else {
if ($extra_fields[$efid] === '') {
if ($type ==
ARTIFACT_EXTRAFIELDTYPE_STATUS) {
$this->setError(_('Status Custom Field Must Be Set'));
- }
- else {
+ } else {
$this->setMissingParamsError($ef[$efid]['field_name']);
}
return false;
- }
- else {
+ } else {
if (($type ==
ARTIFACT_EXTRAFIELDTYPE_SELECT || $type == ARTIFACT_EXTRAFIELDTYPE_RADIO) &&
$extra_fields[$efid] ==
'100') {
$this->setMissingParamsError($ef[$efid]['field_name']);
return false;
- }
- elseif (($type ==
ARTIFACT_EXTRAFIELDTYPE_MULTISELECT || $type ==
ARTIFACT_EXTRAFIELDTYPE_CHECKBOX) &&
+ } elseif (($type ==
ARTIFACT_EXTRAFIELDTYPE_MULTISELECT || $type ==
ARTIFACT_EXTRAFIELDTYPE_CHECKBOX) &&
(count($extra_fields[$efid]) == 1 && $extra_fields[$efid][0] == '100')) {
$this->setMissingParamsError($ef[$efid]['field_name']);
return false;
diff --git a/src/common/tracker/ArtifactFactory.class.php
b/src/common/tracker/ArtifactFactory.class.php
index ca93930..1a320ce 100644
--- a/src/common/tracker/ArtifactFactory.class.php
+++ b/src/common/tracker/ArtifactFactory.class.php
@@ -282,10 +282,11 @@ class ArtifactFactory extends FFError {
* @return int
*/
function getDefaultQuery() {
- if ($this->query_type == 'query')
+ if ($this->query_type == 'query') {
return $this->query_id;
- else
+ } else {
return '';
+ }
}
/**
diff --git a/src/common/tracker/include/ArtifactHtml.class.php
b/src/common/tracker/include/ArtifactHtml.class.php
index 2f3bbfc..b8eef85 100644
--- a/src/common/tracker/include/ArtifactHtml.class.php
+++ b/src/common/tracker/include/ArtifactHtml.class.php
@@ -166,10 +166,11 @@ function hide_edit_button(id) {
$return .=
user_getname(db_result($result, $i, 'old_value'));
} elseif ($field == 'close_date') {
- if (db_result($result, $i, 'old_value'))
+ if (db_result($result, $i,
'old_value')) {
$return .= date(_('Y-m-d
H:i'),db_result($result, $i, 'old_value'));
- else
+ } else {
$return .=
'<i>'._('None').'</i>';
+ }
} else {
$return .= db_result($result, $i,
'old_value');
diff --git a/src/common/widget/WidgetLayoutManager.class.php
b/src/common/widget/WidgetLayoutManager.class.php
index 4d98948..fe32fe0 100644
--- a/src/common/widget/WidgetLayoutManager.class.php
+++ b/src/common/widget/WidgetLayoutManager.class.php
@@ -183,8 +183,9 @@ class WidgetLayoutManager {
foreach($widgets as $widget) {
$sql .= ",($13, $14, 1, $15, $16, $17)";
}*/
- } else
+ } else {
$success = false;
+ }
if (!$success) {
$success = db_error();
db_rollback();
@@ -213,8 +214,9 @@ class WidgetLayoutManager {
break;
}
}
- } else
+ } else {
$success = false;
+ }
if (!$success) {
$success = db_error();
db_rollback();
diff --git a/src/common/widget/Widget_MySystasks.class.php
b/src/common/widget/Widget_MySystasks.class.php
index 90b8467..52c2dc6 100644
--- a/src/common/widget/Widget_MySystasks.class.php
+++ b/src/common/widget/Widget_MySystasks.class.php
@@ -82,10 +82,11 @@ class Widget_MySystasks extends Widget {
$cells = array();
$cells[][] = db_result($res,$i,'systask_id');
$plugin_name = db_result($res,$i,'plugin_name');
- if ($plugin_name == null)
+ if ($plugin_name == null) {
$cells[][] = 'core';
- else
+ } else {
$cells[][] = $plugin_name;
+ }
$cells[][] = db_result($res,$i,'systask_type');
$cells[][] = db_result($res,$i,'unix_group_name');
$cells[][] = db_result($res,$i,'status');
diff --git a/src/www/include/html.php b/src/www/include/html.php
index a7dce82..dc6e28e 100644
--- a/src/www/include/html.php
+++ b/src/www/include/html.php
@@ -1168,8 +1168,9 @@ function site_project_header($params) {
$next .=
'&return_to='.urlencode(getStringFromServer('REQUEST_URI'));
}
session_redirect($next);
- } else
+ } else {
exit_error(_('Project access problem')._(':
').$project->getErrorMessage(), 'home');
+ }
}
exit_error(_('Project Problem')._(':
').$project->getErrorMessage(), 'home');
}
diff --git a/src/www/include/trove.php b/src/www/include/trove.php
index d7dcc13..40b08ef 100644
--- a/src/www/include/trove.php
+++ b/src/www/include/trove.php
@@ -72,14 +72,15 @@ function trove_genfullpaths($mynode, $myfullpath,
$myfullpathids) {
*/
function trove_updaterootparent($mynode, $rootnode) {
// first generate own path
- if($mynode!=$rootnode) db_query_params('UPDATE trove_cat SET
root_parent=$1 WHERE trove_cat_id=$2',
- array
($rootnode,
-
$mynode));
- else db_query_params('UPDATE trove_cat SET root_parent=0 WHERE
trove_cat_id=$1',
+ if($mynode!=$rootnode) {
+ db_query_params('UPDATE trove_cat SET root_parent=$1 WHERE
trove_cat_id=$2',
+ array ($rootnode, $mynode));
+ } else {
+ db_query_params('UPDATE trove_cat SET root_parent=0 WHERE
trove_cat_id=$1',
array ($mynode));
+ }
// now generate paths for all children by recursive call
- if($mynode!=0)
- {
+ if($mynode!=0) {
$res_child = db_query_params('
SELECT trove_cat_id
FROM trove_cat
diff --git a/src/www/my/systasks.php b/src/www/my/systasks.php
index c8bb821..cca176f 100644
--- a/src/www/my/systasks.php
+++ b/src/www/my/systasks.php
@@ -81,10 +81,11 @@ for ($i=0; $i<db_numrows($res); $i++) {
$cells = array();
$cells[][] = db_result($res,$i,'systask_id');
$plugin_name = db_result($res,$i,'plugin_name');
- if ($plugin_name == null)
+ if ($plugin_name == null) {
$cells[][] = 'core';
- else
+ } else {
$cells[][] = $plugin_name;
+ }
$cells[][] = db_result($res,$i,'systask_type');
$cells[][] = db_result($res,$i,'unix_group_name');
$cells[][] = db_result($res,$i,'status');
diff --git a/src/www/pm/browse_task.php b/src/www/pm/browse_task.php
index a640042..d94339b 100644
--- a/src/www/pm/browse_task.php
+++ b/src/www/pm/browse_task.php
@@ -66,8 +66,9 @@ if (session_loggedin()) {
$paging = 25;
}
$LUSER->setPreference('paging', $paging);
- } else
+ } else {
$paging = $LUSER->getPreference('paging');
+ }
}
if(!isset($paging) || !$paging)
diff --git a/src/www/pm/t_lookup.php b/src/www/pm/t_lookup.php
index 0102881..7ea35b0 100644
--- a/src/www/pm/t_lookup.php
+++ b/src/www/pm/t_lookup.php
@@ -43,10 +43,11 @@ if (!$tinfo) {
$asuser = getStringFromRequest('asuser');
-if (getIntFromRequest('text'))
+if (getIntFromRequest('text')) {
$asformat = 'text/plain; charset="UTF-8"';
-else
+} else {
$asformat = 'application/json; charset="UTF-8"';
+}
$islogin = session_loggedin();
$isadmin = forge_check_global_perm ('forge_admin');
@@ -66,10 +67,11 @@ if ($ispublic) {
$asuser = session_get_user()->getUnixName();
}
- if (isUserAndTaskinSameGroup($tid, $asuser))
+ if (isUserAndTaskinSameGroup($tid, $asuser)) {
$showall = true;
- else
+ } else {
$showall = false;
+ }
} else {
$showall = false;
}
-----------------------------------------------------------------------
Summary of changes:
src/common/dao/include/DataAccessResult.class.php | 5 +++--
src/common/include/Plugin.class.php | 10 ++++++----
src/common/include/pre.php | 5 +++--
src/common/mail/Mail.class.php | 15 +++++++++------
src/common/tracker/Artifact.class.php | 15 +++++----------
src/common/tracker/ArtifactFactory.class.php | 5 +++--
src/common/tracker/include/ArtifactHtml.class.php | 5 +++--
src/common/widget/WidgetLayoutManager.class.php | 6 ++++--
src/common/widget/Widget_MySystasks.class.php | 5 +++--
src/www/include/html.php | 3 ++-
src/www/include/trove.php | 13 +++++++------
src/www/my/systasks.php | 5 +++--
src/www/pm/browse_task.php | 3 ++-
src/www/pm/t_lookup.php | 10 ++++++----
14 files changed, 59 insertions(+), 46 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits