[Fusionforge-commits] FusionForge branch master updated. 32d66e5dad8addb0a96c5c507dd8bc16599c4ad7

Alain Peyrat aljeux at fusionforge.org
Mon Jun 24 17:17:14 CEST 2013


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  32d66e5dad8addb0a96c5c507dd8bc16599c4ad7 (commit)
       via  55c04c2f9ac344ea07019be4660667db1b97d19b (commit)
      from  b822fa16bad79ec29fa1710613f19fe5711ea0ff (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 32d66e5dad8addb0a96c5c507dd8bc16599c4ad7
Author: Alain Peyrat <alain.peyrat at alcatel-lucent.com>
Date:   Fri Jun 21 12:36:53 2013 +0200

    docman: Display last modified only if there is one

diff --git a/src/common/docman/DocumentManager.class.php b/src/common/docman/DocumentManager.class.php
index 06b8308..57ee935 100644
--- a/src/common/docman/DocumentManager.class.php
+++ b/src/common/docman/DocumentManager.class.php
@@ -183,7 +183,10 @@ class DocumentManager extends Error {
 				}
 				if ($localDg->getName() != '.trash') {
 					$user = user_get_object($localDg->getCreated_by());
-					$lititle = _('Created_by:').$user->getRealName()._('; Last modified:').date(_('Y-m-d H:i'), $localDg->getLastModifyDate());
+					$lititle = _('Created by')._(': ').$user->getRealName();
+					if ($localDg->getLastModifyDate()) {
+						$lititle .= _('; ')._('Last modified')._(': ').relative_date($localDg->getLastModifyDate());
+					}
 					echo '<li id="leaf-'.$subGroupIdValue.'" class="'.$liclass.'">'.util_make_link($link, $localDg->getName(), array('class'=>'tabtitle-nw', 'title'=>$lititle)).$nbDocsLabel;
 				} else {
 					echo '<li id="leaf-'.$subGroupIdValue.'" class="'.$liclass.'">'.util_make_link($link, $localDg->getName()).$nbDocsLabel;

commit 55c04c2f9ac344ea07019be4660667db1b97d19b
Author: Alain Peyrat <alain.peyrat at alcatel-lucent.com>
Date:   Fri Jun 21 03:17:11 2013 +0200

    docman: zip => ZIP

diff --git a/src/www/docman/view.php b/src/www/docman/view.php
index 67b1322..5c5cb92 100644
--- a/src/www/docman/view.php
+++ b/src/www/docman/view.php
@@ -110,14 +110,14 @@ if (is_numeric($docid)) {
 			$file = '/tmp/'.$filename;
 			$zip = new ZipArchive;
 			if ( !$zip->open($file, ZIPARCHIVE::CREATE | ZIPARCHIVE::OVERWRITE)) {
-				exit_error(_('Unable to open zip archive for backup'), 'docman');
+				exit_error(_('Unable to open ZIP archive for backup'), 'docman');
 			}
 
 			if ( !docman_fill_zip($zip, $nested_groups, $df))
-				exit_error(_('Unable to fill zip archive for backup'), 'docman');
+				exit_error(_('Unable to fill ZIP archive for backup'), 'docman');
 
 			if ( !$zip->close())
-				exit_error(_('Unable to close zip archive for backup'), 'docman');
+				exit_error(_('Unable to close ZIP archive for backup'), 'docman');
 
 			header('Content-disposition: attachment; filename="'.$filename.'"');
 			header('Content-type: application/zip');
@@ -135,7 +135,7 @@ if (is_numeric($docid)) {
 			session_redirect('/docman/?group_id='.$group_id.'&view=admin&warning_msg='.urlencode($warning_msg));
 		}
 	} else {
-		$warning_msg = _('Zip extension is missing: no backup function');
+		$warning_msg = _('ZIP extension is missing: no backup function');
 		session_redirect('/docman/?group_id='.$group_id.'&view=admin&warning_msg='.urlencode($warning_msg));
 	}
 } elseif ($docid === 'webdav') {
@@ -153,7 +153,7 @@ if (is_numeric($docid)) {
 		$server = new HTTP_WebDAV_Server_Docman;
 		$server->ServeRequest();
 	} else {
-		$warning_msg = _('No webdav interface enabled.');
+		$warning_msg = _('No Webdav interface enabled.');
 		session_redirect('/docman/?group_id='.$group_id.'&warning_msg='.urlencode($warning_msg));
 	}
 } elseif ($docid === 'zip') {
@@ -181,7 +181,7 @@ if (is_numeric($docid)) {
 				$file = forge_get_config('data_path').'/'.$filename;
 				$zip = new ZipArchive;
 				if ( !$zip->open($file, ZIPARCHIVE::CREATE | ZIPARCHIVE::OVERWRITE))
-					exit_error(_('Unable to open zip archive for download as zip'), 'docman');
+					exit_error(_('Unable to open ZIP archive for download as ZIP'), 'docman');
 
 				// ugly workaround to get the files at doc_group_id level
 				$df->setDocGroupID($dg->getID());
@@ -189,14 +189,14 @@ if (is_numeric($docid)) {
 				if (is_array($docs) && count($docs) > 0) {	// this group has documents
 					foreach ($docs as $doc) {
 						if (!$zip->addFromString(iconv("UTF-8", "ASCII//TRANSLIT", $doc->getFileName()), $doc->getFileData()))
-							exit_error(_('Unable to fill zipfile.'), 'docman');
+							exit_error(_('Unable to fill ZIP file.'), 'docman');
 					}
 				}
 				if ( !docman_fill_zip($zip, $nested_groups, $df, $dg->getID()))
-					exit_error(_('Unable to fill zip archive for download as zip'), 'docman');
+					exit_error(_('Unable to fill ZIP archive for download as ZIP'), 'docman');
 
 				if ( !$zip->close())
-					exit_error(_('Unable to close zip archive for download as zip'), 'docman');
+					exit_error(_('Unable to close ZIP archive for download as ZIP'), 'docman');
 
 				header('Content-disposition: attachment; filename="'.$filename.'"');
 				header('Content-type: application/zip');
@@ -205,7 +205,7 @@ if (is_numeric($docid)) {
 
 				if(!readfile_chunked($file)) {
 					unlink($file);
-					$error_msg = _('Unable to download zip archive');
+					$error_msg = _('Unable to download ZIP archive');
 					session_redirect('/docman/?group_id='.$group_id.'&view=admin&error_msg='.urlencode($error_msg));
 				}
 				unlink($file);
@@ -220,7 +220,7 @@ if (is_numeric($docid)) {
 			$file = forge_get_config('data_path').'/'.$filename;
 			$zip = new ZipArchive;
 			if (!$zip->open($file, ZIPARCHIVE::CREATE | ZIPARCHIVE::OVERWRITE))
-				exit_error(_('Unable to open zip archive for download as zip'), 'docman');
+				exit_error(_('Unable to open ZIP archive for download as ZIP'), 'docman');
 
 			foreach($arr_fileid as $docid) {
 				if (!empty($docid)) {
@@ -232,7 +232,7 @@ if (is_numeric($docid)) {
 					}
 
 					if (!$zip->addFromString(iconv("UTF-8", "ASCII//TRANSLIT", $d->getFileName()), $d->getFileData()))
-						exit_error(_('Unable to fill zipfile.'), 'docman');
+						exit_error(_('Unable to fill ZIP file.'), 'docman');
 				} else {
 					$zip->close();
 					unlink($file);
@@ -241,7 +241,7 @@ if (is_numeric($docid)) {
 				}
 			}
 			if ( !$zip->close())
-				exit_error(_('Unable to close zip archive for download as zip'), 'docman');
+				exit_error(_('Unable to close ZIP archive for download as ZIP'), 'docman');
 
 			header('Content-disposition: attachment; filename="'.$filename.'"');
 			header('Content-type: application/zip');
@@ -250,7 +250,7 @@ if (is_numeric($docid)) {
 
 			if(!readfile_chunked($file)) {
 				unlink($file);
-				$error_msg = _('Unable to download zip archive');
+				$error_msg = _('Unable to download ZIP archive');
 				session_redirect('/docman/?group_id='.$group_id.'&view=admin&error_msg='.urlencode($error_msg));
 			}
 			unlink($file);

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

Summary of changes:
 src/common/docman/DocumentManager.class.php |    5 ++++-
 src/www/docman/view.php                     |   28 +++++++++++++--------------
 2 files changed, 18 insertions(+), 15 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list