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 3f8fe01adf12328d4462e4db51cc32a21924d5e6 (commit) via 987e5a78912a39ab290ef7afa7d134384b1fe131 (commit) via febae6ed582940e05a2fee500fcde7f020b9d1b1 (commit) from ad10224a804e63ce498c7b894574a6e17b9ff7cc (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=3f8fe01adf12328d4462e4db51cc32a21924d5e6 commit 3f8fe01adf12328d4462e4db51cc32a21924d5e6 Author: Franck Villaume <franck.villa...@trivialdev.com> Date: Sat Dec 8 18:20:45 2018 +0100 /users/<nickname> improvement: add User Rss widget. diff --git a/src/common/widget/Widget.class.php b/src/common/widget/Widget.class.php index e8c1808..cdee6e1 100644 --- a/src/common/widget/Widget.class.php +++ b/src/common/widget/Widget.class.php @@ -73,7 +73,7 @@ require_once $gfcommon.'widget/Widget_UserhomePersonalInformation.class.php'; require_once $gfcommon.'widget/Widget_UserhomeProjectInformation.class.php'; require_once $gfcommon.'widget/Widget_UserhomePeerRatings.class.php'; require_once $gfcommon.'widget/Widget_UserhomeActivity.class.php'; - +require_once $gfcommon.'widget/Widget_UserhomeRss.class.php'; /** * FusionForge Layout Widget @@ -322,6 +322,8 @@ require_once $gfcommon.'widget/Widget_UserhomeActivity.class.php'; case 'uhactivity': $o = new Widget_UserhomeActivity($owner_id); break; + case 'uhrss'; + $o = new Widget_UserhomeRss($owner_id); default: //$em = EventManager::instance(); //$em->processEvent('widget_instance', array('widget' => $widget_name, 'instance' => &$o)); @@ -362,7 +364,7 @@ require_once $gfcommon.'widget/Widget_UserhomeActivity.class.php'; $widgets = array('trackercontent', 'trackercomment', 'trackerdefaultactions', 'trackergeneral', 'trackermain', 'trackersummary'); break; case WidgetLayoutManager::OWNER_TYPE_USERHOME: - $widgets = array('uhpersonalinformation', 'uhprojectinformation', 'uhpeerratings', 'uhactivity'); + $widgets = array('uhpersonalinformation', 'uhprojectinformation', 'uhpeerratings', 'uhactivity', 'uhrss'); break; default: $widgets = array(); diff --git a/src/common/widget/Widget_UserhomeRss.class.php b/src/common/widget/Widget_UserhomeRss.class.php new file mode 100644 index 0000000..36d973e --- /dev/null +++ b/src/common/widget/Widget_UserhomeRss.class.php @@ -0,0 +1,40 @@ +<?php +/** + * Copyright (c) Xerox Corporation, Codendi Team, 2001-2009. All rights reserved + * Copyright 2018, Franck Villaume - TrivialDev + * + * This file is a part of Fusionforge. + * + * Fusionforge is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * Fusionforge is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Codendi. If not, see <http://www.gnu.org/licenses/>. + */ + +require_once 'Widget_Rss.class.php'; +require_once 'common/widget/WidgetLayoutManager.class.php'; + +/** + * Widget_UserhomeRss + * + * User rss reader. To integrate on user profile page. + */ + +class Widget_UserhomeRss extends Widget_Rss { + function __construct($owner_id) { + $this->owner_id = $owner_id; + parent::__construct('uhrss', $owner_id, WidgetLayoutManager::OWNER_TYPE_USERHOME); + } + + function getDescription() { + return _('Allow you to include public rss (or atom) feeds into your profile.'); + } +} diff --git a/src/www/widgets/updatelayout.php b/src/www/widgets/updatelayout.php index f3ce031..9a452ed 100644 --- a/src/www/widgets/updatelayout.php +++ b/src/www/widgets/updatelayout.php @@ -105,7 +105,7 @@ if ($owner) { switch($request->get('action')) { case 'widget': if ($name && $request->exist('layout_id')) { - if ($widget = Widget::getInstance($name)) { + if ($widget = Widget::getInstance($name, $owner_id)) { if ($widget->isAvailable()) { $action = array_pop(array_keys($param[$name])); switch($action) { diff --git a/src/www/widgets/widget.php b/src/www/widgets/widget.php index eed6a2d..e49b186 100644 --- a/src/www/widgets/widget.php +++ b/src/www/widgets/widget.php @@ -90,7 +90,7 @@ if ($request->valid($vOwner)) { $v = array_keys($param); $name = array_pop($v); $instance_id = (int)$param[$name]; - if ($widget =& Widget::getInstance($name)) { + if ($widget =& Widget::getInstance($name, $owner_id)) { if ($widget->isAvailable()) { switch ($request->get('action')) { case 'rss': https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=987e5a78912a39ab290ef7afa7d134384b1fe131 commit 987e5a78912a39ab290ef7afa7d134384b1fe131 Author: Franck Villaume <franck.villa...@trivialdev.com> Date: Sat Dec 8 18:19:34 2018 +0100 Rss Widget: add missing pref diff --git a/src/common/widget/Widget_Rss.class.php b/src/common/widget/Widget_Rss.class.php index 2c19c81..a24c2c8 100644 --- a/src/common/widget/Widget_Rss.class.php +++ b/src/common/widget/Widget_Rss.class.php @@ -113,6 +113,12 @@ require_once 'Widget.class.php'; $prefs = '<table>'; $prefs .= '<tr>'; $prefs .= '<td>'; + $prefs .= _('Title')._(':'); + $prefs .= '</td>'; + $prefs .= '<td>'; + $prefs .= '<input type="text" class="textfield_medium" name="rss[title]" value="" placeholder="'. _('Set your RSS Title here.') .'" /></td></tr>'; + $prefs .= '<tr>'; + $prefs .= '<td>'; $prefs .= 'URL'._(':'); $prefs .= '</td>'; $prefs .= '<td>'; https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=febae6ed582940e05a2fee500fcde7f020b9d1b1 commit febae6ed582940e05a2fee500fcde7f020b9d1b1 Author: Franck Villaume <franck.villa...@trivialdev.com> Date: Sat Dec 8 17:36:41 2018 +0100 cannot monitor yourself diff --git a/src/www/users b/src/www/users index 1e5a6c8..619673e 100644 --- a/src/www/users +++ b/src/www/users @@ -85,7 +85,7 @@ if (!$user || !is_object($user) || $user->isError() || !$user->isActive()) { } else { // default HTML view //now show the user page $title = '<i>'.$username.'</i> '._('Profile'); - if (forge_get_config('use_diary') && session_loggedin()) { + if (forge_get_config('use_diary') && session_loggedin() && ($user->getID() != user_getid())) { if ($user->isMonitoredBy(user_getid())) { $option = 'stop'; $titleMonitor = _('Stop monitoring this user'); ----------------------------------------------------------------------- Summary of changes: src/common/widget/Widget.class.php | 6 ++++-- src/common/widget/Widget_Rss.class.php | 6 ++++++ ...dget_MyRss.class.php => Widget_UserhomeRss.class.php} | 16 +++++++++------- src/www/users | 2 +- src/www/widgets/updatelayout.php | 2 +- src/www/widgets/widget.php | 2 +- 6 files changed, 22 insertions(+), 12 deletions(-) copy src/common/widget/{Widget_MyRss.class.php => Widget_UserhomeRss.class.php} (69%) hooks/post-receive -- FusionForge _______________________________________________ Fusionforge-commits mailing list Fusionforge-commits@lists.fusionforge.org http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits