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 6b07c9aef30fb6f65870d2eda1427256ed1c3ee2 (commit)
from 2e79dfde31888fe9b80277ff0a97c9a73cfad428 (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=6b07c9aef30fb6f65870d2eda1427256ed1c3ee2
commit 6b07c9aef30fb6f65870d2eda1427256ed1c3ee2
Author: Franck Villaume <[email protected]>
Date: Wed Apr 10 19:31:43 2019 +0200
fix followers/following on nickname page
diff --git a/src/common/include/User.class.php
b/src/common/include/User.class.php
index 4a9627a..935801c 100644
--- a/src/common/include/User.class.php
+++ b/src/common/include/User.class.php
@@ -1826,9 +1826,9 @@ Email: %3$s
}
/**
- * getMonitorIds - get user ids monitoring this user.
+ * getMonitorIds - get user ids monitored by this user.
*
- * @return array of user ids monitoring this user.
+ * @return array of user ids monitored by this user.
*/
function getMonitorIds() {
$MonitorElementObject = new MonitorElement('user');
@@ -1836,6 +1836,16 @@ Email: %3$s
}
/**
+ * getMonitorByIds - get user ids monitoring this user.
+ *
+ * @return array of user ids monitoring this user.
+ */
+ function getMonitorByIds() {
+ $MonitorElementObject = new MonitorElement('user');
+ return
$MonitorElementObject->getMonitoredByUserIdInArray($this->getID());
+ }
+
+ /**
* isMonitoredBy - get the monitored status of this user for a specific
user id.
*
* @param string $userid
diff --git a/src/common/include/user_profile.php
b/src/common/include/user_profile.php
index b08776d..c2625f9 100644
--- a/src/common/include/user_profile.php
+++ b/src/common/include/user_profile.php
@@ -138,8 +138,8 @@ function user_personal_information($user, $compact = false,
$title = false) {
$subtable .= $HTML->multiTableRow(array(), $subcells);
}
$subcells = array();
- $subcells[][] = _('Followers/Following')._(':');
- $subcells[][] =
count($user->getMonitorIds()).'/'.count($user->isMonitoredBy());
+ $subcells[][] = _('Following').'/'._('Followers')._(':');
+ $subcells[][] =
count($user->getMonitorIds()).'/'.count($user->getMonitorByIds());
$subtable .= $HTML->multiTableRow(array(), $subcells);
$subtable .= $HTML->listTableBottom();
$cells[][] = $subtable;
-----------------------------------------------------------------------
Summary of changes:
src/common/include/User.class.php | 14 ++++++++++++--
src/common/include/user_profile.php | 4 ++--
2 files changed, 14 insertions(+), 4 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits