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 feccb3ba1d2242ed5953f2f63682b9754a35dff2 (commit) from c02bad48152ca6295e325bb8046578dbd49e1bc1 (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=feccb3ba1d2242ed5953f2f63682b9754a35dff2 commit feccb3ba1d2242ed5953f2f63682b9754a35dff2 Author: Franck Villaume <franck.villa...@trivialdev.com> Date: Wed May 19 12:35:23 2021 +0200 clean-up: fix PHP syntax, curly braces, double parenthesis diff --git a/src/plugins/oauthconsumer/www/response.php b/src/plugins/oauthconsumer/www/response.php index d29e26d..922f010 100644 --- a/src/plugins/oauthconsumer/www/response.php +++ b/src/plugins/oauthconsumer/www/response.php @@ -17,7 +17,7 @@ $access_token = OAuthAccessToken::get_access_token($f_token_id); $resource = new OAuthResource($f_resource_url, $access_token->get_provider_id(), $f_http_method); $provider = OAuthProvider::get_provider($access_token->get_provider_id()); -if (substr($f_resource_url, -5, 5)==".json" { +if (substr($f_resource_url, -5, 5) == ".json") { $f_post_data = json_decode($f_post_data, TRUE); } $transaction = new OAuthTransaction($provider, $access_token, $resource, $f_post_data); diff --git a/src/www/admin/pluginman.php b/src/www/admin/pluginman.php index d3e1547..d7d143f 100644 --- a/src/www/admin/pluginman.php +++ b/src/www/admin/pluginman.php @@ -45,7 +45,7 @@ $pm = plugin_manager_get_object(); if (getStringFromRequest('update')) { $pluginname = getStringFromRequest('update'); - if ((getStringFromRequest('action') == 'deactivate')) { + if (getStringFromRequest('action') == 'deactivate') { $res = db_query_params('DELETE FROM user_plugin WHERE plugin_id = (SELECT plugin_id FROM plugins WHERE plugin_name = $1)', array($pluginname)); diff --git a/src/www/forum/attachment.php b/src/www/forum/attachment.php index fc1a4a7..c5ff5d7 100644 --- a/src/www/forum/attachment.php +++ b/src/www/forum/attachment.php @@ -80,10 +80,10 @@ if ($delete == "yes") { } else { $res = false; } - if ( (!$res) ) { + if (!$res) { exit_error("Attachment Download error: ".db_error(),'forums'); } - if (! ((db_result($res,0,'userid') == user_getid()) || (forge_check_perm('forum_admin', $f->Group->getID()))) ) { + if (! ((db_result($res,0,'userid') == user_getid()) || forge_check_perm('forum_admin', $f->Group->getID())) ) { goodbye(_('You cannot delete this attachment')); } else { if (!$pending) { @@ -114,7 +114,7 @@ if ($edit == "yes") { if ( (!$res) || (!$res2) ) { exit_error("Attachment error:".db_error(), 'forums'); } - if (! ((db_result($res2, 0, 'posted_by') == user_getid()) || (forge_check_perm('forum_admin', $f->Group->getID())))) { + if (! ((db_result($res2, 0, 'posted_by') == user_getid()) || forge_check_perm('forum_admin', $f->Group->getID())) ) { goodbye(_('You cannot edit this attachment')); } else { if ($doedit=="1") { diff --git a/src/www/scm/viewvc.php b/src/www/scm/viewvc.php index 21f2d1d..fbb0f3e 100644 --- a/src/www/scm/viewvc.php +++ b/src/www/scm/viewvc.php @@ -91,10 +91,11 @@ if (!forge_check_perm('scm', $Group->getID(), 'read')) { $unix_name = $Group->getUnixName(); $u = session_get_user(); if ($external_scm && !$Group->usesPlugin('scmcvs')) { - if ($Group->enableAnonSCM()) + if ($Group->enableAnonSCM()) { $server_script = '/anonscm/viewvc'; - else + } else { $server_script = '/authscm/'.$u->getUnixName().'/viewvc'; + } // pass the parameters passed to this script to the remote script in the same fashion $protocol = forge_get_config('use_ssl', 'scmsvn')? 'https://' : 'http://'; $pathinfo = (isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : '/'); @@ -148,9 +149,10 @@ if (count($exploded_content) > 1) { $headers = explode("\r\n", $headers); $content_type = ''; $charset = ''; - if ($external_scm) + if ($external_scm) { // Strip "HTTP/1.1 200 OK" initial status line array_shift($headers); + } foreach ($headers as $header) { if (preg_match('/^Content-Type:\s*(([^;]*)(\s*;\s*charset=(.*))?)/i', $header, $matches)) { $content_type = $matches[2]; @@ -178,9 +180,9 @@ switch ($_GET['view']) { $sysdebug_enable = false; // Force content-type for any text/* or */javascript, to avoid XSS if (!empty($content_type)) { - if ((preg_match('/text\/.*/', $content_type) || - preg_match('/.*\/javascript/', $content_type))) + if (preg_match('/text\/.*/', $content_type) || preg_match('/.*\/javascript/', $content_type)) { $content_type = 'text/plain'; + } header("Content-Type: $content_type" . (!empty($charset) ? ";charset=$charset" : '')); } @@ -199,8 +201,3 @@ switch ($_GET['view']) { scm_footer(array('inframe'=>1)); break; } - -// Local Variables: -// mode: php -// c-file-style: "bsd" -// End: diff --git a/src/www/widgets/updatelayout.php b/src/www/widgets/updatelayout.php index dd3bf2a..e9b5bb0 100644 --- a/src/www/widgets/updatelayout.php +++ b/src/www/widgets/updatelayout.php @@ -66,7 +66,7 @@ if ($owner) { $_REQUEST['group_id'] = $_GET['group_id'] = $at->Group->getID(); $redirect = '/tracker/?group_id='.$at->Group->getID().'&atid='.$at->getID(); $func = getStringFromRequest('func'); - if ((strlen($func) > 0)) { + if (strlen($func) > 0) { $redirect .= '&func='.$func; $aid = getIntFromRequest('aid'); if ($aid) { diff --git a/src/www/widgets/widget.php b/src/www/widgets/widget.php index 785923c..e416a05 100644 --- a/src/www/widgets/widget.php +++ b/src/www/widgets/widget.php @@ -56,7 +56,7 @@ switch($owner_type) { $_REQUEST['group_id'] = $_GET['group_id'] = $at->Group->getID(); // why ? $redirect = '/tracker/?group_id='.$at->Group->getID().'&atid='.$at->getID(); $func = getStringFromRequest('func'); - if ((strlen($func) > 0)) { + if (strlen($func) > 0) { $redirect .= '&func='.$func; $aid = getStringFromRequest('aid'); if (strlen($aid) > 0) { ----------------------------------------------------------------------- Summary of changes: src/plugins/oauthconsumer/www/response.php | 2 +- src/www/admin/pluginman.php | 2 +- src/www/forum/attachment.php | 6 +++--- src/www/scm/viewvc.php | 17 +++++++---------- src/www/widgets/updatelayout.php | 2 +- src/www/widgets/widget.php | 2 +- 6 files changed, 14 insertions(+), 17 deletions(-) hooks/post-receive -- FusionForge _______________________________________________ Fusionforge-commits mailing list Fusionforge-commits@lists.fusionforge.org http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits