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  a4c84331f0589514d18a1a83fa6a0b5bac897062 (commit)
      from  0fb03b3b89c6bb7bdaa62d47c370e5a6df484111 (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=a4c84331f0589514d18a1a83fa6a0b5bac897062

commit a4c84331f0589514d18a1a83fa6a0b5bac897062
Author: Franck Villaume <[email protected]>
Date:   Sat Jun 18 18:27:37 2016 +0200

    docman: less code

diff --git a/src/common/docman/views/listfile.php 
b/src/common/docman/views/listfile.php
index 1e32a5c..1a250f0 100644
--- a/src/common/docman/views/listfile.php
+++ b/src/common/docman/views/listfile.php
@@ -194,11 +194,9 @@ if ($DocGroupName) {
        $max = ($nbDocs > ($start + $paging)) ? ($start + $paging) : $nbDocs;
        echo $HTML->paging_top($start, $paging, $nbDocs, $max, $redirecturl, 
array('style' => 'display:inline-block'));
        /* should we steal the lock on folder ? */
-       if ($ndg->getLocked()) {
+       if ($ndg->getLocked() && ((session_loggedin() && ($ndg->getLockedBy() 
== $LUSER->getID())) || ((time() - $ndg->getLockdate()) > 600))) {
                /* if you change the 60000 lockIntervalDelay value, please 
update here too */
-               if ((session_loggedin() && ($ndg->getLockedBy() == 
$LUSER->getID())) || ((time() - $ndg->getLockdate()) > 600)) {
-                       $ndg->setLock(0);
-               }
+               $ndg->setLock(0);
        }
        if (!$ndg->getLocked()) {
                if (forge_check_perm('docman', $ndg->Group->getID(), 
'approve')) {
@@ -257,11 +255,9 @@ if (isset($nested_docs[$dirid]) && 
is_array($nested_docs[$dirid])) {
        foreach ($nested_docs[$dirid] as $d) {
                $cells = array();
                /* should we steal the lock on file ? */
-               if ($d->getLocked()) {
+               if ($d->getLocked() && (($d->getLockedBy() == $LUSER->getID()) 
|| ((time() - $d->getLockdate()) > 600))) {
                        /* if you change the 60000 value below, please update 
here too */
-                       if (($d->getLockedBy() == $LUSER->getID()) || ((time() 
- $d->getLockdate()) > 600)) {
-                               $d->setLock(0);
-                       }
+                       $d->setLock(0);
                }
                if (!$d->getLocked() && !$d->getReserved()) {
                        $cells[][] = html_e('input', array('type' => 
'checkbox', 'value' => $d->getID(), 'class' => 'checkeddocidactive', 'title' => 
_('Select / Deselect this document for massaction'), 'onClick' => 
'controllerListFile.checkgeneral("active")'));

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

Summary of changes:
 src/common/docman/views/listfile.php | 12 ++++--------
 1 file changed, 4 insertions(+), 8 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