[vhffs-dev] [svn] commit: r218 - in /trunk: vhffs-api/src/Vhffs/ vhffs-api/src/Vhffs/Panel/ vhffs-panel/largefile/ vhffs-panel/templates/largefile/ vhffs-robots/src/ |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
- To: vhffs-dev@xxxxxxxxx
- Subject: [vhffs-dev] [svn] commit: r218 - in /trunk: vhffs-api/src/Vhffs/ vhffs-api/src/Vhffs/Panel/ vhffs-panel/largefile/ vhffs-panel/templates/largefile/ vhffs-robots/src/
- From: vhffs-dev@xxxxxxxxx
- Date: Sun, 20 Aug 2006 20:31:09 -0000
Author: soda
Date: Sun Aug 20 22:31:08 2006
New Revision: 218
Log:
Continue largefile implementation :
* New bot : delete_largefile.pl to delete these files
* New bot : move-completed-largefile.pl to move waiting files to public ftp-servers directory
* Update templates for largefiles
* fix bugs
Added:
trunk/vhffs-panel/largefile/complete.pl (with props)
trunk/vhffs-panel/largefile/infos.pl (with props)
trunk/vhffs-robots/src/delete_largefile.pl (with props)
trunk/vhffs-robots/src/move-completed-largefile.pl (with props)
Modified:
trunk/vhffs-api/src/Vhffs/Constants.pm
trunk/vhffs-api/src/Vhffs/Panel/Main.pm
trunk/vhffs-panel/largefile/delete.pl
trunk/vhffs-panel/largefile/prefs.pl
trunk/vhffs-panel/templates/largefile/prefs-waiting.tmpl
Modified: trunk/vhffs-api/src/Vhffs/Constants.pm
==============================================================================
--- trunk/vhffs-api/src/Vhffs/Constants.pm (original)
+++ trunk/vhffs-api/src/Vhffs/Constants.pm Sun Aug 20 22:31:08 2006
@@ -7,7 +7,7 @@
use constant
{
- VHFFS_VERSION => "4.0pre1",
+ VHFFS_VERSION => "4.0pre2",
VHFFS_RELEASE_NAME => "koala",
WAITING_FOR_VALIDATION => 1,
Modified: trunk/vhffs-api/src/Vhffs/Panel/Main.pm
==============================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Main.pm (original)
+++ trunk/vhffs-api/src/Vhffs/Panel/Main.pm Sun Aug 20 22:31:08 2006
@@ -682,16 +682,21 @@
sub open_template
{
- my ( $arg1 , $arg2 , $vhffs , $path , $template , $tmp );
+ my ( $arg1 , $arg2 , $arg3 , $vhffs , $path , $template , $tmp );
$vhffs = shift;
$arg1 = shift;
$arg2 = shift;
+ $arg3 = shift;
$path = $vhffs->get_config->get_templatedir;
$tmp = shift;
- if( $arg2 )
+ if( $arg3 )
+ {
+ $path .= "/" . $arg1 . "/" . $arg2 . "/" . $arg3 . ".tmpl";
+ }
+ elsif( $arg2 )
{
$path .= "/" . $arg1 . "/" . $arg2 . ".tmpl";
}
Modified: trunk/vhffs-panel/largefile/delete.pl
==============================================================================
--- trunk/vhffs-panel/largefile/delete.pl (original)
+++ trunk/vhffs-panel/largefile/delete.pl Sun Aug 20 22:31:08 2006
@@ -54,7 +54,7 @@
}
elsif( $sure == 0 )
{
- $message = gettext( "This subversion repository will NOT be deleted" );
+ $message = gettext( "This file will not be deleted" );
}
else
{
@@ -63,11 +63,11 @@
# Commit all the changes on the LargeFile object (only state changed)
if( $file->commit < 0 )
{
- $message = gettext("An error occured while deleting the Subversion repository");
+ $message = gettext("An error occured while deleting the file. Try again or contact the administrators.");
}
else
{
- $message = gettext("This repository will be deleted");
+ $message = gettext("This file will be deleted from our servers as soon as possible");
}
}
Modified: trunk/vhffs-panel/largefile/prefs.pl
==============================================================================
--- trunk/vhffs-panel/largefile/prefs.pl (original)
+++ trunk/vhffs-panel/largefile/prefs.pl Sun Aug 20 22:31:08 2006
@@ -33,10 +33,7 @@
my $output;
my $subtemplate;
my $file;
-my $templatedir;
my $message;
-
-$templatedir = $vhffs->get_config->get_templatedir;
if( defined $cgigroupname )
{
@@ -49,31 +46,31 @@
if( ( ! defined $filename ) || ( ! defined $file ) )
{
- $template = new HTML::Template( filename => $templatedir."/misc/simplemsg.tmpl" );
+ $template = open_template( $vhffs , "misc" , "simplemsg" );
$message = gettext( "CGI Error" );
$template->param( MESSAGE => $message );
}
elsif( ( ! defined $group ) || ( $group->fetch < 0 ) )
{
- $template = new HTML::Template( filename => $templatedir."/misc/simplemsg.tmpl" );
+ $template = open_template( $vhffs , "misc" , "simplemsg" );
$template->param( MESSAGE => gettext("Grant an user access to this repository") );
}
elsif( $file->fetch < 0 )
{
- $template = new HTML::Template( filename => $templatedir."/misc/simplemsg.tmpl" );
+ $template = open_template( $vhffs , "misc" , "simplemsg" );
$message = gettext( "Cannot get informations on this object");
$template->param( MESSAGE => $message );
}
elsif( ( Vhffs::Acl::what_perm_for_user( $user , $file , $vhffs ) < Vhffs::Constants::ACL_VIEW ) && ( $user->is_admin != 1 ) )
{
- $template = new HTML::Template( filename => $templatedir."/misc/simplemsg.tmpl" );
+ $template = open_template( $vhffs , "misc" , "simplemsg" );
$message = gettext( "You're not allowed to do this (ACL rights)");
$template->param( MESSAGE => $message );
}
elsif( ( ( $file->get_status != Vhffs::Constants::ACTIVATED ) || ( $file->get_status != Vhffs::Constants::CREATED ) )&& ( $user->is_admin != 1 ) )
{
- $template = new HTML::Template( filename => $templatedir."/misc/simplemsg.tmpl" );
+ $template = open_template( $vhffs , "misc" , "simplemsg" );
$message = gettext( "This object is not functionnal yet. Please wait creation, moderation or modification.");
$template->param( MESSAGE => $message );
}
@@ -121,8 +118,8 @@
$template->param( VALUE_FILETYPE => $file->get_type() );
$template->param( TEXT_DELETE_FILENAME => gettext("Delete this file from servers") );
- $template->param( TEXT_BEFORE_DELETE => gettext("This action is non-reversible. All services associated to this project will be DESTROYED.") );
- $template->param( ASK_DELETE_FILENAME => gettext("Are you SURE you want DELETE this subversion repository ?") );
+ $template->param( TEXT_BEFORE_DELETE => gettext("This action is non-reversible.") );
+ $template->param( ASK_DELETE_FILENAME => gettext("If you delete this file, we will delete the file from our servers.") );
$template->param( YES => gettext("Yes I'm sure of what I do") );
$template->param( NO => gettext("No, I'm not sure, I prefer to keep this project.") );
$template->param( TEXT_DELETE => gettext("Delete") );
@@ -134,7 +131,7 @@
if( $user->is_admin == 1 )
{
- $subtemplate = new HTML::Template( filename => $templatedir."/admin/misc/opart.tmpl" );
+ $subtemplate = open_template( $vhffs , "admin" , "misc" , "opart" );
$subtemplate->param( OID => $file->get_oid );
$subtemplate->param( OPART_TEXT => gettext("Go to object-part admin") );
$subtemplate->param( OPART_TITLE => gettext("Object part") );
@@ -143,4 +140,4 @@
}
-display Vhffs::Panel::Main($panel, $template->output );
+display($panel, $template->output );
Modified: trunk/vhffs-panel/templates/largefile/prefs-waiting.tmpl
==============================================================================
--- trunk/vhffs-panel/templates/largefile/prefs-waiting.tmpl (original)
+++ trunk/vhffs-panel/templates/largefile/prefs-waiting.tmpl Sun Aug 20 22:31:08 2006
@@ -18,7 +18,7 @@
<tmpl_var name="TEXT-COMPLETE">
</p>
<p>
- <a href="infos.pl?name=<tmpl_var name="VALUE_FILENAME">"><tmpl_var name="CONFIRM-COMPLETE"></a>
+ <a href="complete.pl?name=<tmpl_var name="VALUE_FILENAME">"><tmpl_var name="CONFIRM-COMPLETE"></a>
</p>
<tmpl_var name="OPART">