[Fusionforge-commits] FusionForge branch master updated. 3eb3bb9966c7976f2d928f65fa0bffebf9138054
Franck VILLAUME
nerville at fusionforge.org
Mon Feb 10 17:23:06 CET 2014
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 3eb3bb9966c7976f2d928f65fa0bffebf9138054 (commit)
via d7ef9c5dd361744f887cebdb5267e077945f8b7a (commit)
from 347ce0237396f4b0a1dfe944ba28685e95561025 (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 -----------------------------------------------------------------
commit 3eb3bb9966c7976f2d928f65fa0bffebf9138054
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date: Mon Feb 10 17:20:52 2014 +0100
docman widget Latest Documents: fix sql
diff --git a/src/common/widget/Widget_ProjectLatestDocuments.class.php b/src/common/widget/Widget_ProjectLatestDocuments.class.php
index 3221606..b6dff50 100644
--- a/src/common/widget/Widget_ProjectLatestDocuments.class.php
+++ b/src/common/widget/Widget_ProjectLatestDocuments.class.php
@@ -52,7 +52,7 @@ class Widget_ProjectLatestDocuments extends Widget {
$qpa = db_construct_qpa($qpa, 'SELECT filename, title, updatedate, createdate, realname, user_name, state_name, filetype, docid, doc_group
FROM docdata_vw
WHERE group_id=$1
- AND state_id=$2',
+ AND stateid=$2',
array($group_id,'1'));
if (session_loggedin() && (user_ismember($group_id) ||
commit d7ef9c5dd361744f887cebdb5267e077945f8b7a
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date: Sat Dec 29 13:52:28 2012 +0100
add path in widget
diff --git a/src/common/widget/Widget_ProjectLatestDocuments.class.php b/src/common/widget/Widget_ProjectLatestDocuments.class.php
index 852e27b..3221606 100644
--- a/src/common/widget/Widget_ProjectLatestDocuments.class.php
+++ b/src/common/widget/Widget_ProjectLatestDocuments.class.php
@@ -49,10 +49,11 @@ class Widget_ProjectLatestDocuments extends Widget {
$group_id = $request->get('group_id');
$qpa = db_construct_qpa();
- $qpa = db_construct_qpa($qpa, 'SELECT filename, title, updatedate, createdate, realname, user_name, state_name, filetype, docid
+ $qpa = db_construct_qpa($qpa, 'SELECT filename, title, updatedate, createdate, realname, user_name, state_name, filetype, docid, doc_group
FROM docdata_vw
- WHERE group_id=$1',
- array($group_id));
+ WHERE group_id=$1
+ AND state_id=$2',
+ array($group_id,'1'));
if (session_loggedin() && (user_ismember($group_id) ||
forge_check_global_perm('forge_admin'))) {
@@ -70,7 +71,7 @@ class Widget_ProjectLatestDocuments extends Widget {
// No documents
echo '<div class="warning">'._('This Project Has Not Published Any Documents').'</div>';
} else {
- $tabletop = array(_('Date'), _('File Name'), _('Title'), _('Author'));
+ $tabletop = array(_('Date'), _('File Name'), _('Title'), _('Author'), _('Path'));
if (session_loggedin() && (user_ismember($group_id) ||
forge_check_global_perm('forge_admin'))) {
$tabletop[] = _('Status');
@@ -87,6 +88,9 @@ class Widget_ProjectLatestDocuments extends Widget {
$statename = db_result($res_files,$f,'state_name');
$filetype = db_result($res_files,$f,'filetype');
$docid = db_result($res_files,$f,'docid');
+ $docgroup = db_result($res_files,$f,'doc_group');
+ $ndg = new DocumentGroup(group_get_object($group_id), $docgroup);
+ $path = $ndg->getPath(true, true);
switch ($filetype) {
case "URL": {
$docurl = $filename;
@@ -109,6 +113,9 @@ class Widget_ProjectLatestDocuments extends Widget {
</td>
<td >'
. make_user_link($user_name, $realname) .
+ '</td>
+ <td>'
+ . $path .
'</td>';
if (session_loggedin() && (user_ismember($group_id) ||
forge_check_global_perm('forge_admin'))) {
-----------------------------------------------------------------------
Summary of changes:
.../widget/Widget_ProjectLatestDocuments.class.php | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
hooks/post-receive
--
FusionForge
More information about the Fusionforge-commits
mailing list