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 7b56f136fca4a8c118849cb6f56645b7a4fe2911 (commit)
via ed916794714aeda4b18e7f046ca49128cfb43cac (commit)
via 2896ef5222e4f3e835a281edeaccd20d25b90b80 (commit)
via 4c56170caf21f2614804b1e176e50c374e46f76f (commit)
from 35f383beae92939abbb29a22ddd5e6ce06f4159a (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=7b56f136fca4a8c118849cb6f56645b7a4fe2911
commit 7b56f136fca4a8c118849cb6f56645b7a4fe2911
Author: Marc-Etienne Vargenau <[email protected]>
Date: Mon May 8 16:46:30 2017 +0200
PHP Doc
diff --git a/src/www/include/login-form.php b/src/www/include/login-form.php
index 17617d0..094058f 100644
--- a/src/www/include/login-form.php
+++ b/src/www/include/login-form.php
@@ -21,6 +21,12 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+/**
+ * validate_return_to()
+ *
+ * @param string $return_to
+ */
+
function validate_return_to(&$return_to = '/') {
$newrt = '/';
diff --git a/src/www/include/my_utils.php b/src/www/include/my_utils.php
index f49578a..447d546 100644
--- a/src/www/include/my_utils.php
+++ b/src/www/include/my_utils.php
@@ -23,27 +23,24 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/*
- Function that generates hide/show urls to expand/collapse
- sections of the personal page
-
-Input:
- $svc : service name to hide/show (sr, bug, pm...)
- $db_item_id : the item (group, forum, task sub-project,...) from the
- database that we are currently processing and about to display
- $item_id : the item_id as given in the URL and on which the show/hide switch
- is going to apply.
- $hide = hide param as given in the script URL (-1 means no param was given)
-
-Output:
- $hide_url: URL to use in the page to switch from hide to show or vice versa
- $count_diff: difference between the number of items in the list between now
and
- the previous last time the section was open (can be negative if items
were removed)
- $hide_flag: true if the section must be hidden, false otherwise
-
-*/
+/**
+ * my_hide_url() - Generate hide/show urls to expand/collapse sections of the
personal page
+ *
+ * @param string $svc service name to hide/show (sr, bug,
pm...)
+ * @param int $db_item_id the item (group, forum, task
sub-project,...) from the
+ * database that
we are currently processing and about to display
+ * @param int $item_id the item_id as given in the URL
and on which the show/hide switch
+ * is going to
apply
+ * @param int $count
+ * @param bool $hide hide param as given in the script URL
(-1 means no param was given)
+ * @return array
+ * $hide_url: URL to use in the page to switch from hide to show or vice versa
+ * $count_diff: difference between the number of items in the list between
now and
+ * the previous last time the section was open (can be negative if items
were removed)
+ * $hide_flag: true if the section must be hidden, false otherwise
+ */
-function my_hide_url ($svc, $db_item_id, $item_id, $count, $hide) {
+function my_hide_url($svc, $db_item_id, $item_id, $count, $hide) {
$pref_name = 'my_hide_'.$svc.$db_item_id;
$old_hide = $old_count = $old_pref_value =
UserManager::instance()->getCurrentUser()->getPreference($pref_name);
diff --git a/src/www/mail/mail_utils.php b/src/www/mail/mail_utils.php
index e68f965..432ee72 100644
--- a/src/www/mail/mail_utils.php
+++ b/src/www/mail/mail_utils.php
@@ -23,6 +23,11 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+/**
+ * mail_header() - Display header for mailing lists pages
+ *
+ * @param array $params
+ */
function mail_header($params) {
global $HTML, $group_id;
diff --git a/src/www/news/admin/news_admin_utils.php
b/src/www/news/admin/news_admin_utils.php
index ff6a40b..9bb297c 100644
--- a/src/www/news/admin/news_admin_utils.php
+++ b/src/www/news/admin/news_admin_utils.php
@@ -24,10 +24,15 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+/**
+ * show_news_approve_form() - Show list of waiting news items
+ *
+ * @param $qpa_pending
+ * @param $qpa_rejected
+ * @param $qpa_approved
+ * @param $form_url
+ */
function show_news_approve_form($qpa_pending, $qpa_rejected, $qpa_approved,
$form_url) {
- /*
- Show list of waiting news items
- */
global $HTML;
diff --git a/src/www/news/news_utils.php b/src/www/news/news_utils.php
index cecf258..5821db4 100644
--- a/src/www/news/news_utils.php
+++ b/src/www/news/news_utils.php
@@ -24,6 +24,12 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+/**
+ * news_header() - Display header for news pages
+ *
+ * @param array $params
+ */
+
function news_header($params) {
global $HTML, $group_id;
diff --git a/src/www/people/people_utils.php b/src/www/people/people_utils.php
index 58f2aa3..a5e25ff 100644
--- a/src/www/people/people_utils.php
+++ b/src/www/people/people_utils.php
@@ -25,6 +25,11 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+/**
+ * people_header() - Display header for people pages
+ *
+ * @param array $params
+ */
function people_header($params) {
global $group_id, $job_id, $HTML;
diff --git a/src/www/project/admin/project_admin_utils.php
b/src/www/project/admin/project_admin_utils.php
index d91db97..ea5bdaa 100644
--- a/src/www/project/admin/project_admin_utils.php
+++ b/src/www/project/admin/project_admin_utils.php
@@ -26,9 +26,11 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/*
- Standard header to be used on all /project/admin/* pages
-*/
+/**
+ * project_admin_header() - Standard header to be used on all /project/admin/*
pages
+ *
+ * @param array $params
+ */
function project_admin_header($params) {
global $group_id, $HTML;
diff --git a/src/www/project/stats/project_stats_utils.php
b/src/www/project/stats/project_stats_utils.php
index 69c2625..6d06ea1 100644
--- a/src/www/project/stats/project_stats_utils.php
+++ b/src/www/project/stats/project_stats_utils.php
@@ -22,6 +22,14 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+/**
+ * period2seconds()
+ *
+ * @param string $period_name
+ * @param int $span
+ * @return int
+ */
+
function period2seconds($period_name,$span) {
if (!$period_name || $period_name=="lifespan") {
return "";
diff --git a/src/www/scm/include/scm_utils.php
b/src/www/scm/include/scm_utils.php
index 0689ff0..2dd27b3 100644
--- a/src/www/scm/include/scm_utils.php
+++ b/src/www/scm/include/scm_utils.php
@@ -24,6 +24,11 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+/**
+ * scm_header() - Display header for SCM pages
+ *
+ * @param array $params
+ */
function scm_header($params) {
global $HTML;
if (!forge_get_config('use_scm')) {
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=ed916794714aeda4b18e7f046ca49128cfb43cac
commit ed916794714aeda4b18e7f046ca49128cfb43cac
Author: Marc-Etienne Vargenau <[email protected]>
Date: Mon May 8 16:45:49 2017 +0200
Valid HTML; PHP Doc; whitespace
diff --git a/src/www/survey/include/SurveyHTML.class.php
b/src/www/survey/include/SurveyHTML.class.php
index bdbd9e8..48d2310 100644
--- a/src/www/survey/include/SurveyHTML.class.php
+++ b/src/www/survey/include/SurveyHTML.class.php
@@ -34,7 +34,9 @@ require_once $gfwww.'include/note.php';
class SurveyHTML extends FFError {
/**
- * Show survey header
+ * header() - Show survey header
+ *
+ * @param array $params
*/
function header($params) {
global $group_id,$is_admin_page,$HTML;
@@ -88,14 +90,17 @@ class SurveyHTML extends FFError {
}
/**
- * Show Survey footer
+ * footer() - Show Survey footer
+ *
+ * @param array $params
*/
function footer($params = array()) {
site_project_footer($params);
}
/**
- * Show Add/Modify Question Forums
+ * showAddQuestionForm() - Show Add/Modify Question Forums
+ *
* @param Survey $q Question Question Object
* @return string
*/
@@ -140,7 +145,8 @@ class SurveyHTML extends FFError {
}
/**
- * Show Add/Modify Question Forums
+ * showAddSurveyForm() - Show Add/Modify Question Forums
+ *
* @param Survey $s Question Question Object
* @return string
*/
@@ -208,7 +214,7 @@ class SurveyHTML extends FFError {
$ret.= $HTML->listTableTop($title_arr);
}
- for($i = 0; $i < count($arr_to_add); $i++) {
+ for($i = 0; $i < count($arr_to_add); $i++) {
if ($arr_to_add[$i]->isError()) {
echo $arr_to_add[$i]->getErrorMessage();
@@ -247,7 +253,7 @@ class SurveyHTML extends FFError {
$ret.= $HTML->listTableTop ($title_arr);
}
- for($i = 0; $i < count($arr_to_del); $i++) {
+ for($i = 0; $i < count($arr_to_del); $i++) {
if ($arr_to_del[$i]->isError()) {
echo $arr_to_del[$i]->getErrorMessage();
continue;
@@ -281,8 +287,9 @@ class SurveyHTML extends FFError {
}
/**
- * Show list of questions
+ * showQuestions() - Show list of questions
*
+ * @param $questions
* @return string
*/
function showQuestions(&$questions) {
@@ -296,7 +303,7 @@ class SurveyHTML extends FFError {
$title_arr = array(_('Question ID'), _('Question'), _('Type'),
_('Edit/Delete'));
$ret.= $HTML->listTableTop($title_arr);
- for($i = 0; $i < count($questions); $i++) {
+ for($i = 0; $i < count($questions); $i++) {
if ($questions[$i]->isError()) {
echo $questions[$i]->getErrorMessage();
continue;
@@ -316,11 +323,22 @@ class SurveyHTML extends FFError {
}
/**
- * Show list of surveys
+ * showSurveys() - Show list of surveys with many options
*
- * Show surveys with many options
* have to set $user_id to get the right show_vote option
- *
+ * @param $surveys
+ * @param int $show_id
+ * @param int $show_questions
+ * @param int $show_number_questions
+ * @param int $show_number_votes
+ * @param int $show_vote
+ * @param int $show_edit
+ * @param int $show_result
+ * @param int $show_result_graph
+ * @param int $show_result_comment
+ * @param int $show_result_csv
+ * @param int $show_inactive
+ * @return string
*/
function showSurveys(&$surveys, $show_id=0, $show_questions=0,
$show_number_questions=0, $show_number_votes=0,
@@ -372,9 +390,7 @@ class SurveyHTML extends FFError {
$ret.= $HTML->listTableTop($title_arr);
- /* Color index for table */
- $color_index=0;
- for($i = 0; $i < count($surveys); $i++) {
+ for($i = 0; $i < count($surveys); $i++) {
if ($surveys[$i]->isError()) {
echo $surveys[$i]->getErrorMessage();
continue;
@@ -417,10 +433,8 @@ class SurveyHTML extends FFError {
$ret.=
'<td>['.util_make_link('/survey/admin/survey.php?group_id='.$group_id.'&survey_id='.
$surveys[$i]->getID(),_('Edit')).'] ';
/* We don't support delete yet. Need to delete
all results as well */
- /*
- $ret.= '['.util_make_link
('/survey/admin/survey.php?delete=Y&group_id='.$group_id.'&survey_id='.
$surveys[$i]->getID(),_('Delete')).']';
- */
- $ret.='</td>';
+ /* $ret.= '['.util_make_link
('/survey/admin/survey.php?delete=Y&group_id='.$group_id.'&survey_id='.
$surveys[$i]->getID(),_('Delete')).']'; */
+ $ret.='</td>';
}
if ($show_result) {
/* Edit/Delete Link */
@@ -428,7 +442,7 @@ class SurveyHTML extends FFError {
}
if ($show_result_graph) {
/* Edit/Delete Link */
- $ret.=
'<td>['.util_make_link('/survey/admin/show_results.php?graph=yes&group_id='.$group_id.'&survey_id='.
$surveys[$i]->getID(),_('Result with Graph')).']</td>';
+ $ret.=
'<td>['.util_make_link('/survey/admin/show_results.php?graph=yes&group_id='.$group_id.'&survey_id='.
$surveys[$i]->getID(),_('Result with Graph')).']</td>';
}
if ($show_result_comment) {
/* Edit/Delete Link */
@@ -449,8 +463,9 @@ class SurveyHTML extends FFError {
}
/**
- * Show survey form - Show all forums of Survey
+ * showSurveyForm - Show all forums of Survey
*
+ * @param $s
* @return string
*/
function showSurveyForm(&$s) {
@@ -477,7 +492,7 @@ class SurveyHTML extends FFError {
/* Keep question numbers */
$index = 1;
$last_question_type = "";
- for($i = 0; $i < count($questions); $i++) {
+ for($i = 0; $i < count($questions); $i++) {
if ($questions[$i]->isError()) {
echo $questions[$i]->getErrorMessage();
continue;
@@ -519,8 +534,7 @@ class SurveyHTML extends FFError {
$ret.= $question_title.'<br />';
$ret.='<textarea name="_'.$question_id.'"
rows="5" cols="60"></textarea>';
break;
- case 3: /* This is a Yes/No question.
- Show the Yes/No only if this is the first in a
series */
+ case 3: /* This is a Yes/No question. Show the Yes/No
only if this is the first in a series */
if ($question_type != $last_question_type) {
$ret.= '<strong>Yes / No</strong><br
/>';
}
@@ -554,12 +568,12 @@ class SurveyHTML extends FFError {
}
/**
- * Show survey Result
+ * showResult() - Show survey Result
*
* @param object $sr a Survey Response Factory
- * @param int $show_comment
+ * @param int $show_comment
* @param string $q_num
- * @param int $show_graph
+ * @param int $show_graph
* @return string
*/
function showResult(&$sr, $show_comment=0, $q_num="", $show_graph=0) {
@@ -593,7 +607,7 @@ class SurveyHTML extends FFError {
Show the 1-5 markers only if this is the first in a
series */
$arr_name=array('No Answer', 'Low 1', '2', '3', '4',
'High 5', 'No Answer');
$arr_color=array('black', 'red', 'blue', 'yellow',
'green', 'brown', 'black');
- $results[0] = $votes - $results[1] - $results[2] -
$results[3] - $results[4] - $results[5];
+ $results[0] = $votes - $results[1] - $results[2] -
$results[3] - $results[4] - $results[5];
if ($show_graph) {
for ($j=5; $j>=0; $j--) {
@@ -620,8 +634,8 @@ class SurveyHTML extends FFError {
$arr_color=array('', 'red', 'blue', 'black');
$res[1] = $results[1]; /* Yes */
- $res[2] = $results[5]; /* No */
- $res[3] = $votes - $res[1] -$res[2];
+ $res[2] = $results[5]; /* No */
+ $res[3] = $votes - $res[1] -$res[2];
if ($show_graph) {
for ($j=1; $j<=3; $j++) {
@@ -691,10 +705,10 @@ class SurveyHTML extends FFError {
}
/**
- * split_str - works as str_split of PHP5 - Converts a string to an
array.
+ * split_str - works as str_split of PHP5 - Converts a string to an
array.
*
* @param string $str
- * @param int $split_lengt length of chunk
+ * @param int $split_lengt length of chunk
* @return array array of chunks of the string
*/
function split_str($str, $split_lengt=1) {
@@ -709,15 +723,15 @@ class SurveyHTML extends FFError {
* _makeBar - make Precentage bar as a cell in a table. Starts with
<tr> and ends with </tr>
*
* @param string $name Name
- * @param int $percent Percentage of the name
+ * @param int $percent Percentage of the name
* @param string $color Color
* @return string
*/
function _makeBar($name, $percent, $color) {
- $ret = '<tr><td style=width: 30%">'.$name.'</td><td>';
- $ret.= '<table style=width: '.$percent.'%"><tr>';
+ $ret = '<tr><td style="width: 30%">'.$name.'</td><td>';
+ $ret.= '<table style="width: '.$percent.'%"><tr>';
if ($percent) {
- $ret.='<td style=width: 90%"
bgcolor="'.$color.'"> </td>';
+ $ret.='<td style="width: 90%"
bgcolor="'.$color.'"> </td>';
}
$ret.= '<td>'.sprintf("%.2f",
$percent).'%</td></tr></table></td></tr>'."\n";
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=2896ef5222e4f3e835a281edeaccd20d25b90b80
commit 2896ef5222e4f3e835a281edeaccd20d25b90b80
Author: Marc-Etienne Vargenau <[email protected]>
Date: Mon May 8 16:31:03 2017 +0200
PHP Doc; whitespace
diff --git a/src/www/stats/site_stats_utils.php
b/src/www/stats/site_stats_utils.php
index 580f9ae..7db3234 100644
--- a/src/www/stats/site_stats_utils.php
+++ b/src/www/stats/site_stats_utils.php
@@ -39,11 +39,11 @@ $allowed_orderby_vals = array('downloads',
'cvs_commits',
'cvs_adds');
-function stats_util_sum_array( $sum, $add ) {
+function stats_util_sum_array($sum, $add) {
if (!is_array($sum)) {
$sum = array();
}
- while( list( $key, $val ) = each( $add ) ) {
+ while(list($key, $val) = each($add)) {
if (!isset($sum[$key])) {
$sum[$key] = 0;
}
@@ -53,11 +53,13 @@ function stats_util_sum_array( $sum, $add ) {
}
/**
- * generates the trove list in a select box format.
- * contains the odd choices of "-2" and "-1" which mean "All projects
- * and "special project list" respectively
+ * stats_generate_trove_pulldown() - Generate the trove list in a select box
format.
+ * contains the odd choices of "-2" and "-1" which mean "All projects
+ * and "special project list" respectively
+ *
+ * @param int $selected_id
*/
-function stats_generate_trove_pulldown( $selected_id = 0 ) {
+function stats_generate_trove_pulldown($selected_id = 0) {
$res = db_query_params ('
SELECT trove_cat_id,fullpath
FROM trove_cat
@@ -71,10 +73,10 @@ function stats_generate_trove_pulldown( $selected_id = 0 ) {
<option value="-2">'._('All Projects').'</option>
<option value="-1">'._('Special Projects').'</option>';
- while ( $row = db_fetch_array($res) ) {
+ while ($row = db_fetch_array($res)) {
print '
<option value="' . $row['trove_cat_id'] . '"'
- . ( $selected_id == $row["trove_cat_id"] ? "
selected=\"selected\"" : "" )
+ . ($selected_id == $row["trove_cat_id"] ? "
selected=\"selected\"" : "")
. ">" . $row["fullpath"] . '</option>';
}
@@ -82,7 +84,7 @@ function stats_generate_trove_pulldown( $selected_id = 0 ) {
</select>';
}
-function stats_trove_cat_to_name( $trovecatid ) {
+function stats_trove_cat_to_name($trovecatid) {
$res = db_query_params ('
SELECT fullpath
@@ -90,14 +92,14 @@ function stats_trove_cat_to_name( $trovecatid ) {
WHERE trove_cat_id = $1',
array($trovecatid));
- if ( $row = db_fetch_array($res) ) {
+ if ($row = db_fetch_array($res)) {
return $row["fullpath"];
} else {
return sprintf(_(" (no category found with ID %d)"),
$trovecatid) ;
}
}
-function stats_generate_trove_grouplist( $trovecatid ) {
+function stats_generate_trove_grouplist($trovecatid) {
$results = array();
@@ -107,24 +109,24 @@ function stats_generate_trove_grouplist( $trovecatid ) {
WHERE trove_cat_id=$1',
array($trovecatid));
- print db_error( $res );
+ print db_error($res);
$i = 0;
- while ( $row = db_fetch_array($res) ) {
+ while ($row = db_fetch_array($res)) {
$results[$i++] = $row["group_id"];
}
return $results;
}
-function stats_site_projects_form( $report='last_30', $orderby = 'downloads',
$projects = 0, $trovecat = 0 ) {
+function stats_site_projects_form($report='last_30', $orderby = 'downloads',
$projects = 0, $trovecat = 0) {
global $allowed_orderby_vals ;
print '<form action="projects.php" method="get">' . "\n";
print '<table class="tableheading fullwidth">' . "\n";
print '<tr><td><strong>'._('Projects in trove
category:').'</strong></td><td>';
- stats_generate_trove_pulldown( $trovecat );
+ stats_generate_trove_pulldown($trovecat);
print '</td></tr>';
print '<tr><td><strong>'._('OR enter Special Project
List:').'</strong></td>';
@@ -147,7 +149,7 @@ function stats_site_projects_form( $report='last_30',
$orderby = 'downloads', $p
print '<tr><td><strong>'._('View by:').'</strong></td><td>';
- print html_build_select_box_from_arrays ( $allowed_orderby_vals,
$allowed_orderby_vals, "orderby", $orderby, false );
+ print html_build_select_box_from_arrays ($allowed_orderby_vals,
$allowed_orderby_vals, "orderby", $orderby, false);
print '</td></tr>';
print '<tr><td colspan="2" class="align-center"> <input type="submit"
value="'._('Generate Report').'" /> </td></tr>';
@@ -158,11 +160,14 @@ function stats_site_projects_form( $report='last_30',
$orderby = 'downloads', $p
}
/**
- * New function to separate out the SQL so it may be reused in other
- * potential reports.
- *
+ * stats_site_project_result() - separate out the SQL so it may be reused in
other potential reports.
+ * @param $report
+ * @param $orderby
+ * @param $projects
+ * @param $trove
+ * @return resource
*/
-function stats_site_project_result( $report, $orderby, $projects, $trove ) {
+function stats_site_project_result($report, $orderby, $projects, $trove) {
global $allowed_orderby_vals ;
if (!$orderby) {
@@ -212,13 +217,13 @@ ORDER BY ' . $order_clause,
}
}
-function stats_site_projects( $report, $orderby, $projects, $trove ) {
+function stats_site_projects($report, $orderby, $projects, $trove) {
$offset=0;
$trove_cat=0;
- $res=stats_site_project_result( $report, $orderby, $projects, $trove );
+ $res=stats_site_project_result($report, $orderby, $projects, $trove);
// if there are any rows, we have valid data (or close enough).
- if ( db_numrows( $res ) > 1 ) {
+ if (db_numrows($res) > 1) {
?>
<table class="fullwidth">
@@ -248,11 +253,11 @@ function stats_site_projects( $report, $orderby,
$projects, $trove ) {
// Build the query string to resort results.
$uri_string = "projects.php?report=" . $report;
- if ( $trove_cat > 0 ) {
+ if ($trove_cat > 0) {
$uri_string .= "&trovecatid=" . $trove_cat;
}
- if ( $trove_cat == -1 ) {
- $uri_string .= "&projects=" . urlencode( implode( "
", $projects) );
+ if ($trove_cat == -1) {
+ $uri_string .= "&projects=" . urlencode(implode("
", $projects));
}
$uri_string .= "&orderby=";
@@ -288,32 +293,32 @@ function stats_site_projects( $report, $orderby,
$projects, $trove ) {
<?php
$i = $offset;
- while ( $row = db_fetch_array($res) ) {
+ while ($row = db_fetch_array($res)) {
print '<tr style="text-align:right">'
. '<td>' . ($i + 1)." " . util_make_link
('/project/stats/?group_id='.$row["group_id"], $row["group_name"]) . '</td>'
- . '<td> ' . number_format(
$row["site_views"],0 ) . '</td>'
- . '<td> ' . number_format(
$row["subdomain_views"],0 ) . '</td>';
+ . '<td> ' .
number_format($row["site_views"],0) . '</td>'
+ . '<td> ' .
number_format($row["subdomain_views"],0) . '</td>';
if (forge_get_config('use_frs')) {
- print '<td> ' . number_format(
$row["downloads"],0 ) . '</td>';
+ print '<td> ' .
number_format($row["downloads"],0) . '</td>';
}
if (forge_get_config('use_tracker')) {
- print '<td> ' . number_format(
$row["bugs_opened"],0 ) . '</td>'
- . '<td> ' . number_format(
$row["bugs_closed"],0 ) . '</td>'
- . '<td> ' . number_format(
$row["support_opened"],0 ) . '</td>'
- . '<td> ' . number_format(
$row["support_closed"],0 ) . '</td>'
- . '<td> ' . number_format(
$row["patches_opened"],0 ) . '</td>'
- . '<td> ' . number_format(
$row["patches_closed"],0 ) . '</td>'
- . '<td> ' . number_format(
$row["artifacts_opened"],0 ) . '</td>'
- . '<td> ' . number_format(
$row["artifacts_closed"],0 ) . '</td>';
+ print '<td> ' .
number_format($row["bugs_opened"],0) . '</td>'
+ . '<td> ' .
number_format($row["bugs_closed"],0) . '</td>'
+ . '<td> ' .
number_format($row["support_opened"],0) . '</td>'
+ . '<td> ' .
number_format($row["support_closed"],0) . '</td>'
+ . '<td> ' .
number_format($row["patches_opened"],0) . '</td>'
+ . '<td> ' .
number_format($row["patches_closed"],0) . '</td>'
+ . '<td> ' .
number_format($row["artifacts_opened"],0) . '</td>'
+ . '<td> ' .
number_format($row["artifacts_closed"],0) . '</td>';
}
if (forge_get_config('use_pm')) {
- print '<td> ' . number_format(
$row["tasks_opened"],0 ) . '</td>'
- . '<td> ' . number_format(
$row["tasks_opened"],0 ) . '</td>';
+ print '<td> ' .
number_format($row["tasks_opened"],0) . '</td>'
+ . '<td> ' .
number_format($row["tasks_opened"],0) . '</td>';
}
if (forge_get_config('use_scm')) {
- print '<td> ' . number_format(
$row["cvs_checkouts"],0 ) . '</td>'
- . '<td> ' . number_format(
$row["cvs_commits"],0 ) . '</td>'
- . '<td> ' . number_format(
$row["cvs_adds"],0 ) . '</td>';
+ print '<td> ' .
number_format($row["cvs_checkouts"],0) . '</td>'
+ . '<td> ' .
number_format($row["cvs_commits"],0) . '</td>'
+ . '<td> ' .
number_format($row["cvs_adds"],0) . '</td>';
}
$hook_params = array();
$hook_params['group_id'] = $row["group_id"];
@@ -335,7 +340,7 @@ function stats_site_projects( $report, $orderby, $projects,
$trove ) {
?><?php
-function stats_site_projects_daily( $span ) {
+function stats_site_projects_daily($span) {
$i=0;
//
// We now only have 30 & 7-day views
@@ -348,7 +353,7 @@ function stats_site_projects_daily( $span ) {
echo db_error();
// if there are any weeks, we have valid data.
- if ( ($valid_days = db_numrows( $res )) >= 1 ) {
+ if (($valid_days = db_numrows($res)) >= 1) {
?>
<h2><?php printf(_('Statistics for the past %d days'),
$valid_days); ?></h2>
@@ -366,14 +371,14 @@ function stats_site_projects_daily( $span ) {
</tr>
<?php
- while ( $row = db_fetch_array($res) ) {
+ while ($row = db_fetch_array($res)) {
$i++;
print '<tr style="text-align:right">'
- . '<td>' . gmstrftime("%d %b %Y",
mktime(0,0,1,substr($row["month"],4,2),$row["day"],substr($row["month"],0,4)) )
. '</td>'
- . '<td>' . number_format(
$row["site_page_views"],0 ) . '</td>'
- . '<td>' . number_format(
$row["subdomain_views"],0 ) . '</td>'
- . '<td>' . number_format( $row["downloads"],0 )
. '</td>'
+ . '<td>' . gmstrftime("%d %b %Y",
mktime(0,0,1,substr($row["month"],4,2),$row["day"],substr($row["month"],0,4)))
. '</td>'
+ . '<td>' .
number_format($row["site_page_views"],0) . '</td>'
+ . '<td>' .
number_format($row["subdomain_views"],0) . '</td>'
+ . '<td>' . number_format($row["downloads"],0) .
'</td>'
. '<td> ' .
number_format($row["bugs_opened"],0) . " (" .
number_format($row["bugs_closed"],0) . ')</td>'
. '<td> ' .
number_format($row["support_opened"],0) . " (" .
number_format($row["support_closed"],0) . ')</td>'
. '<td> ' .
number_format($row["patches_opened"],0) . " (" .
number_format($row["patches_closed"],0) . ')</td>'
@@ -401,7 +406,7 @@ function stats_site_projects_monthly() {
echo db_error();
// if there are any weeks, we have valid data.
- if (($valid_months = db_numrows($res)) >= 1 ) {
+ if (($valid_months = db_numrows($res)) >= 1) {
?>
@@ -421,14 +426,14 @@ function stats_site_projects_monthly() {
</tr>
<?php
- while ( $row = db_fetch_array($res) ) {
+ while ($row = db_fetch_array($res)) {
$i++;
print '<tr style="text-align:right">'
. '<td>' . $row['month'] . '</td>'
- . '<td>' . number_format(
$row["site_page_views"],0 ) . '</td>'
- . '<td>' . number_format(
$row["subdomain_views"],0 ) . '</td>'
- . '<td>' . number_format( $row["downloads"],0 )
. '</td>'
+ . '<td>' .
number_format($row["site_page_views"],0) . '</td>'
+ . '<td>' .
number_format($row["subdomain_views"],0) . '</td>'
+ . '<td>' . number_format($row["downloads"],0) .
'</td>'
. '<td> ' .
number_format($row["bugs_opened"],0) . " (" .
number_format($row["bugs_closed"],0) . ')</td>'
. '<td> ' .
number_format($row["support_opened"],0) . " (" .
number_format($row["support_closed"],0) . ')</td>'
. '<td> ' .
number_format($row["patches_opened"],0) . " (" .
number_format($row["patches_closed"],0) . ')</td>'
@@ -447,7 +452,7 @@ function stats_site_projects_monthly() {
}
}
-function stats_site_aggregate( ) {
+function stats_site_aggregate() {
$res = db_query_params ('SELECT * FROM stats_site_all_vw',
array ());
$site_totals = db_fetch_array($res);
@@ -473,11 +478,11 @@ function stats_site_aggregate( ) {
</tr>
<tr>
- <td><?php echo number_format( $site_totals["site_page_views"],0
); ?></td>
- <td><?php echo number_format( $site_totals["subdomain_views"],0
); ?></td>
- <td><?php echo number_format( $site_totals["downloads"],0 );
?></td>
- <td><?php echo number_format( $users["count"],0 ); ?></td>
- <td><?php echo number_format( $groups["count"],0 ); ?></td>
+ <td><?php echo
number_format($site_totals["site_page_views"],0); ?></td>
+ <td><?php echo
number_format($site_totals["subdomain_views"],0); ?></td>
+ <td><?php echo number_format($site_totals["downloads"],0);
?></td>
+ <td><?php echo number_format($users["count"],0); ?></td>
+ <td><?php echo number_format($groups["count"],0); ?></td>
</tr>
</table>
@@ -499,7 +504,7 @@ function views_graph($monthly = 0) {
$beg_day =
date('d',mktime(0,0,0,(date('m')-1),date('d'),date('Y')));
$res = db_query_params ('SELECT month,day,site_page_views AS
site_views,subdomain_views
FROM stats_site_vw
- ( month = $1 AND day >= $2 ) OR ( month > $3 )
+ (month = $1 AND day >= $2) OR (month > $3)
ORDER BY month ASC, day ASC',
array ("$beg_year$beg_month",
$beg_day,
@@ -509,7 +514,7 @@ function views_graph($monthly = 0) {
$i = 0;
$xlabel = array();
$ydata = array();
- while ( $row = db_fetch_array($res) ) {
+ while ($row = db_fetch_array($res)) {
$xlabel[$i] = $row['month'] . ((isset($row['day'])) ? "/" .
$row['day'] : '');
$ydata[$i] = $row['site_views'] + $row['subdomain_views'];
++$i;
@@ -590,7 +595,7 @@ function users_graph() {
$label[1] = _('New projects');
$monthStartArr = $report->getMonthStartArr();
$monthStartArrFormat = $report->getMonthStartArrFormat();
- while ( $row = db_fetch_array($res) ) {
+ while ($row = db_fetch_array($res)) {
$xlabel[$i] = $row['month'];
$ydata[0][$i] = $row['new_users'];
$ydata[1][$i] = $row['new_projects'];
diff --git a/src/www/trove/include/utils.php b/src/www/trove/include/utils.php
index e071f27..9d2931e 100644
--- a/src/www/trove/include/utils.php
+++ b/src/www/trove/include/utils.php
@@ -21,10 +21,16 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+/**
+ * getLanguageSelectionPopup()
+ *
+ * @param array $alreadyDefined
+ * @return string
+ */
function getLanguageSelectionPopup($alreadyDefined = array()) {
- $res = db_query_params ('SELECT * FROM supported_languages WHERE
language_id <> ALL ($1) ORDER BY name ASC',
- array (db_int_array_to_any_clause
($alreadyDefined)));
- return html_build_select_box ($res, 'language_id', 'xzxz', false);
+ $res = db_query_params('SELECT * FROM supported_languages WHERE
language_id <> ALL ($1) ORDER BY name ASC',
+ array(db_int_array_to_any_clause
($alreadyDefined)));
+ return html_build_select_box($res, 'language_id', 'xzxz', false);
}
function getFilterUrl($filterArray, $currentId = 0) {
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=4c56170caf21f2614804b1e176e50c374e46f76f
commit 4c56170caf21f2614804b1e176e50c374e46f76f
Author: Marc-Etienne Vargenau <[email protected]>
Date: Mon May 8 16:27:48 2017 +0200
Valid HTML; PHP Doc
diff --git a/src/www/people/skills_utils.php b/src/www/people/skills_utils.php
index de04e09..e39676a 100644
--- a/src/www/people/skills_utils.php
+++ b/src/www/people/skills_utils.php
@@ -22,6 +22,13 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+/**
+ * displayUserSkills()
+ *
+ * @param int $user_id
+ * @param bool $allowEdit
+ */
+
function displayUserSkills($user_id, $allowEdit) {
global $HTML, $feedback;
$result=db_query_params("SELECT * FROM skills_data_types ORDER BY
type_id ASC", array());
@@ -120,7 +127,7 @@ function handle_multi_edit($skill_ids = array()) {
$skills=db_query_params("SELECT * FROM skills_data_types WHERE
type_id > 0", array());
if (!$skills || db_numrows($skills) < 1) {
$feedback .= _('No Such User')._(': ').db_error();
- echo '<h2>'._('No Such User').'<h2>';
+ echo '<h2>'._('No Such User').'</h2>';
}
$yearArray = array();
-----------------------------------------------------------------------
Summary of changes:
src/www/include/login-form.php | 6 ++
src/www/include/my_utils.php | 37 ++++---
src/www/mail/mail_utils.php | 5 +
src/www/news/admin/news_admin_utils.php | 11 ++-
src/www/news/news_utils.php | 6 ++
src/www/people/people_utils.php | 5 +
src/www/people/skills_utils.php | 9 +-
src/www/project/admin/project_admin_utils.php | 8 +-
src/www/project/stats/project_stats_utils.php | 8 ++
src/www/scm/include/scm_utils.php | 5 +
src/www/stats/site_stats_utils.php | 133 +++++++++++++-------------
src/www/survey/include/SurveyHTML.class.php | 84 +++++++++-------
src/www/trove/include/utils.php | 12 ++-
13 files changed, 200 insertions(+), 129 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits