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  c214b6ed345eb1f2e9537bf781f4a020fea63e2b (commit)
      from  57c1993572767d22a3fa0b184f48cafd2d5a905d (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=c214b6ed345eb1f2e9537bf781f4a020fea63e2b

commit c214b6ed345eb1f2e9537bf781f4a020fea63e2b
Author: Franck Villaume <[email protected]>
Date:   Sat Dec 3 12:27:07 2016 +0100

    use util_display_user when possible + helper to retrieve serialID for 
version

diff --git a/src/common/docman/DocumentVersionFactory.class.php 
b/src/common/docman/DocumentVersionFactory.class.php
index db11f83..81fb490 100644
--- a/src/common/docman/DocumentVersionFactory.class.php
+++ b/src/common/docman/DocumentVersionFactory.class.php
@@ -34,7 +34,7 @@ class DocumentVersionFactory extends FFError {
 
        /**
         * @param       $Document
-        * @internal    param                   \The $object Document object to 
which this version factory is associated.
+        * @internal    param           \The $object Document object to which 
this version factory is associated.
         */
        function __construct(&$Document) {
                parent::__construct();
@@ -67,7 +67,7 @@ class DocumentVersionFactory extends FFError {
                        $numrows = db_numrows($res);
                        while ($arr = db_fetch_array($res)) {
                                $user = user_get_object($arr['created_by']);
-                               $arr['created_by_username'] = 
$user->getRealName();
+                               $arr['created_by_username'] = 
util_display_user($user->getUnixName(), $user->getID(), $user->getRealName());
                                $arr['filesize_readable'] = 
human_readable_bytes($arr['filesize']);
                                if ($arr['updatedate']) {
                                        $arr['lastdate'] = date(_('Y-m-d H:i'), 
$arr['updatedate']);
@@ -104,7 +104,12 @@ class DocumentVersionFactory extends FFError {
                        while ($arr = db_fetch_array($res)) {
                                $serialids[] = $arr[0];
                        }
+                       $this->serialids = $serialids;
                }
                return $serialids;
        }
+
+       function getDBResVersionSerialIDs() {
+               return db_query_params('SELECT serial_id, version FROM 
doc_data_version WHERE docid = $1 ORDER BY version DESC', 
array($this->Document->getID()));
+       }
 }
diff --git a/src/common/docman/views/listfile.php 
b/src/common/docman/views/listfile.php
index e5dde76..ed25a71 100644
--- a/src/common/docman/views/listfile.php
+++ b/src/common/docman/views/listfile.php
@@ -281,7 +281,7 @@ if (isset($nested_docs[$dirid]) && 
is_array($nested_docs[$dirid])) {
                $cells[] = array($nextcell.$d->getFileName(), 'style' => 
'word-wrap: break-word; max-width: 250px;');
                $cells[] = array($d->getName(), 'style' => 'word-wrap: 
break-word; max-width: 250px;');
                $cells[] = array($d->getDescription(), 'style' => 'word-wrap: 
break-word; max-width: 250px;');
-               $cells[][] =  make_user_link($d->getCreatorUserName(), 
$d->getCreatorRealName());
+               $cells[][] =  util_display_user($d->getCreatorUserName(), 
$d->getCreatorID(), $d->getCreatorRealName());
                if ($d->getUpdated()) {
                        $cells[] = array(date(_('Y-m-d H:i'), 
$d->getUpdated()), 'content' => $d->getUpdated());
                } else {
@@ -294,7 +294,7 @@ if (isset($nested_docs[$dirid]) && 
is_array($nested_docs[$dirid])) {
                        if ($reserved_by) {
                                $user = user_get_object($reserved_by);
                                if (is_object($user)) {
-                                       $cells[][] = $nextcell.' '._('by').' 
'.util_make_link_u($user->getUnixName(), $user->getID(), $user->getRealName());
+                                       $cells[][] = $nextcell.' '._('by').' 
'.util_display_user($user->getUnixName(), $user->getID(), $user->getRealName());
                                }
                        }
                } else {
diff --git a/src/common/docman/views/listtrashfile.php 
b/src/common/docman/views/listtrashfile.php
index 71c23db..19910e6 100644
--- a/src/common/docman/views/listtrashfile.php
+++ b/src/common/docman/views/listtrashfile.php
@@ -175,7 +175,7 @@ if (isset($nested_docs[$dirid]) && 
is_array($nested_docs[$dirid])) {
                $cells[] = array($nextcell.$d->getFileName(), 'style' => 
'word-wrap: break-word; max-width: 250px;');
                $cells[] = array($d->getName(), 'style' => 'word-wrap: 
break-word; max-width: 250px;');
                $cells[] = array($d->getDescription(), 'style' => 'word-wrap: 
break-word; max-width: 250px;');
-               $cells[][] =  make_user_link($d->getCreatorUserName(), 
$d->getCreatorRealName());
+               $cells[][] =  util_display_user($d->getCreatorUserName(), 
$d->getCreatorID(), $d->getCreatorRealName());
                if ($d->getUpdated()) {
                        $cells[] = array(date(_('Y-m-d H:i'), 
$d->getUpdated()), 'sorttable_customkey' => $d->getUpdated());
                } else {

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

Summary of changes:
 src/common/docman/DocumentVersionFactory.class.php | 9 +++++++--
 src/common/docman/views/listfile.php               | 4 ++--
 src/common/docman/views/listtrashfile.php          | 2 +-
 3 files changed, 10 insertions(+), 5 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