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  7d934e0d552ba576c6a604f89454ff2b32afab1c (commit)
       via  bdf756fef4e928da04dde42bcc066ba3bf036209 (commit)
       via  4c3d690f1213a9ec13e776e97d6785831d885e87 (commit)
       via  a99e86246ade0d8b85cad48e283031e6b964be6a (commit)
      from  e705e917add65adf0a3549edf7e1198a7ebf5a24 (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=7d934e0d552ba576c6a604f89454ff2b32afab1c

commit 7d934e0d552ba576c6a604f89454ff2b32afab1c
Author: Franck Villaume <[email protected]>
Date:   Thu Dec 29 17:21:51 2016 +0100

    clean-up: remove useless vars, use class to align th and td content

diff --git a/src/www/forum/myforums.php b/src/www/forum/myforums.php
index 7d54450..dd594a3 100644
--- a/src/www/forum/myforums.php
+++ b/src/www/forum/myforums.php
@@ -68,7 +68,8 @@ if (count($monitoredForumsIdsArray) < 1) {
        exit;
 }
 
-echo $HTML->listTableTop(array(_('Project'),_('Forum'), _('Threads'), 
_('Posts'), _('Last Post'), _('New Content?')));
+echo $HTML->listTableTop(array(_('Project'),_('Forum'), _('Threads'), 
_('Posts'), _('Last Post'), _('New Content?')), array(), '', '', array(), 
array(),
+                       array(array(), array(), array('class' => 
'align-center'),  array('class' => 'align-center'),  array('class' => 
'align-center'),  array('class' => 'align-center')));
 
 //CHECK : if we won't ever be needing to store each forum/fmf, etc for each 
pass, don't use an array and use the same variable like $fmf instead of 
$fmf[$i], etc
 for($i = 0; $i < sizeof($monitoredForumsIdsArray); $i++) {
@@ -93,20 +94,8 @@ for($i = 0; $i < sizeof($monitoredForumsIdsArray); $i++) {
                                exit_error($fmf->getErrorMessage(), 'forums');
                        }
 
-                       $fmf->setup($offset,$style,$max_rows,$set);
-                       $style=$fmf->getStyle();
-                       $max_rows=$fmf->max_rows;
-                       $offset=$fmf->offset;
+                       $fmf->setup();
                        $msg_arr = $fmf->nestArray($fmf->getNested());
-                       if ($fmf->isError()) {
-                               exit_error($fmf->getErrorMessage(), 'forums');
-                       }
-                       $rows=count($msg_arr[0]);
-                       $avail_rows=$fmf->fetched_rows;
-                       if ($rows > $max_rows) {
-                               $rows=$max_rows;
-                       }
-
                        $new_content = '&nbsp;';
                        //this loops through every message AND followup, in 
search of new messages.
                        //anything that's new ( new thread or followup) is 
considered to be a "new thing" and the forum
@@ -116,7 +105,7 @@ for($i = 0; $i < sizeof($monitoredForumsIdsArray); $i++) {
                                        foreach ($forum_msg_arr as $forum_msg) {
                                                if 
($forumObject->getSavedDate() < $forum_msg->getPostDate()) {
                                                        //we've got ourselves a 
new message or followup for this forum. note that, exit the search
-                                                       $new_content = 
html_image('ic/add.png','', '', array('alt' => 'new'));
+                                                       $new_content = 
$HTML->getNewPic('', 'new');
                                                        break;
                                                }
                                        }

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=bdf756fef4e928da04dde42bcc066ba3bf036209

commit bdf756fef4e928da04dde42bcc066ba3bf036209
Author: Franck Villaume <[email protected]>
Date:   Thu Dec 29 17:21:03 2016 +0100

    set default values to avoid PHP warning & coding style

diff --git a/src/common/forum/ForumMessageFactory.class.php 
b/src/common/forum/ForumMessageFactory.class.php
index d680414..616d54a 100644
--- a/src/common/forum/ForumMessageFactory.class.php
+++ b/src/common/forum/ForumMessageFactory.class.php
@@ -65,12 +65,12 @@ class ForumMessageFactory extends FFError {
        /**
         * setup - call this function before getThreaded/nested/etc to set up 
the user preferences.
         *
-        * @param       int    $offset   The number of rows to skip.
-        * @param       string $style    The style of forum, whether it's 
nested, ultimate, etc.
-        * @param       int        $max_rows The maximum number of rows to 
return.
-        * @param       int        $set      Whether to set these prefs into 
the database - use "custom".
+        * @param       int     $offset         The number of rows to skip.
+        * @param       string  $style          The style of forum, whether 
it's nested, ultimate, etc.
+        * @param       int     $max_rows       The maximum number of rows to 
return.
+        * @param       int     $set            Whether to set these prefs into 
the database - use "custom".
         */
-       function setup($offset,$style,$max_rows,$set) {
+       function setup($offset = 0, $style = 'ultimate', $max_rows = 25, $set = 
'no') {
 //echo "<br />offset: $offset| style: $style|max_rows: $max_rows|set: $set+";
                if ((!$offset) || ($offset < 0)) {
                        $this->offset=0;
@@ -85,25 +85,25 @@ class ForumMessageFactory extends FFError {
                        $max_rows=25;
                }
                if (session_loggedin()) {
-                       $u =& session_get_user();
-                       $_pref=$style.'|'.$max_rows;
-                       if ($set=='custom') {
+                       $u = & session_get_user();
+                       $_pref = $style.'|'.$max_rows;
+                       if ($set == 'custom') {
                                if ($u->getPreference('forum_style')) {
                                        if ($_pref == 
$u->getPreference('forum_style')) {
                                                //pref already stored
                                        } else {
                                                //set the pref
-                                               $u->setPreference 
('forum_style',$_pref);
+                                               
$u->setPreference('forum_style', $_pref);
                                        }
                                } else {
                                        //set the pref
-                                       $u->setPreference 
('forum_style',$_pref);
+                                       $u->setPreference('forum_style', 
$_pref);
                                }
                        } else {
                                if ($u->getPreference('forum_style')) {
-                                       $_pref_arr=explode 
('|',$u->getPreference('forum_style'));
-                                       $style=$_pref_arr[0];
-                                       $max_rows=$_pref_arr[1];
+                                       $_pref_arr = explode 
('|',$u->getPreference('forum_style'));
+                                       $style = $_pref_arr[0];
+                                       $max_rows = $_pref_arr[1];
                                } else {
                                        //no saved pref and we're not setting
                                        //one because this is all default 
settings

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=4c3d690f1213a9ec13e776e97d6785831d885e87

commit 4c3d690f1213a9ec13e776e97d6785831d885e87
Author: Franck Villaume <[email protected]>
Date:   Thu Dec 29 17:08:51 2016 +0100

    My Monitored Forums widget: add link to dedicated page: myforums.php

diff --git a/src/common/widget/Widget_MyMonitoredForums.class.php 
b/src/common/widget/Widget_MyMonitoredForums.class.php
index aa29fb4..355b077 100644
--- a/src/common/widget/Widget_MyMonitoredForums.class.php
+++ b/src/common/widget/Widget_MyMonitoredForums.class.php
@@ -114,6 +114,7 @@ class Widget_MyMonitoredForums extends Widget {
                                        }
                                        if (!$setListTableTop) {
                                                $html_my_monitored_forums .= 
$HTML->listTableBottom();
+                                               $html_my_monitored_forums .= 
html_e('p', array(), _('Detailed page about monitored forums')._(': 
').util_make_link('/forum/myforums.php', _('Here')));
                                        }
                                }
                        } else {

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=a99e86246ade0d8b85cad48e283031e6b964be6a

commit a99e86246ade0d8b85cad48e283031e6b964be6a
Author: Franck Villaume <[email protected]>
Date:   Thu Dec 29 16:49:26 2016 +0100

    Forum, myforums.php clean-up: remove unused vars, fix retrieve monitored 
forums when project specified, use HTML forum pic theme

diff --git a/src/www/forum/myforums.php b/src/www/forum/myforums.php
index eef1937..7d54450 100644
--- a/src/www/forum/myforums.php
+++ b/src/www/forum/myforums.php
@@ -1,5 +1,4 @@
 <?php
-
 /**
  * FusionForge Monitored Forums Track Page
  *
@@ -8,7 +7,7 @@
  * Copyright 2005 (c) - Daniel Perez
  * Copyright 2010 (c) Franck Villaume - Capgemini
  * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
- * Copyright 2014, Franck Villaume - TrivialDev
+ * Copyright 2014,2016, Franck Villaume - TrivialDev
  * http://fusionforge.org/
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -52,9 +51,12 @@ if ($group_id) {
 
 //get the user monitored forums
 $MonitorElementObject = new MonitorElement('forum');
-$monitoredForumsIdsArray = 
$MonitorElementObject->getMonitedByUserIdInArray($user_id);
-
-if (!$monitoredForumsIdsArray) {
+if ($group_id) {
+       $monitoredForumsIdsArray = 
$MonitorElementObject->getMonitoredIdsByGroupIdByUserIdInArray($group_id, 
$user_id);
+} else {
+       $monitoredForumsIdsArray = 
$MonitorElementObject->getMonitedByUserIdInArray($user_id);
+}
+if (!is_array($monitoredForumsIdsArray)) {
        echo $HTML->error_msg($MonitorElementObject->getErrorMessage());
        forum_footer();
        exit;
@@ -66,14 +68,8 @@ if (count($monitoredForumsIdsArray) < 1) {
        exit;
 }
 
-$tablearr = array(_('Project'),_('Forum'), _('Threads'),
-                               _('Posts'), _('Last Post'), _('New Content?'));
-echo $HTML->listTableTop($tablearr);
-
-$i = 0;
-$j = 0;
+echo $HTML->listTableTop(array(_('Project'),_('Forum'), _('Threads'), 
_('Posts'), _('Last Post'), _('New Content?')));
 
-$f = array();
 //CHECK : if we won't ever be needing to store each forum/fmf, etc for each 
pass, don't use an array and use the same variable like $fmf instead of 
$fmf[$i], etc
 for($i = 0; $i < sizeof($monitoredForumsIdsArray); $i++) {
        if (forge_check_perm('forum', $monitoredForumsIdsArray[$i], 'read')) {
@@ -134,7 +130,7 @@ for($i = 0; $i < sizeof($monitoredForumsIdsArray); $i++) {
                        $date = $forumObject->getMostRecentDate()? 
date(_('Y-m-d H:i'),$forumObject->getMostRecentDate()) : '';
                        $cells = array();
                        $cells[][] = $this_forum_group->getPublicName();
-                       $cells[][] = 
util_make_link('/forum/forum.php?forum_id='.$forumObject->getID().'&group_id='.$this_forum_group->getID(),
 html_image('ic/forum20w.png').'&nbsp;'.$forumObject->getName());
+                       $cells[][] = 
util_make_link('/forum/forum.php?forum_id='.$forumObject->getID().'&group_id='.$this_forum_group->getID(),
 $HTML->getForumPic().'&nbsp;'.$forumObject->getName());
                        $cells[] = array($forumObject->getThreadCount(), 
'class' => 'align-center');
                        $cells[] = array($forumObject->getMessageCount(), 
'class' => 'align-center');
                        $cells[] = array($date, 'class' => 'align-center');

-----------------------------------------------------------------------

Summary of changes:
 src/common/forum/ForumMessageFactory.class.php     | 26 +++++++--------
 .../widget/Widget_MyMonitoredForums.class.php      |  1 +
 src/www/forum/myforums.php                         | 39 +++++++---------------
 3 files changed, 26 insertions(+), 40 deletions(-)


hooks/post-receive
-- 
FusionForge

_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits

Reply via email to