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 5a0221ff54864095aac170dda4018c3ea793f6e6 (commit)
from cab4f71b01299a41fd0c936a5e0f41d2c891d13c (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=5a0221ff54864095aac170dda4018c3ea793f6e6
commit 5a0221ff54864095aac170dda4018c3ea793f6e6
Author: Franck Villaume <[email protected]>
Date: Mon Oct 10 17:33:41 2016 +0200
no monitoring or move to trash action when file is already deleted
diff --git a/src/common/widget/Widget_ProjectLatestDocuments.class.php
b/src/common/widget/Widget_ProjectLatestDocuments.class.php
index a00ad57..44b768e 100644
--- a/src/common/widget/Widget_ProjectLatestDocuments.class.php
+++ b/src/common/widget/Widget_ProjectLatestDocuments.class.php
@@ -121,22 +121,24 @@ class Widget_ProjectLatestDocuments extends Widget {
$cells[][] = $path;
if (session_loggedin()) {
$cells[][] = $statename;
- if
($doc->isMonitoredBy(UserManager::instance()->getCurrentUser()->getID())) {
- $option = 'stop';
- $titleMonitor = _('Stop
monitoring this document');
- $image =
$HTML->getStopMonitoringPic($titleMonitor, $titleMonitor);
- } else {
- $option = 'start';
- $titleMonitor =
_('Start monitoring this document');
- $image =
$HTML->getStartMonitoringPic($titleMonitor, $titleMonitor);
- }
- $action =
util_make_link('/docman/?group_id='.$group_id.'&view=listfile&dirid='.$docgroup.'&action=monitorfile&option='.$option.'&fileid='.$doc->getID(),
$image, array('title' => $titleMonitor));
- if (forge_check_perm('docman',
$group_id, 'approve') && !$doc->getLocked()) {
- $action .=
util_make_link('/docman/?group_id='.$group_id.'&view=listfile&dirid='.$docgroup.'&action=trashfile&fileid='.$doc->getID(),
$HTML->getDeletePic('', _('Move this document to trash')), array('title' =>
_('Move this document to trash')));
+ $action = '';
+ if ($doc->getStateID() != 2) {
+ if
($doc->isMonitoredBy(UserManager::instance()->getCurrentUser()->getID())) {
+ $option =
'stop';
+ $titleMonitor =
_('Stop monitoring this document');
+ $image =
$HTML->getStopMonitoringPic($titleMonitor, $titleMonitor);
+ } else {
+ $option =
'start';
+ $titleMonitor =
_('Start monitoring this document');
+ $image =
$HTML->getStartMonitoringPic($titleMonitor, $titleMonitor);
+ }
+ $action .=
util_make_link('/docman/?group_id='.$group_id.'&view=listfile&dirid='.$docgroup.'&action=monitorfile&option='.$option.'&fileid='.$doc->getID(),
$image, array('title' => $titleMonitor));
+ if
(forge_check_perm('docman', $group_id, 'approve') && !$doc->getLocked()) {
+ $action .=
util_make_link('/docman/?group_id='.$group_id.'&view=listfile&dirid='.$docgroup.'&action=trashfile&fileid='.$doc->getID(),
$HTML->getDeletePic('', _('Move this document to trash')), array('title' =>
_('Move this document to trash')));
+ }
}
$cells[][] = $action;
}
-
$result .=
$HTML->multiTableRow(array(), $cells);
}
}
-----------------------------------------------------------------------
Summary of changes:
.../widget/Widget_ProjectLatestDocuments.class.php | 28 ++++++++++++----------
1 file changed, 15 insertions(+), 13 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits