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 12f4baf179b473a1760d73e0e3a6b5dad30a397f (commit)
from a86a887a66ea2c799d1880ee79e786b981c6c69e (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=12f4baf179b473a1760d73e0e3a6b5dad30a397f
commit 12f4baf179b473a1760d73e0e3a6b5dad30a397f
Author: Franck Villaume <[email protected]>
Date: Sat Jun 18 15:03:46 2016 +0200
remove duplicated code
diff --git a/src/bin/populate_template_project.php
b/src/bin/populate_template_project.php
index a34e9a7..f6f7760 100755
--- a/src/bin/populate_template_project.php
+++ b/src/bin/populate_template_project.php
@@ -214,9 +214,7 @@ function populateProject($project) {
return true;
}
-if (count($argv) < 2) {
- usage();
-} elseif (in_array($argv[1], array('-h', '-?', '--help'))) {
+if (in_array($argv[1], array('-h', '-?', '--help'))) {
usage(0);
} elseif (count($argv) == 2) {
if (!($gid = util_nat0($argv[1]))) {
diff --git a/src/common/docman/views/listfile.php
b/src/common/docman/views/listfile.php
index 03b5b48..1e32a5c 100644
--- a/src/common/docman/views/listfile.php
+++ b/src/common/docman/views/listfile.php
@@ -195,10 +195,8 @@ if ($DocGroupName) {
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 (session_loggedin() && ($ndg->getLockedBy() ==
$LUSER->getID())) {
- $ndg->setLock(0);
/* if you change the 60000 lockIntervalDelay value, please
update here too */
- } elseif ((time() - $ndg->getLockdate()) > 600) {
+ if ((session_loggedin() && ($ndg->getLockedBy() ==
$LUSER->getID())) || ((time() - $ndg->getLockdate()) > 600)) {
$ndg->setLock(0);
}
}
@@ -260,10 +258,8 @@ if (isset($nested_docs[$dirid]) &&
is_array($nested_docs[$dirid])) {
$cells = array();
/* should we steal the lock on file ? */
if ($d->getLocked()) {
- if ($d->getLockedBy() == $LUSER->getID()) {
- $d->setLock(0);
/* if you change the 60000 value below, please update
here too */
- } elseif ((time() - $d->getLockdate()) > 600) {
+ if (($d->getLockedBy() == $LUSER->getID()) || ((time()
- $d->getLockdate()) > 600)) {
$d->setLock(0);
}
}
diff --git a/src/common/include/Navigation.class.php
b/src/common/include/Navigation.class.php
index 7706c6e..9fc360a 100644
--- a/src/common/include/Navigation.class.php
+++ b/src/common/include/Navigation.class.php
@@ -316,9 +316,7 @@ class Navigation extends FFError {
}
}
if ($project && is_object($project)) {
- if ($project->isError()) {
- } elseif (!$project->isProject()) {
- } else {
+ if (!$project->isError() &&
$project->isProject()) {
$menu['titles'][] =
$project->getPublicName();
$menu['tooltips'][] = _('Project home
page, widgets selected to follow specific items.');
if (isset ($GLOBALS['sys_noforcetype'])
&& $GLOBALS['sys_noforcetype']) {
-----------------------------------------------------------------------
Summary of changes:
src/bin/populate_template_project.php | 4 +---
src/common/docman/views/listfile.php | 8 ++------
src/common/include/Navigation.class.php | 4 +---
3 files changed, 4 insertions(+), 12 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits