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 2d4afbe20e8aeced226ab3e0418a629fc43c4dbd (commit)
via 4f7545ad0b109d38fbf777b1573687756ce1b91e (commit)
from 81a53ef139a913138e45b18ab4dbcf750141473a (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=2d4afbe20e8aeced226ab3e0418a629fc43c4dbd
commit 2d4afbe20e8aeced226ab3e0418a629fc43c4dbd
Author: Franck Villaume <[email protected]>
Date: Tue Jun 7 10:46:06 2016 +0200
utils.php: less code
diff --git a/src/common/include/utils.php b/src/common/include/utils.php
index ce3136b..9811a2c 100644
--- a/src/common/include/utils.php
+++ b/src/common/include/utils.php
@@ -358,15 +358,12 @@ function util_unconvert_htmlspecialchars($string) {
*
*/
function util_result_columns_to_assoc($result, $col_key = 0, $col_val = 1) {
+ $arr = array();
$rows = db_numrows($result);
if ($rows > 0) {
- $arr = array();
for ($i = 0; $i < $rows; $i++) {
$arr[db_result($result, $i, $col_key)] =
db_result($result, $i, $col_val);
- }
- } else {
- $arr = array();
}
return $arr;
}
@@ -380,19 +377,12 @@ function util_result_columns_to_assoc($result, $col_key =
0, $col_val = 1) {
*
*/
function &util_result_column_to_array($result, $col = 0) {
- /*
- Takes a result set and turns the optional column into
- an array
- */
+ $arr = array();
$rows = db_numrows($result);
if ($rows > 0) {
- $arr = array();
for ($i = 0; $i < $rows; $i++) {
$arr[$i] = db_result($result, $i, $col);
- }
- } else {
- $arr = array();
}
return $arr;
}
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=4f7545ad0b109d38fbf777b1573687756ce1b91e
commit 4f7545ad0b109d38fbf777b1573687756ce1b91e
Author: Franck Villaume <[email protected]>
Date: Tue Jun 7 10:43:31 2016 +0200
code style
diff --git a/src/common/include/utils.php b/src/common/include/utils.php
index 06e8272..ce3136b 100644
--- a/src/common/include/utils.php
+++ b/src/common/include/utils.php
@@ -944,8 +944,7 @@ function normalized_urlprefix() {
function util_url_prefix($prefix = '') {
if ($prefix == 'http' || $prefix == 'https' ) {
return $prefix . '://';
- }
- else {
+ } else {
if (forge_get_config('use_ssl')) {
return "https://";
} else {
-----------------------------------------------------------------------
Summary of changes:
src/common/include/utils.php | 17 +++--------------
1 file changed, 3 insertions(+), 14 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits